evOo-local/apps/web/e2e/settings-shell.spec.ts
Cursor Agent 2f2f0eb21e Move integrations and live trading into settings navigation
Integrations and Live Trading no longer compete as sidebar peers with
the account entry. Settings opens from a dedicated sidebar control;
integrations live in the settings nav, and Live Trading is a discover
banner above the account block in General.

Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
2026-09-21 17:10:17 +00:00

70 lines
3.8 KiB
TypeScript

import { expect, test } from "@playwright/test";
import { captureScreenshot, completeOnboarding, openUserSettings, signup } from "./helpers";
test("settings shell is two-pane and deep-links Models Memory Voice Usage", async ({
page,
}, testInfo) => {
const stamp = Date.now();
const userName = `Settings shell ${stamp}`;
await signup(page, `settings-shell-${stamp}@rakazo.test`, "password12", userName);
await completeOnboarding(page);
await expect(page.getByTestId("settings-entry")).toBeVisible();
await page.getByTestId("user-menu-trigger").click();
const menu = page.locator('[data-slot="popover-content"]');
await expect(menu.getByRole("button", { name: "Usage", exact: true })).toBeVisible();
await expect(menu.getByRole("button", { name: "Log out", exact: true })).toBeVisible();
await expect(menu.getByRole("button", { name: "Settings", exact: true })).toHaveCount(0);
await captureScreenshot(page, testInfo, "settings-account-menu-lean");
await page.keyboard.press("Escape");
const settings = await openUserSettings(page);
await expect(settings.getByTestId("settings-nav")).toBeVisible();
await expect(settings.getByTestId("settings-nav-general")).toHaveAttribute(
"aria-current",
"page",
);
await expect(settings.getByRole("heading", { name: "General", exact: true })).toBeVisible();
await expect(settings.getByTestId("live-trading-banner")).toBeVisible();
await expect(settings.getByRole("heading", { name: "Account", exact: true })).toBeVisible();
await captureScreenshot(page, testInfo, "settings-shell-general");
await settings.getByTestId("settings-nav-integrations").click();
await expect(settings).toHaveAttribute("data-settings-section", "integrations");
await expect(settings.getByRole("heading", { name: "Integrations", exact: true })).toBeVisible();
await expect(settings.getByTestId("integrations-settings")).toBeVisible();
await captureScreenshot(page, testInfo, "settings-shell-integrations");
await settings.getByTestId("settings-nav-models").click();
await expect(settings).toHaveAttribute("data-settings-section", "models");
await expect(settings.getByRole("heading", { name: "Models", exact: true })).toBeVisible();
await expect(settings.getByTestId("model-settings")).toBeVisible();
await captureScreenshot(page, testInfo, "settings-shell-models");
await settings.getByTestId("settings-nav-memory").click();
await expect(settings).toHaveAttribute("data-settings-section", "memory");
await expect(settings.getByRole("heading", { name: "Memory", exact: true })).toBeVisible();
await expect(settings.getByTestId("memory-settings")).toBeVisible();
const memory = settings.getByTestId("memory-settings");
await expect(memory.getByLabel("Provider")).toBeVisible();
await memory.getByLabel("Provider").selectOption("serenity");
await expect(memory.getByLabel("MCP endpoint")).toBeVisible();
await expect(memory.getByLabel("Bearer token")).toBeVisible();
await expect(memory.getByRole("button", { name: "Recall only" })).toBeVisible();
await captureScreenshot(page, testInfo, "settings-shell-memory-serenity");
await settings.getByTestId("settings-nav-voice").click();
await expect(settings).toHaveAttribute("data-settings-section", "voice");
await expect(settings.getByRole("heading", { name: "Voice", exact: true })).toBeVisible();
await expect(settings.getByTestId("voice-settings")).toBeVisible();
await captureScreenshot(page, testInfo, "settings-shell-voice");
await page.getByRole("button", { name: "Close voice settings" }).click();
await expect(page.getByTestId("user-settings")).toHaveCount(0);
await openUserSettings(page, "usage");
await expect(page.getByTestId("user-settings")).toHaveAttribute("data-settings-section", "usage");
await expect(page.getByTestId("usage-settings")).toBeVisible();
await captureScreenshot(page, testInfo, "settings-shell-usage");
});