Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 1x 1x 1x 1x 1x 3x 3x 3x 3x 4x 4x 3x 3x 1x 1x 3x 3x 1x 1x 3x 3x 1x 1x 3x | import type { Locator, Page } from '@playwright/test';
/**
* Page-object a Material / Tailwind dialog overlay-hez.
*/
export class DyE2E_DialogPageObject {
constructor(private readonly page: Page) {}
get root(): Locator {
return this.page.locator('dynamo-overlay, [role="dialog"], .mat-mdc-dialog-container').first();
}
async waitForOpen(timeout: number = 5_000): Promise<void> {
await this.root.waitFor({ state: 'visible', timeout });
}
async waitForClose(timeout: number = 5_000): Promise<void> {
await this.root.waitFor({ state: 'hidden', timeout });
}
async clickButton(label: string): Promise<void> {
await this.root.getByRole('button', { name: label, exact: true }).first().click();
}
}
|