Files
buzz/desktop/tests/helpers/settings.ts
T
John TennantandJohn Tennant fc61d30ecc feat(desktop): add Pocket voice settings
Signed-off-by: John Tennant <johnmatthewtennant@gmail.com>
Signed-off-by: John Tennant <jtennant@block.xyz>
Signed-off-by: John Tennant <jtennant@squareup.com>
2026-07-29 12:20:47 -04:00

32 lines
793 B
TypeScript

import { expect, type Page } from "@playwright/test";
type SettingsSection =
| "profile"
| "notifications"
| "voice"
| "agents"
| "channel-templates"
| "compute"
| "appearance"
| "shortcuts"
| "hosted-communities"
| "tokens"
| "community-members"
| "mobile"
| "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);
await page.getByTestId("profile-popover-settings").click();
await expect(page.getByTestId("settings-view")).toBeVisible();
if (section) {
await page.getByTestId(`settings-nav-${section}`).click();
}
}