30 lines
1.3 KiB
Markdown
30 lines
1.3 KiB
Markdown
---
|
|
# nuzlocke-tracker-1guz
|
|
title: Component tests for key frontend components
|
|
status: draft
|
|
type: task
|
|
created_at: 2026-02-10T09:33:45Z
|
|
updated_at: 2026-02-10T09:33:45Z
|
|
parent: nuzlocke-tracker-yzpb
|
|
---
|
|
|
|
Write component tests for the most important frontend React components, focusing on user interactions and rendering correctness.
|
|
|
|
## Checklist
|
|
|
|
- [ ] Test `EncounterModal` — form submission, validation, Pokemon selection
|
|
- [ ] Test `StatusChangeModal` — status transitions, confirmation flow
|
|
- [ ] Test `EndRunModal` — run completion/failure flow
|
|
- [ ] Test `GameGrid` — game selection rendering, click handling
|
|
- [ ] Test `RulesConfiguration` — rules toggle interactions, state management
|
|
- [ ] Test `Layout` — navigation rendering, responsive behavior
|
|
- [ ] Test admin form modals (GameFormModal, RouteFormModal, PokemonFormModal) — CRUD form flows
|
|
- [ ] Test `AdminTable` — sorting, filtering, action buttons
|
|
|
|
## Notes
|
|
|
|
- Focus on user-facing behavior, not implementation details
|
|
- Use @testing-library/user-event for simulating clicks, typing, etc.
|
|
- Mock API responses for components that fetch data
|
|
- Don't aim for 100% coverage — prioritise the most complex/interactive components
|
|
- Page components (RunEncounters, RunDashboard, etc.) are large and complex — consider testing their sub-components instead |