Remove Material import from editable text cursor tests#186671
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the editable text cursor tests by replacing MaterialApp with TestWidgetsApp and introducing local constants for colors and text styles to reduce dependencies on the Material library. The changes also include updating selection controls and context menu builders across multiple test cases. Feedback suggests explicitly defining the fontSize in the new TextStyle constants to ensure consistency with the original Material styles and replacing a magic color literal with the defined _textFieldBackgroundCursorColor constant to adhere to the style guide's principle of avoiding duplicated state.
|
Resolved the remaining review threads after re-checking the file. The magic color literal has been replaced with |
victorsanni
left a comment
There was a problem hiding this comment.
This should also be removed from dev/bots/check_tests_cross_imports.dart.
…into editable-text-cursor-no-material
|
Pushed 118d839 with a short test comment explaining the cursor coordinate shift after moving this test off MaterialApp/TextField. |
|
from text-input-triage: @MarlonJD this will need a secondary approval before being merged. Thank you for your patience! |
|
autosubmit label was removed for flutter/flutter/186671, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR. |
flutter/flutter@1bdf4af...66aaa9a 2026-06-08 [email protected] Add docs on bumping Dart (flutter/flutter#187540) 2026-06-08 [email protected] Rename Dart_LoadELF2 back to Dart_LoadELF. (flutter/flutter#187677) 2026-06-08 [email protected] Add bare, reidbaker, and android agents (flutter/flutter#187588) 2026-06-08 [email protected] Roll Dart SDK from 73ec2745c49a to 39f1c44e294f (3 revisions) (flutter/flutter#187684) 2026-06-08 [email protected] [Flutter GPU] Document the formats.dart enums (flutter/flutter#187628) 2026-06-08 [email protected] Roll Skia from 0ea3dae686e3 to 43f135735152 (3 revisions) (flutter/flutter#187683) 2026-06-08 [email protected] [flutter_tools] Fix `flutter create` crash with SDK packages in bin/cache/pkg (flutter/flutter#187653) 2026-06-08 [email protected] Roll Packages from 61bdbb4 to 13b49f4 (1 revision) (flutter/flutter#187678) 2026-06-08 [email protected] Roll Fuchsia Linux SDK from fAGotRbStYGA0idum... to KNe93cf5wU4xG2d-m... (flutter/flutter#187675) 2026-06-08 [email protected] Roll Skia from d17c51db4ede to 0ea3dae686e3 (1 revision) (flutter/flutter#187674) 2026-06-08 [email protected] Roll Skia from 9659a87f500f to d17c51db4ede (2 revisions) (flutter/flutter#187672) 2026-06-08 [email protected] Roll Skia from a56d5a4e1120 to 9659a87f500f (1 revision) (flutter/flutter#187667) 2026-06-07 [email protected] Roll Skia from 101faf7d9d1f to a56d5a4e1120 (1 revision) (flutter/flutter#187665) 2026-06-07 [email protected] Remove Material import from navigator replacement tests (flutter/flutter#186674) 2026-06-07 [email protected] Remove Material import from editable text cursor tests (flutter/flutter#186671) 2026-06-07 [email protected] Roll Fuchsia Linux SDK from eIU3QDrxaBPAMY9oi... to fAGotRbStYGA0idum... (flutter/flutter#187656) 2026-06-07 [email protected] Roll Skia from 294ac0cb2a7d to 101faf7d9d1f (1 revision) (flutter/flutter#187655) 2026-06-06 [email protected] Roll Skia from 91ee612cf552 to 294ac0cb2a7d (2 revisions) (flutter/flutter#187651) 2026-06-06 [email protected] Roll Skia from a47a9a2c8ae5 to 91ee612cf552 (4 revisions) (flutter/flutter#187642) 2026-06-06 [email protected] Roll Fuchsia Linux SDK from N_LiSaBSUsE2LDZgG... to eIU3QDrxaBPAMY9oi... (flutter/flutter#187641) 2026-06-06 [email protected] Roll Dart SDK from 05243f181c21 to 73ec2745c49a (2 revisions) (flutter/flutter#187640) 2026-06-06 [email protected] Roll Fuchsia GN SDK from oOAcFhkoE2_-Sy67z... to a87CbQSWEjkPUK1ZY... (flutter/flutter#187632) 2026-06-06 [email protected] Roll Dart SDK from 6a9a0efe66eb to 05243f181c21 (1 revision) (flutter/flutter#187634) 2026-06-05 [email protected] [Flutter GPU] Add instanced draw support (flutter/flutter#187359) 2026-06-05 [email protected] clears out the android context after the frame on mediatek devices (flutter/flutter#187404) 2026-06-05 [email protected] fix(tool): initialize asset isModified state on startup to prevent 2x hot restart slowdown (flutter/flutter#187488) 2026-06-05 [email protected] Remove reference to 'good first issue' in the docs (flutter/flutter#187615) 2026-06-05 [email protected] Remove references to 'good first issue' (flutter/flutter#187617) 2026-06-05 [email protected] Revert "Add support for stylus buttons" (flutter/flutter#187581) 2026-06-05 [email protected] Always run coverage upload step, even if a single test fails (flutter/flutter#187614) 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
…r#11876) flutter/flutter@1bdf4af...66aaa9a 2026-06-08 [email protected] Add docs on bumping Dart (flutter/flutter#187540) 2026-06-08 [email protected] Rename Dart_LoadELF2 back to Dart_LoadELF. (flutter/flutter#187677) 2026-06-08 [email protected] Add bare, reidbaker, and android agents (flutter/flutter#187588) 2026-06-08 [email protected] Roll Dart SDK from 73ec2745c49a to 39f1c44e294f (3 revisions) (flutter/flutter#187684) 2026-06-08 [email protected] [Flutter GPU] Document the formats.dart enums (flutter/flutter#187628) 2026-06-08 [email protected] Roll Skia from 0ea3dae686e3 to 43f135735152 (3 revisions) (flutter/flutter#187683) 2026-06-08 [email protected] [flutter_tools] Fix `flutter create` crash with SDK packages in bin/cache/pkg (flutter/flutter#187653) 2026-06-08 [email protected] Roll Packages from 61bdbb4 to 13b49f4 (1 revision) (flutter/flutter#187678) 2026-06-08 [email protected] Roll Fuchsia Linux SDK from fAGotRbStYGA0idum... to KNe93cf5wU4xG2d-m... (flutter/flutter#187675) 2026-06-08 [email protected] Roll Skia from d17c51db4ede to 0ea3dae686e3 (1 revision) (flutter/flutter#187674) 2026-06-08 [email protected] Roll Skia from 9659a87f500f to d17c51db4ede (2 revisions) (flutter/flutter#187672) 2026-06-08 [email protected] Roll Skia from a56d5a4e1120 to 9659a87f500f (1 revision) (flutter/flutter#187667) 2026-06-07 [email protected] Roll Skia from 101faf7d9d1f to a56d5a4e1120 (1 revision) (flutter/flutter#187665) 2026-06-07 [email protected] Remove Material import from navigator replacement tests (flutter/flutter#186674) 2026-06-07 [email protected] Remove Material import from editable text cursor tests (flutter/flutter#186671) 2026-06-07 [email protected] Roll Fuchsia Linux SDK from eIU3QDrxaBPAMY9oi... to fAGotRbStYGA0idum... (flutter/flutter#187656) 2026-06-07 [email protected] Roll Skia from 294ac0cb2a7d to 101faf7d9d1f (1 revision) (flutter/flutter#187655) 2026-06-06 [email protected] Roll Skia from 91ee612cf552 to 294ac0cb2a7d (2 revisions) (flutter/flutter#187651) 2026-06-06 [email protected] Roll Skia from a47a9a2c8ae5 to 91ee612cf552 (4 revisions) (flutter/flutter#187642) 2026-06-06 [email protected] Roll Fuchsia Linux SDK from N_LiSaBSUsE2LDZgG... to eIU3QDrxaBPAMY9oi... (flutter/flutter#187641) 2026-06-06 [email protected] Roll Dart SDK from 05243f181c21 to 73ec2745c49a (2 revisions) (flutter/flutter#187640) 2026-06-06 [email protected] Roll Fuchsia GN SDK from oOAcFhkoE2_-Sy67z... to a87CbQSWEjkPUK1ZY... (flutter/flutter#187632) 2026-06-06 [email protected] Roll Dart SDK from 6a9a0efe66eb to 05243f181c21 (1 revision) (flutter/flutter#187634) 2026-06-05 [email protected] [Flutter GPU] Add instanced draw support (flutter/flutter#187359) 2026-06-05 [email protected] clears out the android context after the frame on mediatek devices (flutter/flutter#187404) 2026-06-05 [email protected] fix(tool): initialize asset isModified state on startup to prevent 2x hot restart slowdown (flutter/flutter#187488) 2026-06-05 [email protected] Remove reference to 'good first issue' in the docs (flutter/flutter#187615) 2026-06-05 [email protected] Remove references to 'good first issue' (flutter/flutter#187617) 2026-06-05 [email protected] Revert "Add support for stylus buttons" (flutter/flutter#187581) 2026-06-05 [email protected] Always run coverage upload step, even if a single test fails (flutter/flutter#187614) 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
Part of flutter#177412 Refs flutter#177028 This removes the Material dependency from widgets/editable_text_cursor_test.dart by replacing MaterialApp wrappers with TestWidgetsApp, using explicit Color/TextStyle constants instead of Material Colors/Typography, replacing material text selection controls with the widgets test controls plus a small paste-only context menu, and replacing the Material TextField smoke case with an equivalent EditableText setup. Validation: - dart analyze packages/flutter/test/widgets/editable_text_cursor_test.dart - ./bin/flutter test packages/flutter/test/widgets/editable_text_cursor_test.dart --------- Co-authored-by: Victor Sanni <[email protected]>
Part of #177412
Refs #177028
This removes the Material dependency from widgets/editable_text_cursor_test.dart by replacing MaterialApp wrappers with TestWidgetsApp, using explicit Color/TextStyle constants instead of Material Colors/Typography, replacing material text selection controls with the widgets test controls plus a small paste-only context menu, and replacing the Material TextField smoke case with an equivalent EditableText setup.
Validation: