Skip to content

[material_ui] Unskip long press drag test on web - #13358

Merged
auto-submit[bot] merged 1 commit into
flutter:mainfrom
mdebbar:material-ui-text-field-long-press-drag
Oct 28, 2026
Merged

auto-submit[bot] merged 1 commit into
flutter:mainfrom
mdebbar:material-ui-text-field-long-press-drag

Conversation

@mdebbar

@mdebbar mdebbar commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Follow-up to flutter/flutter#194877.

long press drag extends the selection to the word under the drag and shows toolbar on lift on non-Apple platforms is skipped on the web, but the only thing that actually breaks there is the drag geometry: textOffsetToPosition nudges the position by 1px on web, so moveBy(const Offset(-200, 0)) lands exactly on the glyph boundary between Peel and the following space, and getWordAtOffset resolves to the whitespace instead of the word. _expectMaterialToolbarForPartialSelection() already handles isContextMenuProvidedByPlatform, so the skip is not needed once the drag targets are fixed.

This PR drags to the middle of each target word instead of relative offsets, drops the skip, and tags the test with reduced-web-test-set so it runs on the web shards. Verified with flutter test, flutter test --platform chrome, and flutter test --platform chrome --wasm.

Test-only change, so no version bump or CHANGELOG entry is needed.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Oct 20, 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 modifies packages/material_ui/test/text_field_test.dart to replace relative gesture movements (moveBy) with absolute movements (moveTo) targeting specific text offsets. It also replaces the skip parameter with a tags: 'reduced-web-test-set' parameter in a test configuration. There are no review comments, and I have no feedback to provide.

@mdebbar
mdebbar requested review from Renzo-Olivares and removed request for harryterkelsen October 20, 2026 22:39
@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Oct 20, 2026
flutter-zl pushed a commit to bardiakz/flutter that referenced this pull request Oct 21, 2026
Most entries in `kWebTestFileKnownFailures` (framework test files
excluded from the web shards) have been passing on the web for a while:
`performance_overlay_test.dart`, `html_element_view_test.dart`,
`cupertino/scaffold_test.dart`, and `rendering/platform_view_test.dart`
pass on both JS and wasm and are removed from the list.

The two "not compilable" entries stay (`Int64List`, relative import
outside the package). `@TestOn('!chrome')` can't replace them because
`flutter test --platform=chrome` compiles all test files into a single
entrypoint before the test runner evaluates the annotation. The JS and
wasm lists are now identical, so the map is collapsed into one list.

`test/material/text_field_test.dart` still has 3 failing cases on the
web, but that file is under the Material code freeze
(flutter#188444), so it stays in the
list with a TODO. The web fix for that test lives in `material_ui`:
flutter/packages#13358
LongCatIsLooong pushed a commit to LongCatIsLooong/flutter that referenced this pull request Oct 22, 2026
Most entries in `kWebTestFileKnownFailures` (framework test files
excluded from the web shards) have been passing on the web for a while:
`performance_overlay_test.dart`, `html_element_view_test.dart`,
`cupertino/scaffold_test.dart`, and `rendering/platform_view_test.dart`
pass on both JS and wasm and are removed from the list.

The two "not compilable" entries stay (`Int64List`, relative import
outside the package). `@TestOn('!chrome')` can't replace them because
`flutter test --platform=chrome` compiles all test files into a single
entrypoint before the test runner evaluates the annotation. The JS and
wasm lists are now identical, so the map is collapsed into one list.

`test/material/text_field_test.dart` still has 3 failing cases on the
web, but that file is under the Material code freeze
(flutter#188444), so it stays in the
list with a TODO. The web fix for that test lives in `material_ui`:
flutter/packages#13358

@Renzo-Olivares Renzo-Olivares 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

@mdebbar mdebbar added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 28, 2026
@auto-submit
auto-submit Bot merged commit 13d38e0 into flutter:main Oct 28, 2026
12 checks passed
flutter-zl pushed a commit to flutter-zl/flutter that referenced this pull request Oct 28, 2026
flutter/packages@a8549ae...13d38e0

2026-10-28 [email protected] [material_ui] Unskip long press drag test
on web (flutter/packages#13358)
2026-10-28 [email protected] [google_maps_flutter_ios, pigeon,
webview_flutter_wkwebview] Migrate remaining example apps to uiscene
(flutter/packages#13280)
2026-10-27 [email protected] manually roll flutter and fix flaky
video player test that is preventing roll from landing
(flutter/packages#13465)
2026-10-27 [email protected] [material_ui]
Unskip web tests that pass on CanvasKit and Skwasm: data_table_test,
floating_action_button_test, text_field_cursor_test
(flutter/packages#13460)
2026-10-27 [email protected] [material_ui] Decouple
disabled CheckboxListTile state in a11y_assessments
(flutter/packages#13177)
2026-10-27 [email protected] [camera_web] Skip video input
devices that cannot be started in availableCameras
(flutter/packages#13196)
2026-10-27 [email protected] [camera] Add support for
zero-shutter-lag capture (flutter/packages#12374)
2026-10-27 [email protected] [in_app_purchase_storekit} Fix more test
flakes (flutter/packages#13279)
2026-10-27 [email protected] [material_ui]
Refactor `typography.dart` and `text_theme.dart` in preparation for M3E
(flutter/packages#13371)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
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
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
Most entries in `kWebTestFileKnownFailures` (framework test files
excluded from the web shards) have been passing on the web for a while:
`performance_overlay_test.dart`, `html_element_view_test.dart`,
`cupertino/scaffold_test.dart`, and `rendering/platform_view_test.dart`
pass on both JS and wasm and are removed from the list.

The two "not compilable" entries stay (`Int64List`, relative import
outside the package). `@TestOn('!chrome')` can't replace them because
`flutter test --platform=chrome` compiles all test files into a single
entrypoint before the test runner evaluates the annotation. The JS and
wasm lists are now identical, so the map is collapsed into one list.

`test/material/text_field_test.dart` still has 3 failing cases on the
web, but that file is under the Material code freeze
(flutter#188444), so it stays in the
list with a TODO. The web fix for that test lives in `material_ui`:
flutter/packages#13358
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
flutter/packages@a8549ae...13d38e0

2026-10-28 [email protected] [material_ui] Unskip long press drag test
on web (flutter/packages#13358)
2026-10-28 [email protected] [google_maps_flutter_ios, pigeon,
webview_flutter_wkwebview] Migrate remaining example apps to uiscene
(flutter/packages#13280)
2026-10-27 [email protected] manually roll flutter and fix flaky
video player test that is preventing roll from landing
(flutter/packages#13465)
2026-10-27 [email protected] [material_ui]
Unskip web tests that pass on CanvasKit and Skwasm: data_table_test,
floating_action_button_test, text_field_cursor_test
(flutter/packages#13460)
2026-10-27 [email protected] [material_ui] Decouple
disabled CheckboxListTile state in a11y_assessments
(flutter/packages#13177)
2026-10-27 [email protected] [camera_web] Skip video input
devices that cannot be started in availableCameras
(flutter/packages#13196)
2026-10-27 [email protected] [camera] Add support for
zero-shutter-lag capture (flutter/packages#12374)
2026-10-27 [email protected] [in_app_purchase_storekit} Fix more test
flakes (flutter/packages#13279)
2026-10-27 [email protected] [material_ui]
Refactor `typography.dart` and `text_theme.dart` in preparation for M3E
(flutter/packages#13371)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
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

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: material_ui triage-design Should be looked at in design triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants