1.6 KiB
1.6 KiB
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
- Plan 3-day trip with campsites only.
- Plan 5-day trip with indoor sleep every third night.
- Import GPX and ask app to stage it.
- Download offline pack and simulate airplane mode.
- Submit water-unavailable report offline and sync later.
- Export GPX and import into Garmin Connect or another route viewer.
- Check that legal/rule warnings show source and uncertainty.