fix(webui): crossfade theme changes as one page (#6459)
* fix(webui): crossfade theme changes as one page * test(webui): align selection highlight motion checks Follow the shared CSS transition contract instead of obsolete Tailwind utilities. Verify normal geometry easing and reduced-motion theme paint in the browser without changing accepted theme behavior or relaxing CI gates.
This commit is contained in:
1 parent
4701218719
commit
83b6112843
20 files changed
+538
-67
No files matched your search
@@ -10,17 +10,21 @@ test("system theme stays live, explicit choices persist, and tabs agree", async
|
||||
await expect(page.getByRole("radio", { name: "System", exact: true })).toBeChecked();
|
||||
await page.emulateMedia({ colorScheme: "dark" });
|
||||
await expect(page.locator("html")).toHaveClass(/dark/);
|
||||
await page.getByRole("radio", { name: "Light", exact: true }).check();
|
||||
// Native theme snapshots commit the selected preference after capture.
|
||||
await page.getByRole("radio", { name: "Light", exact: true }).click();
|
||||
await expect(page.getByRole("radio", { name: "Light", exact: true })).toBeChecked();
|
||||
await expect(page.locator("html")).not.toHaveClass(/dark/);
|
||||
await page.reload();
|
||||
await expect(page.getByRole("radio", { name: "Light", exact: true })).toBeChecked();
|
||||
await expect(page.locator("html")).not.toHaveClass(/dark/);
|
||||
await page.getByRole("radio", { name: "System", exact: true }).check();
|
||||
await page.getByRole("radio", { name: "System", exact: true }).click();
|
||||
await expect(page.getByRole("radio", { name: "System", exact: true })).toBeChecked();
|
||||
await expect(page.locator("html")).toHaveClass(/dark/);
|
||||
const other = await context.newPage();
|
||||
await other.goto("/browser/fixture.html?case=appearance");
|
||||
await expect(other.getByRole("radio", { name: "System", exact: true })).toBeChecked();
|
||||
await other.getByRole("radio", { name: "Light", exact: true }).check();
|
||||
await other.getByRole("radio", { name: "Light", exact: true }).click();
|
||||
await expect(other.getByRole("radio", { name: "Light", exact: true })).toBeChecked();
|
||||
await expect(page.getByRole("radio", { name: "Light", exact: true })).toBeChecked();
|
||||
await expect(page.locator("html")).not.toHaveClass(/dark/);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user