test(sidebar): add coverage for collapse persistence and nav states#731
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new unit test suite for the Sidebar component to validate persisted collapse state, active/highlight nav styling, and expected navigation structure.
Changes:
- Added
Sidebarunit tests for localStorage-backed collapse persistence and toggle interactions. - Added tests asserting active route styling/indicators and highlight styling behavior.
- Introduced test-only mocks for
framer-motionandThemeToggleto isolate sidebar behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi @utksh1, Implemented the requested Sidebar test coverage for collapse persistence and navigation states. All CI checks are now passing successfully. Test coverage includes:
Requesting review when convenient. Thank you! |
utksh1
left a comment
There was a problem hiding this comment.
Scoped frontend test coverage for Sidebar collapse persistence and navigation states. CI is green on the reviewed head; approved pending branch update and fresh checks.
utksh1
left a comment
There was a problem hiding this comment.
Re-approving current head after the normal branch update. The PR remains scoped to Sidebar unit coverage and all fresh checks are green.
utksh1
left a comment
There was a problem hiding this comment.
Approved current head after addressing the unresolved review threads. The Sidebar test suite now uses ESM-safe mocks, user-event interactions, and behavior-oriented active-route assertions. Fresh CI is green.
Description
This PR adds direct unit test coverage for the Sidebar component.
Changes included:
The tests focus on user-visible behavior and state persistence rather than animation or motion implementation details.
Related Issues
Fixes #556
Type of Change
How Has This Been Tested?
Executed:
npm --prefix frontend test -- Sidebar.test.tsx npm run typecheck npm run qualityResults:
Verified that:
Checklist