2023-10-13 16:32:10 +02:00
|
|
|
|
|
|
|
import { Page, Locator } from '@playwright/test';
|
|
|
|
|
|
|
|
export default class SettingsScreen {
|
|
|
|
public readonly okayButton: Locator;
|
|
|
|
public readonly appearanceTabButton: Locator;
|
|
|
|
|
2023-12-11 15:58:45 +02:00
|
|
|
public constructor(private page: Page) {
|
2023-10-13 16:32:10 +02:00
|
|
|
this.okayButton = page.locator('button', { hasText: 'OK' });
|
2023-12-11 15:58:45 +02:00
|
|
|
this.appearanceTabButton = this.getTabLocator('Appearance');
|
|
|
|
}
|
|
|
|
|
|
|
|
public getTabLocator(tabName: string) {
|
|
|
|
return this.page.locator('a[role="tab"] > span', { hasText: tabName });
|
2023-10-13 16:32:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public async waitFor() {
|
|
|
|
await this.okayButton.waitFor();
|
|
|
|
await this.appearanceTabButton.waitFor();
|
|
|
|
}
|
|
|
|
}
|