diff --git a/frontend/tests/ticket8-legacy-routes.test.tsx b/frontend/tests/ticket8-legacy-routes.test.tsx index 1079f98..edd63e9 100644 --- a/frontend/tests/ticket8-legacy-routes.test.tsx +++ b/frontend/tests/ticket8-legacy-routes.test.tsx @@ -39,7 +39,7 @@ describe('Ticket #8 — anciennes routes et navigation', () => { }) expect(router.state.historyAction).toBe('REPLACE') expect(router.state.location.state).toMatchObject({ notice: expect.any(String) }) - expect(screen.getByRole('heading', { name: 'Synthèses conservées' })).toBeInTheDocument() + expect(await screen.findByRole('heading', { name: 'Synthèses conservées' })).toBeInTheDocument() expect(screen.queryByRole('heading', { name: 'Ancien fil d’actualités' })).not.toBeInTheDocument() }) @@ -52,7 +52,7 @@ describe('Ticket #8 — anciennes routes et navigation', () => { if (router.state.location.pathname !== '/admin/sources') throw new Error(`route remained ${router.state.location.pathname}`) }) expect(router.state.historyAction).toBe('REPLACE') - expect(screen.getByRole('heading', { name: 'Sources et plafonds' })).toBeInTheDocument() + expect(await screen.findByRole('heading', { name: 'Sources et plafonds' })).toBeInTheDocument() expect(screen.queryByRole('heading', { name: 'Ancien historique des jobs' })).not.toBeInTheDocument() })