Skip to content

Remove material imports from navigator_on_did_remove_page_test and scrollable_in_overlay_test#182546

Merged
auto-submit[bot] merged 3 commits into
flutter:masterfrom
apoorvdarshan:move-tests-to-material
May 1, 2026
Merged

Remove material imports from navigator_on_did_remove_page_test and scrollable_in_overlay_test#182546
auto-submit[bot] merged 3 commits into
flutter:masterfrom
apoorvdarshan:move-tests-to-material

Conversation

@apoorvdarshan

@apoorvdarshan apoorvdarshan commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replaced MaterialPage/MaterialPageRoute with a local _TestPage/PageRouteBuilder in navigator_on_did_remove_page_test.dart
  • Replaced TabBar/TabController/MaterialApp/Material with SingleChildScrollView/Directionality in scrollable_in_overlay_test.dart
  • Removed both files from the cross-import allowlist in check_tests_cross_imports.dart

Part of #177414

Test plan

@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. f: routes Navigator, Router, and related APIs. labels Feb 18, 2026
@google-cla

google-cla Bot commented Feb 18, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the test suite by moving two test files, navigator_on_did_remove_page_test.dart and scrollable_in_overlay_test.dart, from packages/flutter/test/widgets/ to packages/flutter/test/material/. This relocation aligns the tests with the Material components they verify, such as MaterialPage and MaterialApp. The pull request consists only of file moves, with no changes to the code logic.

Comment thread packages/flutter/test/widgets/scrollable_in_overlay_test.dart
@github-actions github-actions Bot removed the f: material design flutter/packages/flutter/material repository. label Feb 18, 2026
@apoorvdarshan apoorvdarshan changed the title Move misplaced Material tests from test/widgets/ to test/material/ Remove material imports from navigator_on_did_remove_page_test and scrollable_in_overlay_test Feb 18, 2026
@apoorvdarshan

Copy link
Copy Markdown
Contributor Author

@navaronbracke Thanks for the review! I've updated the PR based on your feedback:

  • navigator_on_did_remove_page_test.dart: Replaced MaterialPage/MaterialPageRoute with a local _TestPage using PageRouteBuilder instead of moving the file.
  • scrollable_in_overlay_test.dart: Replaced TabBar/MaterialApp with SingleChildScrollView/Directionality instead of moving the file.

Both files now import package:flutter/widgets.dart instead of package:flutter/material.dart, and they've been removed from the cross-import allowlist.

justinmc
justinmc previously approved these changes Feb 25, 2026

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 . Thanks for helping out with this!

@justinmc

Copy link
Copy Markdown
Contributor

@apoorvdarshan Heads up there are failures on this PR, can you fix them so we can land this?

@apoorvdarshan apoorvdarshan force-pushed the move-tests-to-material branch 2 times, most recently from 0538e0c to ff3dd73 Compare March 11, 2026 09:50
@apoorvdarshan apoorvdarshan requested a review from justinmc March 11, 2026 09:51
@Piinks

Piinks commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

It looks like there is still an analyzer failure here.

@apoorvdarshan apoorvdarshan force-pushed the move-tests-to-material branch from ff3dd73 to b2a95fb Compare March 17, 2026 23:07
…nd scrollable_in_overlay_test

Instead of moving tests to test/material/, fix the Material dependencies
in-place:
- Replace MaterialPage/MaterialPageRoute with _TestPage/PageRouteBuilder
  in navigator_on_did_remove_page_test.dart
- Replace TabBar/MaterialApp with SingleChildScrollView/Directionality
  in scrollable_in_overlay_test.dart
- Remove both files from the cross-import allowlist
@apoorvdarshan apoorvdarshan force-pushed the move-tests-to-material branch from b2a95fb to 13d073a Compare March 17, 2026 23:12
justinmc
justinmc previously approved these changes Apr 9, 2026

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re LGTM 👍

…erial

# Conflicts:
#	dev/bots/check_tests_cross_imports.dart
#	packages/flutter/test/widgets/navigator_on_did_remove_page_test.dart
@github-actions github-actions Bot removed the f: routes Navigator, Router, and related APIs. label Apr 21, 2026
@apoorvdarshan

Copy link
Copy Markdown
Contributor Author

Rebased onto latest master and resolved conflicts.

Notes on the resolution:

  • dev/bots/check_tests_cross_imports.dart: the branch's base had a handful of entries that have since been fixed and removed upstream (image_filter_test, baseline_test, editable_text_show_on_screen_test, system_context_menu_test, scrollable_fling_test, snapshot_widget_test). Dropped those so the _differencePaths check doesn't fail.
  • packages/flutter/test/widgets/navigator_on_did_remove_page_test.dart: upstream already removed the Material dependency here using the new shared TestPage helper from test_page_tester.dart. Took that version rather than keeping the local _TestPage duplicate.
  • scrollable_in_overlay_test.dart refactor (TabBar/MaterialAppSingleChildScrollView/Directionality) is preserved and is now the only net change this PR adds on top of master.

PTAL when convenient.

@justinmc justinmc self-requested a review April 21, 2026 22:33

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@justinmc justinmc added the CICD Run CI/CD label Apr 29, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 29, 2026
@justinmc justinmc added the CICD Run CI/CD label Apr 30, 2026
@victorsanni victorsanni added autosubmit Merge PR when tree becomes green via auto submit App override code freeze Override an active code freeze. labels Apr 30, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 30, 2026
@auto-submit

auto-submit Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/182546, because This PR has not met approval requirements for merging. Changes were requested by {navaronbracke}, please make the needed changes and resubmit this PR.
The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a member of flutter-hackers before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@navaronbracke navaronbracke added the autosubmit Merge PR when tree becomes green via auto submit App label May 1, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue May 1, 2026
Merged via the queue into flutter:master with commit c6b590b May 1, 2026
181 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label May 1, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Test cross-imports Review Queue May 1, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request May 1, 2026
Roll Flutter from 81bc3d69535f to 707dbc0420a3 (85 revisions)

flutter/flutter@81bc3d6...707dbc0

2026-05-01 [email protected] Removing TODOs from the WebParagraph code and addressing technical debts. (flutter/flutter#185168)
2026-05-01 [email protected] Ensure that vulkan_interface.h gets included before vk_mem_alloc.h (flutter/flutter#185777)
2026-05-01 [email protected] [flutter_tools] Bump dwds dependency to v27.1.1 (flutter/flutter#185357)
2026-05-01 [email protected] Roll Dart SDK from 6d4a319cbdac to 9aa7097f2e3e (3 revisions) (flutter/flutter#185888)
2026-05-01 [email protected] Roll Skia from fa1dcb289709 to 7ac6d42f2fd0 (1 revision) (flutter/flutter#185887)
2026-05-01 [email protected] Roll Skia from 54cc00adde38 to fa1dcb289709 (3 revisions) (flutter/flutter#185880)
2026-05-01 [email protected] [iOS] Migrate to FlutterFMLTaskRunner(s) (flutter/flutter#185815)
2026-05-01 [email protected] Remove material imports from navigator_on_did_remove_page_test and scrollable_in_overlay_test (flutter/flutter#182546)
2026-05-01 [email protected] Roll Skia from 2e279266f06a to 54cc00adde38 (3 revisions) (flutter/flutter#185872)
2026-05-01 [email protected] dev: Remove unused parameters (flutter/flutter#185345)
2026-05-01 [email protected] Roll Fuchsia Linux SDK from HN5VYzftnf_B8T-n9... to VnzuUefDQR0UhQ1L1... (flutter/flutter#185870)
2026-05-01 [email protected] Use g_free when using glib memory allocation (flutter/flutter#185519)
2026-05-01 [email protected] Roll Dart SDK from d30df3428f2e to 6d4a319cbdac (2 revisions) (flutter/flutter#185862)
2026-05-01 [email protected] Remove trivial test utility cross-imports from material and cupertino… (flutter/flutter#184295)
2026-05-01 [email protected] Inline test callback painter in tab scaffold test (flutter/flutter#184851)
2026-05-01 [email protected] [a11y] Add support for high contrast themes in the a11y assessments app  (flutter/flutter#185801)
2026-05-01 [email protected] [a11y assessment app] Use default color for banner (flutter/flutter#185804)
2026-04-30 [email protected] Added name to AUTHORS (flutter/flutter#185586)
2026-04-30 [email protected] Remove semantics_tester import from raw_material_button_test.dart (flutter/flutter#184806)
2026-04-30 [email protected] Remove semantics_tester import from user_accounts_drawer_header_test.dart (flutter/flutter#184809)
2026-04-30 [email protected] Roll Skia from 7b88c5c281e5 to 2e279266f06a (5 revisions) (flutter/flutter#185854)
2026-04-30 [email protected] Handle symmetric rectangular and elliptical round super ellipses in the uber SDF renderer  (flutter/flutter#185695)
2026-04-30 [email protected] Match on process name before killing for SwiftPM (flutter/flutter#185774)
2026-04-30 [email protected] Sync CHANGELOG.md from stable (flutter/flutter#185838)
2026-04-30 [email protected] Roll Dart SDK from 25910e31a6d2 to d30df3428f2e (5 revisions) (flutter/flutter#185839)
2026-04-30 [email protected] Check cross imports test subfolders (flutter/flutter#185493)
2026-04-30 [email protected] test: inline TestCallbackPainter in cupertino/picker_test.dart (flutter/flutter#185398)
2026-04-30 [email protected] Update customer testing version (flutter/flutter#185830)
2026-04-30 [email protected] Adapt the Metal shader library output list for debug versus release mode (flutter/flutter#185798)
2026-04-30 [email protected] [Impeller] Port a recent Vulkan swapchain fence waiting fix to the AHB version of the swapchain (flutter/flutter#185763)
2026-04-30 [email protected] Roll Skia from 26a59aa71eff to 7b88c5c281e5 (1 revision) (flutter/flutter#185821)
2026-04-30 [email protected] Roll Skia from 6b4167b4e204 to 26a59aa71eff (4 revisions) (flutter/flutter#185808)
2026-04-30 [email protected] [a11y] Mark SemanticsNode dirty when customSemanticsActions change  (flutter/flutter#185707)
2026-04-30 [email protected] Roll Skia from 1bd2f1cc2746 to 6b4167b4e204 (8 revisions) (flutter/flutter#185799)
2026-04-30 [email protected] [iOS] Extract FlutterVSyncClient from vsync_waiter_ios (flutter/flutter#185737)
2026-04-30 [email protected] Roll Fuchsia Linux SDK from nnv8-SSam6yE8dw4z... to HN5VYzftnf_B8T-n9... (flutter/flutter#185782)
2026-04-29 [email protected] [iOS] Soften TaskRunner.postTask(delay:task:) delay check (flutter/flutter#185729)
2026-04-29 [email protected] Add reportErrors to ImageStreamListener (flutter/flutter#180327)
2026-04-29 [email protected] Roll Skia from f5c781c083c7 to 1bd2f1cc2746 (5 revisions) (flutter/flutter#185761)
2026-04-29 [email protected] Update merge semantics logic to merge sibling nodes (flutter/flutter#183745)
2026-04-29 [email protected] Roll Packages from ba80f8f to cde5b36 (12 revisions) (flutter/flutter#185748)
2026-04-29 [email protected] examples: Remove unused parameters (flutter/flutter#185346)
2026-04-29 [email protected] Update TickerMode.getValuesNotifier to handle initialization during State.dispose (flutter/flutter#185248)
2026-04-29 [email protected] Update triage links (flutter/flutter#185714)
2026-04-29 [email protected] Add support for high contrast and color inversion on Android (flutter/flutter#182263)
2026-04-29 [email protected] Roll Skia from 05251260fda6 to f5c781c083c7 (2 revisions) (flutter/flutter#185743)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. override code freeze Override an active code freeze.

Projects

Development

Successfully merging this pull request may close these issues.

5 participants