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) {
|
2024-08-02 15:49:15 +02:00
|
|
|
return this.page.getByRole('tab', { name: tabName });
|
2023-10-13 16:32:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public async waitFor() {
|
|
|
|
await this.okayButton.waitFor();
|
|
|
|
await this.appearanceTabButton.waitFor();
|
|
|
|
}
|
|
|
|
}
|