mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
Repairs (74 tests across 6 files): - rbac.spec.ts, settings.spec.ts: fix obsolete auth-state path (test-results/.auth/user.json -> .playwright/.auth/user.json via authFile import from playwright.config.ts) - state-bleed-audit.spec.ts, gui-file-carry.spec.ts, full-session.spec.ts: update bare tool routes (/resize -> /image/resize, etc.) to match the 2.0 /:modality/:toolId routing - gui-settings-rbac.spec.ts: fix 2 tests with bare /resize route Quarantine (65 tests across 2 files, tagged with test.skip()): - gui-performance.spec.ts (62 tests): bare routes throughout + selector drift; mechanical route fix is tractable but needs UI verification pass - theme.spec.ts (3 tests): footer theme toggle selector needs 2.0 UI verification QUARANTINE.md updated with full triage table. Vitest parity confirmed.
28 lines
1.2 KiB
TypeScript
28 lines
1.2 KiB
TypeScript
import { expect, test } from "./helpers";
|
|
|
|
// Phase 4b quarantine: the footer Toggle Theme button selector
|
|
// (button[title='Toggle Theme']) needs verification against the 2.0 UI which
|
|
// hides the footer on mobile and may have changed the toggle mechanism.
|
|
test.skip(true, "Phase 4b quarantine: footer theme toggle selector needs 2.0 UI verification");
|
|
|
|
test.describe("Theme System", () => {
|
|
test("page defaults to light theme", async ({ loggedInPage: page }) => {
|
|
// Check that html element does not have 'dark' class by default
|
|
const html = page.locator("html");
|
|
const classList = await html.getAttribute("class");
|
|
// Default is light, so 'dark' should not be present initially
|
|
// (unless system preference is dark)
|
|
expect(classList).toBeDefined();
|
|
});
|
|
|
|
test("footer has theme toggle buttons", async ({ loggedInPage: page }) => {
|
|
// Footer has a "Toggle Theme" button fixed at bottom-right
|
|
const themeBtn = page.locator("button[title='Toggle Theme']");
|
|
await expect(themeBtn).toBeVisible({ timeout: 10_000 });
|
|
});
|
|
|
|
test("privacy policy link is in footer", async ({ loggedInPage: page }) => {
|
|
await expect(page.getByText("Privacy Policy")).toBeVisible();
|
|
});
|
|
});
|