import { type Page } from '@playwright/test'; import { BasePage, waitForVisible } from '@levkin/playkit'; export class AccountMenu extends BasePage { constructor(page: Page, baseUrl: string) { super(page, baseUrl); } async openMenu(): Promise { await this.click(this.page.getByLabel('Account menu')); await waitForVisible(this.page.getByRole('button', { name: 'Sign out' })); } async signOut(): Promise { await this.openMenu(); await this.click(this.page.getByRole('button', { name: 'Sign out' })); } async openManageUsers(): Promise { await this.openMenu(); await this.click(this.page.getByRole('button', { name: 'Manage Users' })); await waitForVisible(this.page.getByRole('heading', { name: /Manage Users/i })); } async closeManageUsers(): Promise { await this.click(this.page.getByLabel('Close manage users')); } }