1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-30 10:36:35 +02:00
joplin/packages/app-desktop/integration-tests/models/SettingsScreen.ts

22 lines
559 B
TypeScript
Raw Normal View History

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();
}
}