mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
test: Refactor page objects and reuse locators (#19191)
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import type { Locator } from '@playwright/test';
|
||||
|
||||
import { BasePage } from './BasePage';
|
||||
import { LogsPanel } from './components/LogsPanel';
|
||||
|
||||
export class ExecutionsPage extends BasePage {
|
||||
readonly logsPanel = new LogsPanel(this.getPreviewIframe().getByTestId('logs-panel'));
|
||||
|
||||
async clickDebugInEditorButton(): Promise<void> {
|
||||
await this.clickButtonByName('Debug in editor');
|
||||
}
|
||||
@@ -28,18 +31,6 @@ export class ExecutionsPage extends BasePage {
|
||||
return this.page.getByTestId('workflow-preview-iframe').contentFrame();
|
||||
}
|
||||
|
||||
getManualChatMessages(): Locator {
|
||||
return this.getPreviewIframe().locator('.chat-messages-list .chat-message');
|
||||
}
|
||||
|
||||
getLogsOverviewStatus() {
|
||||
return this.getPreviewIframe().getByTestId('logs-overview-status');
|
||||
}
|
||||
|
||||
getLogEntries(): Locator {
|
||||
return this.getPreviewIframe().getByTestId('logs-overview-body').getByRole('treeitem');
|
||||
}
|
||||
|
||||
async clickLastExecutionItem(): Promise<void> {
|
||||
const executionItem = this.getLastExecutionItem();
|
||||
await executionItem.click();
|
||||
|
||||
Reference in New Issue
Block a user