Skip to content

Refactor: remove material from autocomplete_test, scrollable_restoration_test, semantics_tester_generate_test_semantics_expression_for_current_semantics_tree_test#184615

Merged
auto-submit[bot] merged 1 commit into
flutter:masterfrom
rkishan516:simple-cross-imports-7
Apr 8, 2026

Conversation

@rkishan516

Copy link
Copy Markdown
Contributor

This PR removes Material imports from autocomplete_test, scrollable_restoration_test, semantics_tester_generate_test_semantics_expression_for_current_semantics_tree_test.

part of: #177415

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@github-actions github-actions Bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) f: scrolling Viewports, list views, slivers, etc. labels Apr 4, 2026

@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 removes several test files from the cross-import allowlist and adds an onSubmitted callback to the TestTextField utility. It refactors scrollable_restoration_test.dart and semantics_tester_generate_test_semantics_expression_for_current_semantics_tree_test.dart to use TestHarness and TestWidgetsApp instead of MaterialApp, and replaces SliverAppBar with a custom SliverPersistentHeader. Feedback was provided to improve the shouldRebuild implementation in the newly added _TestHeaderDelegate by comparing layout-affecting properties instead of returning a constant value.

}

@override
bool shouldRebuild(covariant SliverPersistentHeaderDelegate oldDelegate) => false;

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.

medium

For better adherence to the SliverPersistentHeaderDelegate contract, shouldRebuild should ideally check if the properties that affect the layout (like minExtent and maxExtent) have changed, even in a test helper.

  bool shouldRebuild(_TestHeaderDelegate oldDelegate) {
    return oldDelegate.minExtent != minExtent || oldDelegate.maxExtent != maxExtent;
  }
References
  1. Code should follow the guidance and principles described in the Flutter contribution guide, which includes writing robust code even for tests. (link)

@rkishan516 rkishan516 added the CICD Run CI/CD label Apr 4, 2026
@rkishan516 rkishan516 force-pushed the simple-cross-imports-7 branch from 3dc7ebd to 323fb29 Compare April 5, 2026 12:07
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 5, 2026
@rkishan516 rkishan516 added the CICD Run CI/CD label Apr 5, 2026
victorsanni
victorsanni previously approved these changes Apr 6, 2026
Comment thread packages/flutter/test/widgets/autocomplete_test.dart Outdated
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 7, 2026
@rkishan516 rkishan516 added the CICD Run CI/CD label Apr 7, 2026
victorsanni
victorsanni previously approved these changes Apr 7, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 7, 2026
@rkishan516 rkishan516 added the CICD Run CI/CD label Apr 7, 2026
@flutter-dashboard

Copy link
Copy Markdown

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #184615 at sha ba6533f

@flutter-dashboard flutter-dashboard Bot added the will affect goldens Changes to golden files label Apr 7, 2026
@rkishan516 rkishan516 force-pushed the simple-cross-imports-7 branch from ba6533f to e6690ae Compare April 8, 2026 15:26
@rkishan516 rkishan516 added CICD Run CI/CD and removed CICD Run CI/CD labels Apr 8, 2026
…ion_test, semantics_tester_generate_test_semantics_expression_for_current_semantics_tree_test
@rkishan516 rkishan516 force-pushed the simple-cross-imports-7 branch from e6690ae to 87a3bc5 Compare April 8, 2026 15:46
@rkishan516 rkishan516 added CICD Run CI/CD and removed CICD Run CI/CD labels Apr 8, 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 👍

@justinmc justinmc added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 8, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Apr 8, 2026
Merged via the queue into flutter:master with commit 894e391 Apr 8, 2026
163 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 8, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 9, 2026
…e_restoration_test, semantics_tester_generate_test_semantics_expression_for_current_semantics_tree_test (flutter/flutter#184615)
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Apr 9, 2026
flutter/flutter@05e0ae0...81c87ea

2026-04-09 katelovett@google.com Remove last material dependency from cupertino tests (flutter/flutter#184781)
2026-04-09 engine-flutter-autoroll@skia.org Roll Skia from 7c46cb639dba to 4d0f5389e131 (7 revisions) (flutter/flutter#184812)
2026-04-09 goderbauer@google.com Make `windowing_test` follow repo analyzer rules (flutter/flutter#184752)
2026-04-09 116356835+AbdeMohlbi@users.noreply.github.com Improve documentation of `frictionFactor` function (flutter/flutter#184509)
2026-04-09 engine-flutter-autoroll@skia.org Roll Skia from d2b0bd12576a to 7c46cb639dba (1 revision) (flutter/flutter#184796)
2026-04-09 engine-flutter-autoroll@skia.org Roll Fuchsia GN SDK from JLBh4Z9PKsjIJcqDU... to SEfYx3xgueX3aFAY3... (flutter/flutter#184797)
2026-04-09 katelovett@google.com Fixed freeze flow (flutter/flutter#184793)
2026-04-09 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#184795)
2026-04-09 engine-flutter-autoroll@skia.org Roll Skia from e9ed4fc9f154 to d2b0bd12576a (36 revisions) (flutter/flutter#184791)
2026-04-08 43054281+camsim99@users.noreply.github.com [Android] Allow sensitive content to gracefully fail when unregistering host before registering (flutter/flutter#184789)
2026-04-08 34465683+rkishan516@users.noreply.github.com Refactor: remove material from autocomplete_test, scrollable_restoration_test, semantics_tester_generate_test_semantics_expression_for_current_semantics_tree_test (flutter/flutter#184615)
2026-04-08 jmccandless@google.com Warn about the use of TestSemantics (flutter/flutter#184369)
2026-04-08 katelovett@google.com Change freeze flow to pull_request_target (flutter/flutter#184785)
2026-04-08 1063596+reidbaker@users.noreply.github.com Update to the beta dart version for 3.44 branch cut.  (flutter/flutter#184770)
2026-04-08 737941+loic-sharma@users.noreply.github.com [Dot shorthands] Migrate examples/api/test (flutter/flutter#183966)
2026-04-08 rmacnak@google.com [fuchsia] Give AOT runners the ability to copy FFI callback thunks. (flutter/flutter#184696)
2026-04-08 victorsanniay@gmail.com Add await or ignore lint to invokeMethod callsites (flutter/flutter#182870)
2026-04-08 robert.ancell@canonical.com Correctly handle failure to read /proc/self/exe link (flutter/flutter#184700)
2026-04-08 engine-flutter-autoroll@skia.org Roll Skia from e264d870a380 to e9ed4fc9f154 (11 revisions) (flutter/flutter#184713)
2026-04-08 engine-flutter-autoroll@skia.org Roll Packages from 5299279 to 0e0a032 (5 revisions) (flutter/flutter#184720)
2026-04-08 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#184772)
2026-04-08 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 1rcChbOv4nSTVkUxs... to pDXMXRIjEHTw7B0sk... (flutter/flutter#184722)
2026-04-08 73785960+xfce0@users.noreply.github.com Remove navigator_utils cross-imports from cupertino tests (flutter/flutter#184282)
2026-04-08 victorsanniay@gmail.com Even more awaits v2 (flutter/flutter#184552)
2026-04-08 15619084+vashworth@users.noreply.github.com Allow personal skills to be gitignored (flutter/flutter#184727)
2026-04-08 dacoharkes@google.com [ci] mac_arm64 build_test re-enable shard 1 presubmit (flutter/flutter#184751)
2026-04-08 katelovett@google.com Fix repo check on code freeze (flutter/flutter#184771)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
mbcorona pushed a commit to mbcorona/flutter that referenced this pull request Apr 15, 2026
…ion_test, semantics_tester_generate_test_semantics_expression_for_current_semantics_tree_test (flutter#184615)

This PR removes Material imports from autocomplete_test,
scrollable_restoration_test,
semantics_tester_generate_test_semantics_expression_for_current_semantics_tree_test.

part of: flutter#177415

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
@rkishan516 rkishan516 deleted the simple-cross-imports-7 branch May 16, 2026 06:16
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…r#11477)

flutter/flutter@05e0ae0...81c87ea

2026-04-09 katelovett@google.com Remove last material dependency from cupertino tests (flutter/flutter#184781)
2026-04-09 engine-flutter-autoroll@skia.org Roll Skia from 7c46cb639dba to 4d0f5389e131 (7 revisions) (flutter/flutter#184812)
2026-04-09 goderbauer@google.com Make `windowing_test` follow repo analyzer rules (flutter/flutter#184752)
2026-04-09 116356835+AbdeMohlbi@users.noreply.github.com Improve documentation of `frictionFactor` function (flutter/flutter#184509)
2026-04-09 engine-flutter-autoroll@skia.org Roll Skia from d2b0bd12576a to 7c46cb639dba (1 revision) (flutter/flutter#184796)
2026-04-09 engine-flutter-autoroll@skia.org Roll Fuchsia GN SDK from JLBh4Z9PKsjIJcqDU... to SEfYx3xgueX3aFAY3... (flutter/flutter#184797)
2026-04-09 katelovett@google.com Fixed freeze flow (flutter/flutter#184793)
2026-04-09 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#184795)
2026-04-09 engine-flutter-autoroll@skia.org Roll Skia from e9ed4fc9f154 to d2b0bd12576a (36 revisions) (flutter/flutter#184791)
2026-04-08 43054281+camsim99@users.noreply.github.com [Android] Allow sensitive content to gracefully fail when unregistering host before registering (flutter/flutter#184789)
2026-04-08 34465683+rkishan516@users.noreply.github.com Refactor: remove material from autocomplete_test, scrollable_restoration_test, semantics_tester_generate_test_semantics_expression_for_current_semantics_tree_test (flutter/flutter#184615)
2026-04-08 jmccandless@google.com Warn about the use of TestSemantics (flutter/flutter#184369)
2026-04-08 katelovett@google.com Change freeze flow to pull_request_target (flutter/flutter#184785)
2026-04-08 1063596+reidbaker@users.noreply.github.com Update to the beta dart version for 3.44 branch cut.  (flutter/flutter#184770)
2026-04-08 737941+loic-sharma@users.noreply.github.com [Dot shorthands] Migrate examples/api/test (flutter/flutter#183966)
2026-04-08 rmacnak@google.com [fuchsia] Give AOT runners the ability to copy FFI callback thunks. (flutter/flutter#184696)
2026-04-08 victorsanniay@gmail.com Add await or ignore lint to invokeMethod callsites (flutter/flutter#182870)
2026-04-08 robert.ancell@canonical.com Correctly handle failure to read /proc/self/exe link (flutter/flutter#184700)
2026-04-08 engine-flutter-autoroll@skia.org Roll Skia from e264d870a380 to e9ed4fc9f154 (11 revisions) (flutter/flutter#184713)
2026-04-08 engine-flutter-autoroll@skia.org Roll Packages from 5299279 to 0e0a032 (5 revisions) (flutter/flutter#184720)
2026-04-08 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#184772)
2026-04-08 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 1rcChbOv4nSTVkUxs... to pDXMXRIjEHTw7B0sk... (flutter/flutter#184722)
2026-04-08 73785960+xfce0@users.noreply.github.com Remove navigator_utils cross-imports from cupertino tests (flutter/flutter#184282)
2026-04-08 victorsanniay@gmail.com Even more awaits v2 (flutter/flutter#184552)
2026-04-08 15619084+vashworth@users.noreply.github.com Allow personal skills to be gitignored (flutter/flutter#184727)
2026-04-08 dacoharkes@google.com [ci] mac_arm64 build_test re-enable shard 1 presubmit (flutter/flutter#184751)
2026-04-08 katelovett@google.com Fix repo check on code freeze (flutter/flutter#184771)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: text input Entering text in a text field or keyboard related problems CICD Run CI/CD f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants