Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import type { Locator } from '@playwright/test';
|
|
|
|
import { BasePage } from '../BasePage';
|
|
|
|
/**
|
|
* Convert to Sub-workflow Modal component for converting nodes to sub-workflows.
|
|
* Used within CanvasPage as `n8n.canvas.convertToSubworkflowModal.*`
|
|
*
|
|
* @example
|
|
* // Access via canvas page
|
|
* await n8n.canvas.rightClickNode('My Node');
|
|
* await n8n.canvas.clickContextMenuAction('Convert node to sub-workflow');
|
|
* await n8n.canvas.convertToSubworkflowModal.waitForModal();
|
|
* await n8n.canvas.convertToSubworkflowModal.clickSubmitButton();
|
|
* await n8n.canvas.convertToSubworkflowModal.waitForClose();
|
|
*/
|
|
export class ConvertToSubworkflowModal extends BasePage {
|
|
constructor(private root: Locator) {
|
|
super(root.page());
|
|
}
|
|
|
|
getSubmitButton(): Locator {
|
|
return this.root.getByTestId('submit-button');
|
|
}
|
|
|
|
async waitForModal(): Promise<void> {
|
|
await this.root.waitFor({ state: 'visible' });
|
|
}
|
|
|
|
async clickSubmitButton(): Promise<void> {
|
|
await this.getSubmitButton().click();
|
|
}
|
|
|
|
async waitForClose(): Promise<void> {
|
|
await this.root.waitFor({ state: 'hidden' });
|
|
}
|
|
}
|