feat(ui): add light theme toggle
This commit is contained in:
parent
bbc81cea0d
commit
cdb269e505
17 changed files with 415 additions and 24 deletions
|
|
@ -18,4 +18,23 @@ describe("React app dashboard state view", () => {
|
|||
expect(html).toContain("Loading Dashboard");
|
||||
expect(html).toContain("Fetching active model");
|
||||
});
|
||||
|
||||
test("renders an accessible theme toggle with the active theme", () => {
|
||||
const html = renderToString(
|
||||
<AppStateView
|
||||
dashboard={{
|
||||
state: "loading",
|
||||
title: "Loading Dashboard",
|
||||
subtitle: "Fetching active model",
|
||||
message: "Waiting for the active dashboard document.",
|
||||
}}
|
||||
theme="dark"
|
||||
onThemeChange={() => undefined}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(html).toContain('data-ui-theme-toggle="true"');
|
||||
expect(html).toContain('aria-label="Switch to light theme"');
|
||||
expect(html).toContain("Dark");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue