fix(theme): persist switcher accent for SSR
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user