Skip to content

test: widget tests for the router redirect and consent gate #646

Description

@Zeroupper

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions