From de32be01f8715d475286f8afcea95de6abcaa3c8 Mon Sep 17 00:00:00 2001 From: hkonsti <45428767+hkonsti@users.noreply.github.com> Date: Fri, 6 Nov 2026 00:37:18 +0000 Subject: [PATCH] wait for the pending agent to be forgotten in the setup's test, which an effect does The test asserted it the moment the sign-in showed; the component forgets it in an effect after that render, which a slow runner flushes later, so the assertion failed on CI now and then. --- packages/web/src/components/agent-setup.test.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/web/src/components/agent-setup.test.tsx b/packages/web/src/components/agent-setup.test.tsx index 4194bd0d..25a3952c 100644 --- a/packages/web/src/components/agent-setup.test.tsx +++ b/packages/web/src/components/agent-setup.test.tsx @@ -254,7 +254,8 @@ describe('AgentSetup', () => { expect( await screen.findByText('Cursor is signed in as Coding agent.', undefined, {timeout: 5000}), ).toBeDefined(); - expect(pendingAgent()).toBeNull(); + // Forgotten in an effect after the render that says so, which a slow runner flushes later. + await waitFor(() => expect(pendingAgent()).toBeNull()); }, 10_000); test('sets a login up again with a new password', async () => {