Files

32 lines
793 B
TypeScript
Raw Permalink Normal View History

import { expect, type Page } from "@playwright/test";
type SettingsSection =
| "profile"
| "notifications"
| "voice"
| "agents"
| "channel-templates"
| "compute"
| "appearance"
| "shortcuts"
2026-07-25 03:30:33 +01:00
| "hosted-communities"
| "tokens"
| "community-members"
| "mobile"
2026-07-19 20:01:38 +01:00
| "updates";
export async function openProfileMenu(page: Page) {
await page.getByTestId("open-settings").click();
await expect(page.getByTestId("profile-popover")).toBeVisible();
}
export async function openSettings(page: Page, section?: SettingsSection) {
await openProfileMenu(page);
2026-06-08 15:23:11 +01:00
await page.getByTestId("profile-popover-settings").click();
await expect(page.getByTestId("settings-view")).toBeVisible();
2026-06-08 15:23:11 +01:00
if (section) {
await page.getByTestId(`settings-nav-${section}`).click();
}
}