test: Migrate small Cypress tests to Playwright (#18922)

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
shortstacked
2025-08-29 09:04:47 +01:00
committed by GitHub
parent 1bc317dce5
commit 7dd89d77d9
18 changed files with 388 additions and 190 deletions

View File

@@ -59,11 +59,16 @@ export class WorkflowApiHelper {
const webhookPrefix = options?.webhookPrefix ?? 'test-webhook';
const uniqueSuffix = nanoid(idLength);
// Make workflow name unique
if (workflow.name) {
// Make workflow name unique; add a default if missing
if (workflow.name && workflow.name.trim().length > 0) {
workflow.name = `${workflow.name} (Test ${uniqueSuffix})`;
} else {
workflow.name = `Test Workflow ${uniqueSuffix}`;
}
// Ensure workflow is inactive by default when not specified
workflow.active ??= false;
// Check if workflow has webhook nodes and process them
let webhookId: string | undefined;
let webhookPath: string | undefined;