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(); } async execute() { await this.clickByTestId('node-execute-button'); } getOutputPanel() { return this.page.getByTestId('output-panel'); } getParameterExpressionPreviewValue() { return this.page.getByTestId('parameter-expression-preview-value'); } }