mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
37 lines
1.0 KiB
TypeScript
37 lines
1.0 KiB
TypeScript
import type { Locator } from '@playwright/test';
|
|
|
|
import { BasePage } from './BasePage';
|
|
|
|
export class ExecutionsPage extends BasePage {
|
|
async clickDebugInEditorButton(): Promise<void> {
|
|
await this.clickButtonByName('Debug in editor');
|
|
}
|
|
|
|
async clickCopyToEditorButton(): Promise<void> {
|
|
await this.clickButtonByName('Copy to editor');
|
|
}
|
|
|
|
getExecutionItems(): Locator {
|
|
return this.page.locator('div.execution-card');
|
|
}
|
|
|
|
getLastExecutionItem(): Locator {
|
|
const executionItems = this.getExecutionItems();
|
|
return executionItems.nth(0);
|
|
}
|
|
|
|
async clickLastExecutionItem(): Promise<void> {
|
|
const executionItem = this.getLastExecutionItem();
|
|
await executionItem.click();
|
|
}
|
|
|
|
/**
|
|
* Handle the pinned nodes confirmation dialog.
|
|
* @param action - The action to take.
|
|
*/
|
|
async handlePinnedNodesConfirmation(action: 'Unpin' | 'Cancel'): Promise<void> {
|
|
const confirmDialog = this.page.locator('.matching-pinned-nodes-confirmation');
|
|
await this.page.getByRole('button', { name: action }).click();
|
|
}
|
|
}
|