# Testing Plan ## Unit tests ### Scoring - penalizes steep loose climbs for loaded gravel profile; - allows rougher segments for hardtail profile; - penalizes unknown access; - rewards official cycle routes; - increases severity for long water gaps; - detects no sleep options near target endpoint. ### Staging - splits route into daily ranges; - avoids impossible climbing days; - chooses endpoints with sleep candidates; - produces Plan B endpoints; - rebalances when one day exceeds constraints. ### POI corridor - finds POIs within buffer; - sorts by distance along route; - deduplicates overlapping sources; - computes detour distance; - respects category filters. ### Offline manifest - includes required layers; - records source versions; - flags stale data; - supports report sync queue. ## Integration tests - route planning provider returns normalized geometry; - stage planner consumes route geometry and POIs; - GPX export round-trips with common viewers; - API returns consistent warnings from fixtures; - map renders route/stages/POIs. ## Fixture tests Use sample fixtures in `examples/`: - simple 2-day route, - remote route with water gap, - route with uncertain access, - route with sleep endpoints, - route with steep rough segment. ## Manual QA scenarios 1. Plan 3-day trip with campsites only. 2. Plan 5-day trip with indoor sleep every third night. 3. Import GPX and ask app to stage it. 4. Download offline pack and simulate airplane mode. 5. Submit water-unavailable report offline and sync later. 6. Export GPX and import into Garmin Connect or another route viewer. 7. Check that legal/rule warnings show source and uncertainty.