feat(webui): smooth theme changes and sun-moon transitions (#6450)
* feat(webui): smooth theme changes and sun-moon transitions * test(webui): respect theme cooldown in diagram checks
This commit is contained in:
1 parent
4f7c4f0885
commit
3ede000ad4
12 files changed
+305
-17
No files matched your search
@@ -200,8 +200,10 @@ test("published Pele renders Chinese wrapping and mixed measured styles across w
|
||||
}
|
||||
for (const theme of ["light", "dark"]) {
|
||||
if (await page.evaluate(() => document.documentElement.classList.contains("dark")) !== (theme === "dark")) {
|
||||
await expect(page.locator("html")).not.toHaveAttribute("data-theme-transition");
|
||||
const previous = await image.getAttribute("src");
|
||||
await page.getByRole("button", { name: "Toggle theme" }).click();
|
||||
await expect.poll(() => page.evaluate(() => document.documentElement.classList.contains("dark"))).toBe(theme === "dark");
|
||||
await expect(image).not.toHaveAttribute("src", previous!);
|
||||
}
|
||||
await image.scrollIntoViewIfNeeded();
|
||||
|
||||
Reference in new issue
Block a user