fix: address onboarding review findings

This commit is contained in:
ajnart committed 2026-08-14 11:32:13 +02:00
1 parent 9b7f189b02
commit 741e641bd2
6 files changed
+77 -22

No files matched your search

@@ -0,0 +1,36 @@
import { describe, expect, it } from "vitest";
import { getBoardValidationErrors } from "./board-validation";
describe("getBoardValidationErrors", () => {
it("keeps attempted board errors visible until each value is corrected", () => {
expect(
getBoardValidationErrors({
attempted: true,
hasExistingBoards: true,
selectedBoardId: null,
boardName: "",
}),
).toEqual({ target: true, name: true });
expect(
getBoardValidationErrors({
attempted: true,
hasExistingBoards: true,
selectedBoardId: "board-id",
boardName: "dashboard",
}),
).toEqual({ target: false, name: false });
});
it("does not require a target when setup has no existing board", () => {
expect(
getBoardValidationErrors({
attempted: true,
hasExistingBoards: false,
selectedBoardId: null,
boardName: "dashboard",
}).target,
).toBe(false);
});
});