fix(theme): persist switcher accent for SSR
Quality / quality (ubuntu-latest) (push) Failing after 9m48s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-12 21:17:20 +05:30
parent effed1c3cf
commit dd9b7a289a
8 changed files with 11 additions and 25 deletions
+4 -4
View File
@@ -374,10 +374,10 @@ test("navbar hover menu stays open while the pointer crosses into its panel", as
});
test("preference switcher keeps only one popover open and closes outside", async () => {
const html = await renderComponent(
readFileSync(uiComponentPath("PreferenceSwitcher"), "utf8"),
{},
);
const source = readFileSync(uiComponentPath("PreferenceSwitcher"), "utf8");
const html = await renderComponent(source, {});
expect(source).toContain("window.wrnAccent?.set(value)");
expect(source).toContain("window.wrnTheme?.set(value)");
const dom = mountHtml(html);
const menus = Array.from(dom.querySelectorAll(".wrn-preferences__menu")) as HTMLDetailsElement[];
const DomEvent = (dom.window as { Event: typeof Event }).Event;