diff --git a/packages/dashboard/app/components/__tests__/PlanningModeModal.planning-flow.test.tsx b/packages/dashboard/app/components/__tests__/PlanningModeModal.planning-flow.test.tsx index 4ef0bf51f2..cf03208a2d 100644 --- a/packages/dashboard/app/components/__tests__/PlanningModeModal.planning-flow.test.tsx +++ b/packages/dashboard/app/components/__tests__/PlanningModeModal.planning-flow.test.tsx @@ -337,14 +337,20 @@ describe("PlanningModeModal", () => { fireEvent.click(screen.getByText("Small")); fireEvent.click(screen.getByText("Continue")); - await waitFor(() => { - expect(mockRespondToPlanning).toHaveBeenCalledWith( - "session-123", - { "q-scope": "small" }, - undefined, - "tab-self", - ); - }); + await waitFor( + () => { + expect(mockRespondToPlanning).toHaveBeenCalledWith( + "session-123", + { "q-scope": "small" }, + undefined, + "tab-self", + ); + }, + // waitFor's private 1s default (independent of vitest testTimeout) has + // flaked under loaded CI shards; the click->respond chain crosses + // several state-update hops. Generous bound, still fails fast locally. + { timeout: 5000 }, + ); }); it("shows stop action in loading and stops generation", async () => {