test(board): align canonical widget size assertions
This commit is contained in:
1 parent
dc600fc5c8
commit
2b28c3230c
2 files changed
+4
-4
No files matched your search
@@ -21,7 +21,7 @@ describe("item actions create-item", () => {
|
|||||||
.build();
|
.build();
|
||||||
const baseLayout = board.layouts.find((layout) => layout.role === "base");
|
const baseLayout = board.layouts.find((layout) => layout.role === "base");
|
||||||
|
|
||||||
const result = createItemCallback({ kind: "mediaMissing" })(board);
|
const result = createItemCallback({ kind: "downloads" })(board);
|
||||||
|
|
||||||
const createdItem = result.items.at(0);
|
const createdItem = result.items.at(0);
|
||||||
expect(createdItem?.layouts.find((layout) => layout.layoutId === "mobile")?.width).toBe(3);
|
expect(createdItem?.layouts.find((layout) => layout.layoutId === "mobile")?.width).toBe(3);
|
||||||
@@ -165,7 +165,7 @@ describe("item actions create-item", () => {
|
|||||||
const result = createItemCallback({ id: "calendar", kind: "mediaMissing", targetSectionId: "media" })(board);
|
const result = createItemCallback({ id: "calendar", kind: "mediaMissing", targetSectionId: "media" })(board);
|
||||||
|
|
||||||
expect(result.items.find((item) => item.id === "calendar")?.layouts).toEqual([
|
expect(result.items.find((item) => item.id === "calendar")?.layouts).toEqual([
|
||||||
expect.objectContaining({ layoutId: "layout", sectionId: "media", width: 4 }),
|
expect.objectContaining({ layoutId: "layout", sectionId: "media", width: 2 }),
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -262,7 +262,7 @@ describe("item actions create-item", () => {
|
|||||||
layoutId: layout.id,
|
layoutId: layout.id,
|
||||||
sectionId: "canvas",
|
sectionId: "canvas",
|
||||||
width: 1,
|
width: 1,
|
||||||
height: 3,
|
height: 2,
|
||||||
xOffset: 0,
|
xOffset: 0,
|
||||||
yOffset: 1,
|
yOffset: 1,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ describe("onboard.completeSetup", () => {
|
|||||||
expect(mediaMissing).toBeDefined();
|
expect(mediaMissing).toBeDefined();
|
||||||
expect(
|
expect(
|
||||||
await db.query.itemLayouts.findFirst({ where: eq(itemLayouts.itemId, mediaMissing?.id ?? "missing") }),
|
await db.query.itemLayouts.findFirst({ where: eq(itemLayouts.itemId, mediaMissing?.id ?? "missing") }),
|
||||||
).toMatchObject({ width: 4, height: 3 });
|
).toMatchObject({ width: 2, height: 2 });
|
||||||
});
|
});
|
||||||
|
|
||||||
it("requires an exact board id when more than one board exists", async () => {
|
it("requires an exact board id when more than one board exists", async () => {
|
||||||
|
|||||||
Reference in new issue
Block a user