Add dark mode support with persisted OS-aware theme selection

This commit is contained in:
2026-04-21 19:30:29 +02:00
parent 4f91e8fdd3
commit fef8f60ee2
11 changed files with 293 additions and 51 deletions

View File

@@ -89,4 +89,9 @@ describe("MainLayout", () => {
await userEvent.click(toggleButton);
expect(localStorage.getItem("bangui_sidebar_collapsed")).toBe("true");
});
it("renders a theme toggle button in the sidebar footer", () => {
renderLayout();
expect(screen.getByRole("button", { name: /switch to dark mode/i })).toBeInTheDocument();
});
});