diff --git a/packages/desktop-app/src/tests/browser/kanban-consecutive-status-moves.test.ts b/packages/desktop-app/src/tests/browser/kanban-consecutive-status-moves.test.ts index f4f8e4b59..93c2c46b1 100644 --- a/packages/desktop-app/src/tests/browser/kanban-consecutive-status-moves.test.ts +++ b/packages/desktop-app/src/tests/browser/kanban-consecutive-status-moves.test.ts @@ -169,7 +169,11 @@ describe('KanbanView — consecutive status moves on a task node (browser mode)' // The critical assertion: each write sent the version RETURNED by the // previous write, not a stale/repeated one — this is exactly the OCC // mismatch the issue describes ("every subsequent status change fails"). - expect(versionsSent).toEqual([1, 2]); + // The store applies each move before sending its write, so wait for the + // second write rather than asserting on the render's timing. + await waitFor(() => { + expect(versionsSent).toEqual([1, 2]); + }); expect(conflictNotifications.notifications).toEqual([]); }); @@ -228,7 +232,12 @@ describe('KanbanView — consecutive status moves on a task node (browser mode)' }); expect(cardsIn(columnFor(container, 'In Progress'))).toEqual([]); - expect(versionsSent).toEqual([1, 2]); + // The store applies the move before sending its write, so the card lands + // in its new column first — wait for the second write rather than + // asserting on the render's timing. + await waitFor(() => { + expect(versionsSent).toEqual([1, 2]); + }); expect(conflictNotifications.notifications).toEqual([]); });