Skip to content

[Test cross imports] No material in test/foundation, test/gestures, test/semantics, test/services#186144

Merged
auto-submit[bot] merged 18 commits into
flutter:masterfrom
navaronbracke:no_material_in_misc_tests
May 13, 2026
Merged

[Test cross imports] No material in test/foundation, test/gestures, test/semantics, test/services#186144
auto-submit[bot] merged 18 commits into
flutter:masterfrom
navaronbracke:no_material_in_misc_tests

Conversation

@navaronbracke

Copy link
Copy Markdown
Contributor

This PR fixes the cross imports under

  • flutter/test/foundation
  • flutter/test/gestures
  • flutter/test/semantics
  • flutter/test/services

and some from flutter/test/painting

Part of #177028

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 6, 2026
@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. a: animation Animation APIs a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) f: gestures flutter/packages/flutter/gestures repository. labels May 6, 2026
@navaronbracke navaronbracke changed the title No material in misc tests No material in test/foundation, test/gestures, test/semantics, test/services May 6, 2026
@navaronbracke navaronbracke changed the title No material in test/foundation, test/gestures, test/semantics, test/services [Test cross imports] No material in test/foundation, test/gestures, test/semantics, test/services May 6, 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 updates several test files to replace 'MaterialApp' with 'TestWidgetsApp' or 'Directionality' to reduce dependencies, and standardizes color usage by introducing local constants. Review comments suggest defining additional color constants (kWhite, kBlack) in 'box_painter_test.dart' for consistency, using 'TestWidgetsApp' in 'gesture_config_regression_test.dart' for better test environment alignment, and investigating a potential regression in 'system_context_menu_controller_test.dart' where the number of default context menu items increased unexpectedly.

Comment on lines +14 to +18
const kAmber = Color(0xFFFFC107);
const kGreen = Color(0xFF4CAF50);
const kRed = Color(0xFFF44336);
const kGrey = Color(0xFF9E9E9E);
const kPurple = Color(0xFF9C27B0);

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 consistency and better readability, consider adding kWhite and kBlack constants here, as you have done for other colors used in this test file.

  const kAmber = Color(0xFFFFC107);
  const kGreen = Color(0xFF4CAF50);
  const kRed = Color(0xFFF44336);
  const kGrey = Color(0xFF9E9E9E);
  const kPurple = Color(0xFF9C27B0);
  const kWhite = Color(0xFFFFFFFF);
  const kBlack = Color(0xFF000000);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

black & white are easy to scan through, so I left those inline

Comment thread packages/flutter/test/painting/box_painter_test.dart
Comment thread packages/flutter/test/painting/box_painter_test.dart
Comment thread packages/flutter/test/gestures/gesture_config_regression_test.dart
Comment on lines +506 to +510
expect(defaultItems, hasLength(4));
expect(defaultItems[0], const IOSSystemContextMenuItemCut());
expect(defaultItems[1], const IOSSystemContextMenuItemCopy());
expect(defaultItems[2], const IOSSystemContextMenuItemPaste());
expect(defaultItems[3], const IOSSystemContextMenuItemSelectAll());

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

The number of default items has increased from 2 to 4, now including 'Cut' and 'Copy'. This change in test expectation suggests that the EditableText state now reports these actions as enabled, whereas they were previously disabled. This change appears to be a side effect of replacing MaterialApp and materialTextSelectionHandleControls with TestWidgetsApp and emptyTextSelectionControls. If the test scenario is intended to have a collapsed selection, 'Cut' and 'Copy' should not be present. Please ensure that this new behavior is intentional and that the test is still verifying the correct logic for system context menu items.

@navaronbracke
navaronbracke requested a review from justinmc May 6, 2026 12:43
matchesGoldenFile('LiveBinding.press.animation.png'),
);
// Currently skipped due to daily flake: https://github.com/flutter/flutter/issues/87588
}, skip: true); // Typically skip: isBrowser https://github.com/flutter/flutter/issues/42767

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The skip apparently still applies, so I just left it as is here.

home: NestedDraggableCase(testResult: result),
),
);
await tester.pumpWidget(TestWidgetsApp(home: NestedDraggableCase(testResult: result)));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This one needs an overlay, hence TestWidgetsApp

children: <TestSemantics>[
TestSemantics(
id: 3,
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],

@navaronbracke navaronbracke May 6, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As discussed in PR's from before: TestWidgetsApp lacks a scopes route

expect(defaultItems, hasLength(2));
expect(defaultItems[1], const IOSSystemContextMenuItemSelectAll());
expect(defaultItems.first, const IOSSystemContextMenuItemPaste());
expect(defaultItems, hasLength(4));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think this updated test expectation makes sense? We also have testTextSelectionControls, though. Thoughts?

editableTextState,
);
expect(defaultItems, hasLength(2));
expect(defaultItems[1], const IOSSystemContextMenuItemSelectAll());

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

1 comes after 0 :)

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label May 12, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue May 12, 2026
Merged via the queue into flutter:master with commit 6d89752 May 13, 2026
170 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label May 13, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request May 15, 2026
…11713)

Manual roll requested by [email protected]

flutter/flutter@23f6f58...0541913

2026-05-14 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Windows] Propagate the enabled accessibility state (#184501)" (flutter/flutter#186492)
2026-05-13 [email protected] [dev] Use super parameters in missed spots (flutter/flutter#186193)
2026-05-13 [email protected] [Windows] Propagate the enabled accessibility state (flutter/flutter#184501)
2026-05-13 [email protected] [flutter_tool] filter out MotionEvent-JNI warning spam from logcat (#174783) (flutter/flutter#186079)
2026-05-13 [email protected] Roll Packages from 93cbed6 to 2ec2236 (1 revision) (flutter/flutter#186464)
2026-05-13 [email protected] [web] Fix untriaged issues link label (flutter/flutter#186465)
2026-05-13 [email protected] [Impeller] Namespace user-supplied shaders to prevent entrypoint collisions (flutter/flutter#186332)
2026-05-13 [email protected] [flutter_tools] Migrate detectLowCompileSdkVersionOrNdkVersion to AGP task (flutter/flutter#184731)
2026-05-13 [email protected] Update the Flutter Gallery web app template files to support running with Wasm (flutter/flutter#186268)
2026-05-13 [email protected] [web] Use heap allocation for buffers that would consume too much space on the Wasm stack (flutter/flutter#186228)
2026-05-13 [email protected] Roll Skia from 56ca5896c0d9 to 27f7bba22600 (3 revisions) (flutter/flutter#186444)
2026-05-13 [email protected] Roll Fuchsia Linux SDK from z7ICmPtn4hspu02zk... to y6uQHA5xUN83IF395... (flutter/flutter#186442)
2026-05-13 [email protected] Roll Skia from 6385958d2feb to 56ca5896c0d9 (1 revision) (flutter/flutter#186441)
2026-05-13 [email protected] Roll Dart SDK from 9576691c37d8 to 8e30b88e4d5a (1 revision) (flutter/flutter#186429)
2026-05-13 [email protected] Roll Skia from 77a21bc723dc to 6385958d2feb (9 revisions) (flutter/flutter#186428)
2026-05-13 [email protected] Docs/improving docs for semantics UI lib (flutter/flutter#186125)
2026-05-12 [email protected] [Tool] Support glob patterns when parsing workspaces in FlutterProject (flutter/flutter#185715)
2026-05-12 [email protected] docs: fix overriden -> overridden in MediaQueryData dartdoc (flutter/flutter#186323)
2026-05-12 [email protected] [Test cross imports] No material in `test/foundation`, `test/gestures`, `test/semantics`, `test/services` (flutter/flutter#186144)
2026-05-12 [email protected] docs: fix "tha" -> "that" typo in widget_inspector_test comment (flutter/flutter#186322)
2026-05-12 [email protected] docs: Fix doubled-word typos in framework dartdoc (flutter/flutter#186319)
2026-05-12 [email protected] Roll pub packages (flutter/flutter#186418)
2026-05-12 [email protected] Bumped required mediatek vender sdk version. (flutter/flutter#186405)
2026-05-12 [email protected] Make DeepLinkJsonFromManifestTask Gradle task build cacheable (flutter/flutter#185903)
2026-05-12 [email protected] Harden dev tooling scripts against command injection and log leaks (flutter/flutter#186076)
2026-05-12 [email protected] Roll pub packages (flutter/flutter#186274)
2026-05-12 [email protected] [Flutter GPU] Allow allocating multi-mip textures and overwriting specific (mip, slice) levels (flutter/flutter#185890)
2026-05-12 [email protected] [web] Fix MenuAnchor dismiss when semantics enabled (flutter/flutter#183093)

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 [email protected],[email protected] 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
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…lutter#11713)

Manual roll requested by [email protected]

flutter/flutter@23f6f58...0541913

2026-05-14 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Windows] Propagate the enabled accessibility state (#184501)" (flutter/flutter#186492)
2026-05-13 [email protected] [dev] Use super parameters in missed spots (flutter/flutter#186193)
2026-05-13 [email protected] [Windows] Propagate the enabled accessibility state (flutter/flutter#184501)
2026-05-13 [email protected] [flutter_tool] filter out MotionEvent-JNI warning spam from logcat (#174783) (flutter/flutter#186079)
2026-05-13 [email protected] Roll Packages from 93cbed6 to 2ec2236 (1 revision) (flutter/flutter#186464)
2026-05-13 [email protected] [web] Fix untriaged issues link label (flutter/flutter#186465)
2026-05-13 [email protected] [Impeller] Namespace user-supplied shaders to prevent entrypoint collisions (flutter/flutter#186332)
2026-05-13 [email protected] [flutter_tools] Migrate detectLowCompileSdkVersionOrNdkVersion to AGP task (flutter/flutter#184731)
2026-05-13 [email protected] Update the Flutter Gallery web app template files to support running with Wasm (flutter/flutter#186268)
2026-05-13 [email protected] [web] Use heap allocation for buffers that would consume too much space on the Wasm stack (flutter/flutter#186228)
2026-05-13 [email protected] Roll Skia from 56ca5896c0d9 to 27f7bba22600 (3 revisions) (flutter/flutter#186444)
2026-05-13 [email protected] Roll Fuchsia Linux SDK from z7ICmPtn4hspu02zk... to y6uQHA5xUN83IF395... (flutter/flutter#186442)
2026-05-13 [email protected] Roll Skia from 6385958d2feb to 56ca5896c0d9 (1 revision) (flutter/flutter#186441)
2026-05-13 [email protected] Roll Dart SDK from 9576691c37d8 to 8e30b88e4d5a (1 revision) (flutter/flutter#186429)
2026-05-13 [email protected] Roll Skia from 77a21bc723dc to 6385958d2feb (9 revisions) (flutter/flutter#186428)
2026-05-13 [email protected] Docs/improving docs for semantics UI lib (flutter/flutter#186125)
2026-05-12 [email protected] [Tool] Support glob patterns when parsing workspaces in FlutterProject (flutter/flutter#185715)
2026-05-12 [email protected] docs: fix overriden -> overridden in MediaQueryData dartdoc (flutter/flutter#186323)
2026-05-12 [email protected] [Test cross imports] No material in `test/foundation`, `test/gestures`, `test/semantics`, `test/services` (flutter/flutter#186144)
2026-05-12 [email protected] docs: fix "tha" -> "that" typo in widget_inspector_test comment (flutter/flutter#186322)
2026-05-12 [email protected] docs: Fix doubled-word typos in framework dartdoc (flutter/flutter#186319)
2026-05-12 [email protected] Roll pub packages (flutter/flutter#186418)
2026-05-12 [email protected] Bumped required mediatek vender sdk version. (flutter/flutter#186405)
2026-05-12 [email protected] Make DeepLinkJsonFromManifestTask Gradle task build cacheable (flutter/flutter#185903)
2026-05-12 [email protected] Harden dev tooling scripts against command injection and log leaks (flutter/flutter#186076)
2026-05-12 [email protected] Roll pub packages (flutter/flutter#186274)
2026-05-12 [email protected] [Flutter GPU] Allow allocating multi-mip textures and overwriting specific (mip, slice) levels (flutter/flutter#185890)
2026-05-12 [email protected] [web] Fix MenuAnchor dismiss when semantics enabled (flutter/flutter#183093)

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 [email protected],[email protected] 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
@navaronbracke
navaronbracke deleted the no_material_in_misc_tests branch July 8, 2026 06:21
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: animation Animation APIs CICD Run CI/CD f: gestures flutter/packages/flutter/gestures repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants