mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-30 10:36:35 +02:00
22 lines
577 B
TypeScript
22 lines
577 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.locator('a[role="tab"] > span', { hasText: tabName });
|
|
}
|
|
|
|
public async waitFor() {
|
|
await this.okayButton.waitFor();
|
|
await this.appearanceTabButton.waitFor();
|
|
}
|
|
}
|