mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-21 09:38:01 +02:00
22 lines
559 B
TypeScript
22 lines
559 B
TypeScript
|
|
import { Page, Locator } from '@playwright/test';
|
|
|
|
export default class SettingsScreen {
|
|
public readonly okayButton: Locator;
|
|
public readonly appearanceTabButton: Locator;
|
|
|
|
public constructor(private page: Page) {
|
|
this.okayButton = page.locator('button', { hasText: 'OK' });
|
|
this.appearanceTabButton = this.getTabLocator('Appearance');
|
|
}
|
|
|
|
public getTabLocator(tabName: string) {
|
|
return this.page.getByRole('tab', { name: tabName });
|
|
}
|
|
|
|
public async waitFor() {
|
|
await this.okayButton.waitFor();
|
|
await this.appearanceTabButton.waitFor();
|
|
}
|
|
}
|