mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
39 lines
1021 B
TypeScript
39 lines
1021 B
TypeScript
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();
|
|
}
|
|
}
|