test: Migrate NDV tests from Cypress -> Playwright (#19148)

This commit is contained in:
shortstacked
2025-09-04 09:06:51 +01:00
committed by GitHub
parent 4a21f79f5c
commit 36079da415
20 changed files with 3257 additions and 1047 deletions

View File

@@ -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();