mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +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:
21
packages/testing/playwright/pages/BasePage.ts
Normal file
21
packages/testing/playwright/pages/BasePage.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { Page } from '@playwright/test';
|
||||
|
||||
export abstract class BasePage {
|
||||
constructor(protected readonly page: Page) {}
|
||||
|
||||
protected async clickByTestId(testId: string) {
|
||||
await this.page.getByTestId(testId).click();
|
||||
}
|
||||
|
||||
protected async fillByTestId(testId: string, value: string) {
|
||||
await this.page.getByTestId(testId).fill(value);
|
||||
}
|
||||
|
||||
protected async clickByText(text: string) {
|
||||
await this.page.getByText(text).click();
|
||||
}
|
||||
|
||||
protected async clickButtonByName(name: string) {
|
||||
await this.page.getByRole('button', { name }).click();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user