fix(webui): unify settings switch styles
This commit is contained in:
1 parent
af43292f6f
commit
70bf433018
7 files changed
+105
-53
No files matched your search
@@ -36,6 +36,8 @@ describe("Settings capabilities", () => {
|
||||
renderSettingsView({ initialSection: "capabilities", initialSettings: payload });
|
||||
const memory = screen.getByRole("switch", { name: "Memory consolidation" });
|
||||
const web = screen.getByRole("switch", { name: "Web access" });
|
||||
expect(memory).toHaveClass("h-5", "w-9", "bg-foreground");
|
||||
expect(web).toHaveClass("h-5", "w-9", "bg-foreground");
|
||||
const webStyle = web.className;
|
||||
fireEvent.click(memory);
|
||||
await waitFor(() => expect(memory).toBeDisabled());
|
||||
@@ -44,6 +46,7 @@ describe("Settings capabilities", () => {
|
||||
expect(web.className).toBe(webStyle);
|
||||
fireEvent.click(web);
|
||||
expect(web).not.toBeChecked();
|
||||
expect(web).toHaveClass("bg-muted-foreground/25");
|
||||
await act(async () => finishMemory(memorySaved));
|
||||
await waitFor(() => expect(requestMutationMock).toHaveBeenLastCalledWith(
|
||||
"settings.runtime_config.update", { values: { "tools.web.enable": false } }, 20_000,
|
||||
|
||||
Reference in new issue
Block a user