mirror of
https://seed.radicle.dev/rad:z4D5UCArafTzTQpDZNQRuqswh3ury.git
synced 2026-10-30 16:40:47 +08:00
/repos is no longer a route, so specs fell back to the inbox and logged a routing error. The inbox opens the first-launch guide, so tests now start with it dismissed. The router now logs the URL it couldn't resolve instead of just "URL".
33 lines
1.2 KiB
TypeScript
33 lines
1.2 KiB
TypeScript
import { expect, reload, test } from "@tests/support/fixtures.js";
|
|
|
|
test("default theme", async ({ page }) => {
|
|
await page.goto("/inbox");
|
|
|
|
await expect(page.locator("html")).toHaveAttribute("data-theme", "dark");
|
|
});
|
|
|
|
test("theme persistence", async ({ page }) => {
|
|
await page.goto("/inbox");
|
|
await expect(page.getByRole("link", { name: "markdown" })).toBeVisible();
|
|
await page.getByRole("button", { name: "Settings" }).click();
|
|
|
|
await page.getByRole("button", { name: "Light", exact: true }).click();
|
|
await expect(page.locator("html")).toHaveAttribute("data-theme", "light");
|
|
|
|
await reload(page);
|
|
|
|
await expect(page.locator("html")).toHaveAttribute("data-theme", "light");
|
|
});
|
|
|
|
test("change theme", async ({ page }) => {
|
|
await page.goto("/inbox");
|
|
await expect(page.getByRole("link", { name: "markdown" })).toBeVisible();
|
|
await page.getByRole("button", { name: "Settings" }).click();
|
|
|
|
await page.getByRole("button", { name: "Light", exact: true }).click();
|
|
await expect(page.locator("html")).toHaveAttribute("data-theme", "light");
|
|
|
|
await page.getByRole("button", { name: "Dark", exact: true }).click();
|
|
await expect(page.locator("html")).toHaveAttribute("data-theme", "dark");
|
|
});
|