mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Signed-off-by: Wes <wesbillman@users.noreply.github.com> Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co>
31 lines
769 B
TypeScript
31 lines
769 B
TypeScript
import { expect, type Page } from "@playwright/test";
|
|
|
|
type SettingsSection =
|
|
| "profile"
|
|
| "notifications"
|
|
| "agents"
|
|
| "channel-templates"
|
|
| "compute"
|
|
| "appearance"
|
|
| "shortcuts"
|
|
| "tokens"
|
|
| "community-members"
|
|
| "mobile"
|
|
| "updates"
|
|
| "doctor";
|
|
|
|
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();
|
|
}
|
|
}
|