From 7bbe47e2016d770e80cd3f7d27703c3c4ba58aba Mon Sep 17 00:00:00 2001 From: Eivind Jonassen Date: Thu, 1 Oct 2026 09:01:28 +0200 Subject: [PATCH] fix(test): flush deferred transcript query notifications --- apps/mobile/src/screens/workspace-screen.integration.test.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/mobile/src/screens/workspace-screen.integration.test.tsx b/apps/mobile/src/screens/workspace-screen.integration.test.tsx index 39bd253..02f0c8e 100644 --- a/apps/mobile/src/screens/workspace-screen.integration.test.tsx +++ b/apps/mobile/src/screens/workspace-screen.integration.test.tsx @@ -326,6 +326,9 @@ test("shows a muted sent prompt before transcript projection and replaces it by order: "desc", }), }); + // React Query defers observer notifications to a zero-delay timer. Keep act + // open through that timer so React commits the snapshot before assertions. + await new Promise((resolve) => setTimeout(resolve, 0)); }); await waitFor(() => expect(screen.queryByText("Sent ยท waiting for transcript")).toBeNull()); expect(screen.getAllByText("Pending follow-up")).toHaveLength(1);