test(e2e): use canonical theme preference
CI and Deploy / test (pull_request) Successful in 4m54s
CI and Deploy / deploy (pull_request) Has been skipped

This commit is contained in:
cesnimda
2026-08-15 15:57:00 +02:00
parent cd091159f3
commit 6b02e3f5d1
2 changed files with 5 additions and 5 deletions
+1 -2
View File
@@ -77,8 +77,7 @@ test("discovery remains usable across widths and opens the reviewed import", asy
}
await page.evaluate(() => {
const userKey = window.localStorage.getItem("authUserKey") || "anon";
window.localStorage.setItem(`themeMode:${userKey}`, "dark");
window.localStorage.setItem("jobtracker.themeMode", "dark");
});
await page.reload();
await expect(page.locator("html")).toHaveAttribute("data-color-scheme", "dark");
+4 -3
View File
@@ -15,7 +15,9 @@ test("kanban columns use dark theme surfaces", async ({ page }) => {
let moveRequests = 0;
await page.addInitScript(() => {
window.localStorage.setItem("uiLanguage", "en");
window.localStorage.setItem("themeMode:anon", "dark");
if (!window.localStorage.getItem("jobtracker.themeMode")) {
window.localStorage.setItem("jobtracker.themeMode", "dark");
}
});
await page.route("**/api/jobapplications/board", async (route) => {
await route.fulfill({ json: [{
@@ -79,8 +81,7 @@ test("kanban columns use dark theme surfaces", async ({ page }) => {
});
expect(pageScroll, JSON.stringify(overflow)).toBe(0);
await page.evaluate(() => {
const userKey = window.localStorage.getItem("authUserKey") || "anon";
window.localStorage.setItem(`themeMode:${userKey}`, "light");
window.localStorage.setItem("jobtracker.themeMode", "light");
});
await page.reload();
await expect(page.locator("html")).toHaveAttribute("data-color-scheme", "light");