feat: Dashboard redesign tests (#196) #201

Closed
opened 2026-02-15 16:31:16 +00:00 by egullickson · 0 comments
Owner

Relates to #196

Summary

Add tests for the redesigned dashboard components and hooks. No dashboard tests exist currently -- this establishes test coverage for the new implementation.

Files

  • frontend/src/features/dashboard/hooks/__tests__/useDashboardData.test.ts -- hook tests
  • frontend/src/features/dashboard/components/__tests__/VehicleRosterCard.test.tsx -- card component tests
  • frontend/src/features/dashboard/components/__tests__/ActionBar.test.tsx -- action bar tests
  • frontend/src/features/dashboard/components/__tests__/DashboardScreen.test.tsx -- integration tests

Acceptance Criteria

  • Health computation tested: green/yellow/red thresholds with maintenance + document expiry data
  • Attention items sorting tested (overdue first, then by proximity)
  • VehicleRosterCard renders vehicle identity, health badge, attention items, odometer
  • VehicleRosterCard click navigates correctly
  • ActionBar renders both buttons and triggers navigation callbacks
  • DashboardScreen renders vehicle grid, handles empty state, shows loading skeletons
  • All tests pass: npm test
  • Linting passes: npm run lint
  • Type-check passes: npm run type-check
Relates to #196 ## Summary Add tests for the redesigned dashboard components and hooks. No dashboard tests exist currently -- this establishes test coverage for the new implementation. ## Files - `frontend/src/features/dashboard/hooks/__tests__/useDashboardData.test.ts` -- hook tests - `frontend/src/features/dashboard/components/__tests__/VehicleRosterCard.test.tsx` -- card component tests - `frontend/src/features/dashboard/components/__tests__/ActionBar.test.tsx` -- action bar tests - `frontend/src/features/dashboard/components/__tests__/DashboardScreen.test.tsx` -- integration tests ## Acceptance Criteria - [ ] Health computation tested: green/yellow/red thresholds with maintenance + document expiry data - [ ] Attention items sorting tested (overdue first, then by proximity) - [ ] VehicleRosterCard renders vehicle identity, health badge, attention items, odometer - [ ] VehicleRosterCard click navigates correctly - [ ] ActionBar renders both buttons and triggers navigation callbacks - [ ] DashboardScreen renders vehicle grid, handles empty state, shows loading skeletons - [ ] All tests pass: `npm test` - [ ] Linting passes: `npm run lint` - [ ] Type-check passes: `npm run type-check`
egullickson added the
status
backlog
type
feature
labels 2026-02-15 16:31:47 +00:00
egullickson added this to the Sprint 2026-02-02 milestone 2026-02-15 16:31:51 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: egullickson/motovaultpro#201