Repository navigation
[cupertino_ui, material_ui] Use range matchers instead of exact positions in scroll tests - #12664
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors tests in refresh_test.dart and sliver_app_bar.4_test.dart by replacing platform-specific conditional checks and exact floating-point assertions with range-based assertions using inExclusiveRange. The review feedback suggests using moreOrLessEquals instead of exact equality when comparing floating-point layout dimensions and offsets to prevent potential test flakiness.
| @@ -0,0 +1,3 @@ | |||
| changelog: | | |||
There was a problem hiding this comment.
Since these are all test changes, I do not think we need a changelog entry.
There was a problem hiding this comment.
I omitted this item in my first version and apparently it is required by the script https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8672276188476354593/+/u/Run_package_tests/Repository_standards_validation/stdout?format=raw
There was a problem hiding this comment.
That's what the override labels are for. :) I'll add them. It should allow the check to pass.
|
autosubmit label was removed for flutter/packages/12664, because - The status or check suite Dashboard Checks has failed. Please fix the issues identified (or deflake) before re-applying this label. |
…r#192063) flutter/packages@cd4cdd0...d642322 2026-08-30 engine-flutter-autoroll@skia.org Roll Flutter from 8d8c1aa to c978386 (20 revisions) (flutter/packages#12693) 2026-08-28 katelovett@google.com [ci] Update labeler (flutter/packages#12636) 2026-08-28 269567208+reidbaker-agent@users.noreply.github.com [camera_android_camerax] Update skills_lint to published version ^0.5.1 (flutter/packages#12684) 2026-08-28 engine-flutter-autoroll@skia.org Roll Flutter (stable) from 6b182d2 to d3b14c8 (1391 revisions) (flutter/packages#12678) 2026-08-28 269567208+reidbaker-agent@users.noreply.github.com [camera_android_camerax] Add presubmit sweep, cross-platform paths, and test diff guidelines to AGENTS.md (flutter/packages#12668) 2026-08-28 engine-flutter-autoroll@skia.org Roll Flutter from e8dca90 to 8d8c1aa (27 revisions) (flutter/packages#12679) 2026-08-28 dkwingsmt@users.noreply.github.com [cupertino_ui, material_ui] Use range matchers instead of exact positions in scroll tests (flutter/packages#12664) 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-flutter-autoroll Please CC flutter-ecosystem@google.com 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
…ions in scroll tests (flutter#12664) Relaxes overly strict position assertions in `cupertino_ui` and `material_ui` tests by replacing hardcoded floating-point numbers with range matchers (`inExclusiveRange`) and relative assertions. This avoids coupling tests to exact simulation values when underlying scroll physics change while still verifying that intermediate and final states behave as expected. This PR unblocks flutter/flutter#187568 . ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). 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. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
…ions in scroll tests (flutter#12664) Relaxes overly strict position assertions in `cupertino_ui` and `material_ui` tests by replacing hardcoded floating-point numbers with range matchers (`inExclusiveRange`) and relative assertions. This avoids coupling tests to exact simulation values when underlying scroll physics change while still verifying that intermediate and final states behave as expected. This PR unblocks flutter/flutter#187568 . ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). 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. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Relaxes overly strict position assertions in
cupertino_uiandmaterial_uitests by replacing hardcoded floating-point numbers with range matchers (inExclusiveRange) and relative assertions.This avoids coupling tests to exact simulation values when underlying scroll physics change while still verifying that intermediate and final states behave as expected.
This PR unblocks flutter/flutter#187568 .
Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot 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.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2