All checks were successful
Wire viewer-frontend Vitest into Gitea Actions, centralize DEV base URLs in env-defaults.json, expand playkit API catalog specs, and land auth/mail flows plus verify-email public-host redirect and idle-logout e2e hooks.
29 lines
904 B
TypeScript
29 lines
904 B
TypeScript
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<void> {
|
|
await this.click(this.page.getByLabel('Account menu'));
|
|
await waitForVisible(this.page.getByRole('button', { name: 'Sign out' }));
|
|
}
|
|
|
|
async signOut(): Promise<void> {
|
|
await this.openMenu();
|
|
await this.click(this.page.getByRole('button', { name: 'Sign out' }));
|
|
}
|
|
|
|
async openManageUsers(): Promise<void> {
|
|
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<void> {
|
|
await this.click(this.page.getByLabel('Close manage users'));
|
|
}
|
|
}
|