test: Migrate cypress tests batch 1 to playwright (#19569)

This commit is contained in:
Artem Sorokin
2025-09-16 16:11:51 +02:00
committed by GitHub
parent b480f495d9
commit a4fc24371d
19 changed files with 2573 additions and 239 deletions

View File

@@ -62,4 +62,37 @@ export class WorkflowComposer {
await this.n8n.canvas.importWorkflow(fileName, workflowName);
return { workflowName };
}
/**
* Creates a new workflow by importing from a URL
* @param url - The URL to import the workflow from
* @returns Promise that resolves when the import is complete
*/
async importWorkflowFromURL(url: string): Promise<void> {
await this.n8n.workflows.clickAddWorkflowButton();
await this.n8n.canvas.clickWorkflowMenu();
await this.n8n.canvas.clickImportFromURL();
await this.n8n.canvas.fillImportURLInput(url);
await this.n8n.canvas.clickConfirmImportURL();
}
/**
* Opens the import from URL dialog and then dismisses it by clicking outside
*/
async openAndDismissImportFromURLDialog(): Promise<void> {
await this.n8n.workflows.clickAddWorkflowButton();
await this.n8n.canvas.clickWorkflowMenu();
await this.n8n.canvas.clickImportFromURL();
await this.n8n.canvas.clickOutsideModal();
}
/**
* Opens the import from URL dialog and then cancels it
*/
async openAndCancelImportFromURLDialog(): Promise<void> {
await this.n8n.workflows.clickAddWorkflowButton();
await this.n8n.canvas.clickWorkflowMenu();
await this.n8n.canvas.clickImportFromURL();
await this.n8n.canvas.clickCancelImportURL();
}
}