Skip to content

Deduplicate "TestPage" implementations in widget tests in the framework #181090

Description

@navaronbracke

In #180994 I noticed that there's a bunch of separate TestPage implementations scattered across tests. (IIRC both in tests/widgets and tests/material)

We should probably look into making one version and reuse it.

It looks like the following files all implement Page<T> with a TestPage class.

/test/material/will_pop_test.dart
/test/widgets/route_notification_messages_test.dart
/test/widgets/navigator_test.dart
/test/widgets/navigator_restoration_test.dart

https://github.com/search?q=repo%3Aflutter%2Fflutter%20%22TestPage%22&type=code

We can probably add one in the new utils file that is about to be added, see #180994 (review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.f: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions