test(welcome): align Router/Step1/Step2 stub routes with /home destination
Some checks failed
Mirror to GitHub / mirror (push) Failing after 5m5s
CI / frontend (pull_request) Successful in 6m24s
CI / backend (pull_request) Successful in 10m19s
CI / e2e (pull_request) Successful in 9m51s

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) <noreply@anthropic.com>
This commit is contained in:
2026-05-14 19:25:50 -04:00
parent 13f527c4ad
commit 86163a69aa
3 changed files with 7 additions and 7 deletions

View File

@@ -39,7 +39,7 @@ function renderRouter() {
<Route path="/welcome/step-1" element={<div>step-1</div>} />
<Route path="/welcome/step-2" element={<div>step-2</div>} />
<Route path="/welcome/step-3" element={<div>step-3</div>} />
<Route path="/" element={<div>dashboard</div>} />
<Route path="/home" element={<div>dashboard</div>} />
</Routes>
</MemoryRouter>,
)
@@ -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,

View File

@@ -65,7 +65,7 @@ function renderPage() {
<Routes>
<Route path="/welcome/step-1" element={<WelcomeStep1 />} />
<Route path="/welcome/step-2" element={<div>step-2</div>} />
<Route path="/" element={<div>dashboard</div>} />
<Route path="/home" element={<div>dashboard</div>} />
</Routes>
</MemoryRouter>,
)
@@ -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()

View File

@@ -66,7 +66,7 @@ function renderPage() {
<Route path="/welcome/step-2" element={<WelcomeStep2 />} />
<Route path="/welcome/step-3" element={<div>step-3</div>} />
<Route path="/account/integrations" element={<div>integrations</div>} />
<Route path="/" element={<div>dashboard</div>} />
<Route path="/home" element={<div>dashboard</div>} />
</Routes>
</MemoryRouter>,
)
@@ -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()