diff --git a/apps/web/e2e/chart-links.spec.ts b/apps/web/e2e/chart-links.spec.ts index c6e1133..81f6950 100644 --- a/apps/web/e2e/chart-links.spec.ts +++ b/apps/web/e2e/chart-links.spec.ts @@ -4,6 +4,10 @@ import { captureScreenshot } from "./helpers"; const fixture = "/e2e/fixtures/chart-links.html"; test("chart links cannot execute script when clicked or expanded", async ({ page }, testInfo) => { + test.setTimeout(120_000); + // ChartCanvas lazy-loads Observable Plot; pay the import cost once before the matrix below. + await page.goto(`${fixture}?${new URLSearchParams({ href: "#details", inspect: "0" })}`); + await expect(page.locator("svg circle").first()).toBeVisible({ timeout: 90_000 }); for (const inspect of ["0", "1"]) { for (const href of [ 'javascript:void(document.body.dataset.plotExecuted="yes")', diff --git a/apps/web/e2e/ui-appearance.spec.ts b/apps/web/e2e/ui-appearance.spec.ts index e72d12e..6bda945 100644 --- a/apps/web/e2e/ui-appearance.spec.ts +++ b/apps/web/e2e/ui-appearance.spec.ts @@ -67,6 +67,9 @@ test("account settings appearance control switches to light mode", async ({ page await settings.getByRole("button", { name: "Close user settings" }).click(); await expect(settings).toBeHidden(); await expect(page.locator("html")).toHaveAttribute("data-theme", "light"); + // Light surfaces stay light: no dark panel or white-on-paper text survives the switch. + await expect(page.locator("main").first()).toHaveCSS("background-color", "rgb(255, 255, 255)"); + await expect(page.locator("aside").first()).toHaveCSS("background-color", "rgb(245, 245, 242)"); await captureScreenshot(page, testInfo, "ui-appearance-light-shell"); await captureSidebarSearchSelected(page, testInfo, "sidebar-search-selected-light"); diff --git a/apps/web/index.html b/apps/web/index.html index df71503..a3c98da 100644 --- a/apps/web/index.html +++ b/apps/web/index.html @@ -27,7 +27,7 @@ document.documentElement.dataset.theme = theme; document.documentElement.style.colorScheme = theme; const meta = document.querySelector('meta[name="theme-color"]'); - if (meta) meta.setAttribute("content", theme === "light" ? "#fafaf8" : "#07080a"); + if (meta) meta.setAttribute("content", theme === "light" ? "#ffffff" : "#07080a"); })();