feat: rebuild board grid experience
This commit is contained in:
1 parent
5dc4dbeaef
commit
0110a2ef63
122 files changed
+9582
-4063
No files matched your search
@@ -0,0 +1,42 @@
|
||||
import { describe, expect, test } from "vitest";
|
||||
|
||||
import { boardLayoutSchema } from "./board";
|
||||
|
||||
describe("board layout gutters", () => {
|
||||
test("defaults both gutters to disabled", () => {
|
||||
expect(
|
||||
boardLayoutSchema.parse({
|
||||
id: "layout",
|
||||
name: "Base",
|
||||
columnCount: 12,
|
||||
breakpoint: 0,
|
||||
}),
|
||||
).toMatchObject({
|
||||
leftGutterColumnCount: 0,
|
||||
rightGutterColumnCount: 0,
|
||||
});
|
||||
});
|
||||
|
||||
test("allows up to three columns per gutter while preserving a main column", () => {
|
||||
expect(
|
||||
boardLayoutSchema.safeParse({
|
||||
id: "layout",
|
||||
name: "Base",
|
||||
columnCount: 6,
|
||||
leftGutterColumnCount: 3,
|
||||
rightGutterColumnCount: 2,
|
||||
breakpoint: 0,
|
||||
}).success,
|
||||
).toBe(true);
|
||||
expect(
|
||||
boardLayoutSchema.safeParse({
|
||||
id: "layout",
|
||||
name: "Base",
|
||||
columnCount: 6,
|
||||
leftGutterColumnCount: 3,
|
||||
rightGutterColumnCount: 3,
|
||||
breakpoint: 0,
|
||||
}).success,
|
||||
).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user