Skip to content

Commit 859977e

Browse files
committed
test: define custom theme style sync
1 parent 14a95bf commit 859977e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ui/src/ui/custom-theme.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,12 @@ describe("custom theme import helpers", () => {
323323
} as unknown as Document;
324324
vi.stubGlobal("document", documentStub);
325325

326-
syncCustomThemeStyleTag(createImportedTheme());
326+
const theme = createImportedTheme();
327+
syncCustomThemeStyleTag(theme);
327328

328329
expect(appendChild).toHaveBeenCalledWith(style);
329-
expect(style.textContent).toContain(':root[data-theme="custom"]');
330+
expect(style.id).toBe("openclaw-custom-theme");
331+
expect(style.textContent).toBe(buildCustomThemeStyles(theme));
330332

331333
vi.stubGlobal("document", {
332334
head: documentStub.head,

0 commit comments

Comments
 (0)