mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
test: Migrate NDV tests from Cypress -> Playwright (#19148)
This commit is contained in:
@@ -17,6 +17,19 @@ export class CanvasPage extends BasePage {
|
||||
return this.page.getByTestId('node-creator-item-name').getByText(subItemText, { exact: true });
|
||||
}
|
||||
|
||||
getNthCreatorItem(index: number): Locator {
|
||||
return this.page.getByTestId('node-creator-item').nth(index);
|
||||
}
|
||||
|
||||
getNodeCreatorHeader(text?: string) {
|
||||
const header = this.page.getByTestId('nodes-list-header');
|
||||
return text ? header.filter({ hasText: text }) : header.first();
|
||||
}
|
||||
|
||||
async selectNodeCreatorItemByText(nodeName: string) {
|
||||
await this.page.getByText(nodeName).click();
|
||||
}
|
||||
|
||||
nodeByName(nodeName: string): Locator {
|
||||
return this.page.locator(`[data-test-id="canvas-node"][data-node-name="${nodeName}"]`);
|
||||
}
|
||||
@@ -546,6 +559,12 @@ export class CanvasPage extends BasePage {
|
||||
await this.getManualChatInput().fill(message);
|
||||
await this.getManualChatModal().locator('.chat-input-send-button').click();
|
||||
}
|
||||
/**
|
||||
* Get all currently selected nodes on the canvas
|
||||
*/
|
||||
getSelectedNodes() {
|
||||
return this.page.locator('[data-test-id="canvas-node"].selected');
|
||||
}
|
||||
|
||||
async openExecutions() {
|
||||
await this.page.getByTestId('radio-button-executions').click();
|
||||
|
||||
Reference in New Issue
Block a user