Test coverage: WelcomeStep2 "Connect now" path #171

Open
opened 2026-05-14 04:55:13 +00:00 by chihlasm · 0 comments
Owner

PR #168 reshaped the welcome step-2 PSA CTA from a single Continue + tiny Connect now → link into an explicit two-button split (Connect <PSA> now + Connect later). Existing tests in frontend/src/pages/welcome/__tests__/WelcomeStep2.test.tsx still pass because the welcome-step-2-connect-now testid is reused, but they only assert that the connect-now element exists — none of them exercise the new path:

  • Click welcome-step-2-tile-connectwise → click welcome-step-2-connect-now
  • Assert onboardingApi.updateStep called with {step: 2, action: 'complete', data: {primary_psa: 'connectwise'}}
  • Assert navigation to /account/integrations (route stub already exists in the test harness on line 68)

Also worth adding: a regression test that the welcome-step-2-connect-now button is hidden when primary_psa === 'none' (existing assertion just checks the testid isn't present, but should also verify the wider button row layout — only Continue + Skip this step rendered).

Small — single test file edit.

PR #168 reshaped the welcome step-2 PSA CTA from a single Continue + tiny `Connect now →` link into an explicit two-button split (`Connect <PSA> now` + `Connect later`). Existing tests in `frontend/src/pages/welcome/__tests__/WelcomeStep2.test.tsx` still pass because the `welcome-step-2-connect-now` testid is reused, but they only assert that the connect-now element exists — none of them exercise the new path: - Click `welcome-step-2-tile-connectwise` → click `welcome-step-2-connect-now` - Assert `onboardingApi.updateStep` called with `{step: 2, action: 'complete', data: {primary_psa: 'connectwise'}}` - Assert navigation to `/account/integrations` (route stub already exists in the test harness on line 68) Also worth adding: a regression test that the `welcome-step-2-connect-now` button is hidden when `primary_psa === 'none'` (existing assertion just checks the testid isn't present, but should also verify the wider button row layout — only `Continue` + `Skip this step` rendered). Small — single test file edit.
Sign in to join this conversation.