1.1 KiB
1.1 KiB
title, status, type, created_at, updated_at, parent
| title | status | type | created_at | updated_at | parent |
|---|---|---|---|---|---|
| Integration tests for Runs & Encounters API | draft | task | 2026-02-10T09:33:21Z | 2026-02-10T09:33:21Z | nuzlocke-tracker-yzpb |
Write integration tests for the core run tracking and encounter API endpoints. This is the heart of the application.
Checklist
- Test run CRUD operations (create, list, get, update, delete)
- Test run creation with rules configuration (JSONB field)
- Test encounter logging on a run (create encounter on a route)
- Test encounter status changes (alive → dead, alive → retired, etc.)
- Test duplicate encounter prevention (dupes clause logic)
- Test shiny encounter handling
- Test egg encounter handling
- Test ending a run (completion/failure)
- Test error cases (encounter on invalid route, duplicate route encounters, etc.)
Notes
- Run endpoints:
backend/src/app/api/runs.py - Encounter endpoints:
backend/src/app/api/encounters.py - This is the most critical area — Nuzlocke rules enforcement should be thoroughly tested
- Tests need game + pokemon + route fixtures as prerequisites