fix: address board grid CI and review
This commit is contained in:
1 parent
59106053f2
commit
5ab3ee7d02
2 files changed
+100
-28
No files matched your search
@@ -1694,6 +1694,27 @@ describe("saveLayouts should save layout changes", () => {
|
||||
);
|
||||
expect(returnedItem.sectionId).toBe(sectionId);
|
||||
});
|
||||
test("should create one gutter root when layouts are saved concurrently", async () => {
|
||||
const db = createDb();
|
||||
const caller = boardRouter.createCaller({ db, deviceType: undefined, session: defaultSession });
|
||||
const { boardId, layoutId } = await createFullBoardAsync(db, "concurrent-gutters");
|
||||
const input = {
|
||||
id: boardId,
|
||||
layouts: [
|
||||
{
|
||||
...createExistingLayout(layoutId),
|
||||
leftGutterColumnCount: 2,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
await Promise.all([caller.saveLayouts(input), caller.saveLayouts(input)]);
|
||||
|
||||
const leftRoots = await db.query.sections.findMany({
|
||||
where: and(eq(sections.boardId, boardId), eq(sections.kind, "empty"), eq(sections.xOffset, -1)),
|
||||
});
|
||||
expect(leftRoots).toHaveLength(1);
|
||||
});
|
||||
test("should remove layout when not present in input", async () => {
|
||||
// Arrange
|
||||
const db = createDb();
|
||||
|
||||
Reference in new issue
Block a user