feat: deployable design studio and updated component showcase
This commit is contained in:
1 parent
3dddcaac1a
commit
3987ddbcfe
113 files changed
+4544
-1039
No files matched your search
@@ -31,9 +31,12 @@ test("preview input never requests a replacement; settings still do", async () =
|
||||
test("stored theme updates its stylesheet before the theme runtime loads", async () => {
|
||||
const window = new Window({ url: "http://localhost/components/alert" });
|
||||
window.document.cookie = "wrn-ui-mode=light;path=/";
|
||||
window.document.head.innerHTML = '<link rel="stylesheet" data-wrnexus-theme href="/__wrnexus/theme/dark/violet.css">';
|
||||
window.document.head.innerHTML =
|
||||
'<link rel="stylesheet" data-wrnexus-theme href="/__wrnexus/theme/dark/violet.css">';
|
||||
window.eval(readFileSync(new URL("../public/playground.js", import.meta.url), "utf8"));
|
||||
expect(window.document.documentElement.dataset.theme).toBe("light");
|
||||
expect(window.document.querySelector("link")?.getAttribute("href")).toBe("/__wrnexus/theme/light/violet.css");
|
||||
expect(window.document.querySelector("link")?.getAttribute("href")).toBe(
|
||||
"/__wrnexus/theme/light/violet.css",
|
||||
);
|
||||
await window.happyDOM.close();
|
||||
});
|
||||
Reference in new issue
Block a user