mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat: Add testcontainers and Playwright (no-changelog) (#16662)
Co-authored-by: Tomi Turtiainen <10324676+tomi@users.noreply.github.com>
This commit is contained in:
38
packages/testing/playwright/pages/NodeDisplayViewPage.ts
Normal file
38
packages/testing/playwright/pages/NodeDisplayViewPage.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { BasePage } from './BasePage';
|
||||
|
||||
export class NodeDisplayViewPage extends BasePage {
|
||||
async clickBackToCanvasButton() {
|
||||
await this.clickByTestId('back-to-canvas');
|
||||
}
|
||||
|
||||
getParameterByLabel(labelName: string) {
|
||||
return this.page.locator('.parameter-item').filter({ hasText: labelName });
|
||||
}
|
||||
|
||||
/**
|
||||
* Fill a parameter input field
|
||||
* @param labelName - The label of the parameter e.g URL
|
||||
* @param value - The value to fill in the input field e.g https://foo.bar
|
||||
*/
|
||||
async fillParameterInput(labelName: string, value: string) {
|
||||
await this.getParameterByLabel(labelName).getByTestId('parameter-input-field').fill(value);
|
||||
}
|
||||
|
||||
async selectWorkflowResource(createItemText: string, searchText: string = '') {
|
||||
await this.clickByTestId('rlc-input');
|
||||
|
||||
if (searchText) {
|
||||
await this.fillByTestId('rlc-search', searchText);
|
||||
}
|
||||
|
||||
await this.clickByText(createItemText);
|
||||
}
|
||||
|
||||
async togglePinData() {
|
||||
await this.clickByTestId('ndv-pin-data');
|
||||
}
|
||||
|
||||
async close() {
|
||||
await this.clickBackToCanvasButton();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user