Skip to content

Commit 8741390

Browse files
committed
add randomHexString utility function for consistency
1 parent 37e2d7b commit 8741390

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

tests/e2e/baseTest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { ElectronApplication, Page, TestInfo } from "@playwright/test";
22
import { _electron as electron, expect, test as testBase } from "@playwright/test";
33
import archiver from "archiver";
4-
import { randomUUID } from "crypto";
54
import { stubAllDialogs, stubDialog } from "electron-playwright-helpers";
65
import { createWriteStream, existsSync, mkdtempSync, readFileSync } from "fs";
76
import { tmpdir } from "os";
@@ -29,6 +28,7 @@ import {
2928
} from "./utils/connections";
3029
import { configureVSCodeSettings } from "./utils/settings";
3130
import { openConfluentSidebar } from "./utils/sidebarNavigation";
31+
import { randomHexString } from "./utils/strings";
3232

3333
// NOTE: we can't import these two directly from 'global.setup.ts'
3434
// cached test setup file path that's shared across worker processes
@@ -306,7 +306,7 @@ export const test = testBase.extend<VSCodeFixtures>({
306306
// ensure connection has resources available to work with
307307
await expect(connectionItem.locator).toHaveAttribute("aria-expanded", "true");
308308

309-
const topicName = `${topicConfig.name}-${randomUUID()}`;
309+
const topicName = `${topicConfig.name}-${randomHexString(6)}`;
310310

311311
// set default replication factor (if it wasn't provided) based on connection type
312312
const replicationFactor =

tests/e2e/objects/views/FlinkDatabaseView.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ export class FlinkDatabaseView extends SearchableView {
235235
const artifactItem = quickpick.items.filter({ hasText: "4. Artifact Name" }).first();
236236
await expect(artifactItem).toBeVisible();
237237
await artifactItem.click();
238-
239238
const baseFileName = path.basename(filePath, ".jar");
240239
// Although this resource may be cleaned up, we append a random string to avoid name conflicts during development
241240
const fullArtifactName = `${baseFileName}-${randomHexString(6)}`;

0 commit comments

Comments
 (0)