carp-dk / carp-dk/carp_study_app
test: widget tests for the router redirect and consent gate
- Dominant language
- Dart
- Stars
- 10
- Forks
- 5
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 14
Description
## Problem
(verified) The redirect chain (`lib/carp_study_app.dart:35-64`) and consent gating (`lib/ui/pages/home_page.dart:41-70`) encode the app's entire onboarding correctness and are untested — these are the paths the boundary EPIC and #599 will rework.
## Proposed fix
Widget tests pumping `MaterialApp.router` with a faked bloc/coordinator: unauthenticated → /login; no study → /invitations; consent pending → consent page; configured → study page. Write them *before* the HomePage refactor as a safety net.
## Acceptance criteria
- [ ] Four redirect scenarios green pre- and post-refactor
**Effort:** M · **Priority:** P1 · **Change risk:** None
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.