From 98309684a60dd776c752e6044104dfee904b25df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Titsworth-Morin?= Date: Fri, 1 May 2026 19:53:35 +0000 Subject: [PATCH] Stabilize worktree selector tests --- apps/web/tests/unit/pages/workspace.test.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/web/tests/unit/pages/workspace.test.tsx b/apps/web/tests/unit/pages/workspace.test.tsx index 3d5d96de0..8735745b2 100644 --- a/apps/web/tests/unit/pages/workspace.test.tsx +++ b/apps/web/tests/unit/pages/workspace.test.tsx @@ -706,9 +706,9 @@ describe('Workspace page', () => { ); }); - await waitFor(() => { - expect(screen.getByRole('button', { name: /Switch worktree \(feature\/auth\)/i })).toBeInTheDocument(); - }); + expect( + await screen.findByRole('button', { name: /Switch worktree \(feature\/auth\)/i }, { timeout: 5_000 }) + ).toBeInTheDocument(); expect(screen.getByTestId('location-probe').textContent).toContain( 'worktree=%2Fworkspaces%2Frepo-wt-feature-auth' ); @@ -720,9 +720,9 @@ describe('Workspace page', () => { true ); - await waitFor(() => { - expect(screen.getByRole('button', { name: /Switch worktree \(feature\/auth\)/i })).toBeInTheDocument(); - }); + expect( + await screen.findByRole('button', { name: /Switch worktree \(feature\/auth\)/i }, { timeout: 5_000 }) + ).toBeInTheDocument(); fireEvent.click(screen.getByRole('button', { name: /Switch worktree \(feature\/auth\)/i }));