feat: add assistant board styling tools

This commit is contained in:
ajnart committed 2026-08-01 10:39:41 +02:00
1 parent a5fa6d3afe
commit 5458e7d647
21 files changed
+811 -18

No files matched your search

@@ -586,6 +586,28 @@ describe("getBoardByName should return board by name", () => {
});
});
describe("getBoardSettings should return editable board settings", () => {
test("returns current custom CSS and requires modify permission", async () => {
const spy = vi.spyOn(boardAccess, "throwIfActionForbiddenAsync");
const db = createDb();
const caller = boardRouter.createCaller({ db, deviceType: undefined, session: defaultSession });
const { boardId } = await createFullBoardAsync(db, "default");
const customCss = ".dashboard-card { border-radius: 0.5rem; }";
await db.update(boards).set({ customCss, primaryColor: "#123456", pageTitle: null }).where(eq(boards.id, boardId));
const result = await caller.getBoardSettings({ id: boardId });
expect(result).toMatchObject({
id: boardId,
name: "default",
customCss,
primaryColor: "#123456",
pageTitle: null,
});
expect(spy).toHaveBeenCalledWith(expect.anything(), expect.anything(), "modify");
});
});
describe("savePartialBoardSettings should save general settings", () => {
it("should save general settings", async () => {
// Arrange