Skip to content

Add a unit test for the useGuidedTour step progression and persistence#1116

Merged
1nonlypiece merged 1 commit into
Commitlabs-Org:masterfrom
Baskarayelu:issue-984
Jun 29, 2026
Merged

Add a unit test for the useGuidedTour step progression and persistence#1116
1nonlypiece merged 1 commit into
Commitlabs-Org:masterfrom
Baskarayelu:issue-984

Conversation

@Baskarayelu

Copy link
Copy Markdown
Contributor

Closes #984

Summary

  • Add src/hooks/__tests__/useGuidedTour.test.ts with 12 focused test cases covering step progression and localStorage persistence
  • Tests cover: auto-start on fresh visit, no auto-start when tour previously seen, next/prev navigation, bounds (cannot go below 0, ends tour past last step), wizard-step boundary transitions, skip from any step, corrupted persisted value, startTour reset, currentStepConfig correctness, and totalSteps count
  • localStorage mocked via jsdom happy-dom environment; fetch stubbed with vi.stubGlobal

Test plan

  • pnpm test src/hooks/__tests__/useGuidedTour.test.ts passes green
  • No regressions against existing test suites

🤖 Generated with Claude Code

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

@Baskarayelu is attempting to deploy a commit to the 1nonly's projects Team on Vercel.

A member of the Team first needs to authorize it.

@1nonlypiece 1nonlypiece merged commit 01acab8 into Commitlabs-Org:master Jun 29, 2026
2 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a unit test for the useGuidedTour step progression and persistence

2 participants