From 86163a69aa63d3309bdd5424cdd6e8cc75fd27e2 Mon Sep 17 00:00:00 2001 From: Michael Chihlas Date: Thu, 14 May 2026 19:25:50 -0400 Subject: [PATCH] test(welcome): align Router/Step1/Step2 stub routes with /home destination Post-refactor, WelcomeRouter and the Step1/Step2 "Skip-the-rest" handlers navigate to /home, but the MemoryRouter test stubs still mounted the "dashboard" marker at /. Update the stub routes (and matching it() titles) so the assertions resolve. Co-Authored-By: Claude Opus 4.7 (1M context) --- frontend/src/pages/welcome/__tests__/WelcomeRouter.test.tsx | 6 +++--- frontend/src/pages/welcome/__tests__/WelcomeStep1.test.tsx | 4 ++-- frontend/src/pages/welcome/__tests__/WelcomeStep2.test.tsx | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/pages/welcome/__tests__/WelcomeRouter.test.tsx b/frontend/src/pages/welcome/__tests__/WelcomeRouter.test.tsx index 94c81f30..47a45626 100644 --- a/frontend/src/pages/welcome/__tests__/WelcomeRouter.test.tsx +++ b/frontend/src/pages/welcome/__tests__/WelcomeRouter.test.tsx @@ -39,7 +39,7 @@ function renderRouter() { step-1} /> step-2} /> step-3} /> - dashboard} /> + dashboard} /> , ) @@ -100,7 +100,7 @@ describe('WelcomeRouter', () => { }) }) - it('redirects to / when onboarding_step_completed >= 3', async () => { + it('redirects to /home when onboarding_step_completed >= 3', async () => { useAuthStore.setState({ user: makeUser({ onboarding_step_completed: 3 }), }) @@ -110,7 +110,7 @@ describe('WelcomeRouter', () => { }) }) - it('redirects to / when onboarding_dismissed is true', async () => { + it('redirects to /home when onboarding_dismissed is true', async () => { useAuthStore.setState({ user: makeUser({ onboarding_step_completed: 1, diff --git a/frontend/src/pages/welcome/__tests__/WelcomeStep1.test.tsx b/frontend/src/pages/welcome/__tests__/WelcomeStep1.test.tsx index 93483add..a067d171 100644 --- a/frontend/src/pages/welcome/__tests__/WelcomeStep1.test.tsx +++ b/frontend/src/pages/welcome/__tests__/WelcomeStep1.test.tsx @@ -65,7 +65,7 @@ function renderPage() { } /> step-2} /> - dashboard} /> + dashboard} /> , ) @@ -148,7 +148,7 @@ describe('WelcomeStep1', () => { }) }) - it('Skip-the-rest dismisses and navigates to /', async () => { + it('Skip-the-rest dismisses and navigates to /home', async () => { const user = userEvent.setup() renderPage() diff --git a/frontend/src/pages/welcome/__tests__/WelcomeStep2.test.tsx b/frontend/src/pages/welcome/__tests__/WelcomeStep2.test.tsx index 57b2a9bd..3cb5c9ef 100644 --- a/frontend/src/pages/welcome/__tests__/WelcomeStep2.test.tsx +++ b/frontend/src/pages/welcome/__tests__/WelcomeStep2.test.tsx @@ -66,7 +66,7 @@ function renderPage() { } /> step-3} /> integrations} /> - dashboard} /> + dashboard} /> , ) @@ -158,7 +158,7 @@ describe('WelcomeStep2', () => { expect(screen.queryByTestId('welcome-step-2-connect-now')).not.toBeInTheDocument() }) - it('Skip-the-rest dismisses and navigates to /', async () => { + it('Skip-the-rest dismisses and navigates to /home', async () => { const user = userEvent.setup() renderPage()