[material_ui] Fix self-comparison and assert bugs in semantics_tester
flutter/packages · #12722
Sep 2026
packages/material_ui/test/semantics_tester.dart carries four bugs that make parts of the helper silently ineffective: controlsNodes != controlsNodes compares the field to itself, so the setEquals check is unreachable and the controlsNodes expectation never runs the locale comparison reads second[i] on both sides instead of first[i], so mismatched locales compare equal the minValue/maxValue checks…
- open
- status
- +146/−4
- diff
- 5.3K
- repo stars
More like this
Apply TestSemantics fixes to the material copy of semantics_tester
flutter/flutter · #192164
packages/flutter/test/material/semantics_tester.dart is a copy of packages/flutter/test/widgets/semantics_tester.dart, kept so material tests do not cross-import from widgets. It did not receive the fixes from #191938, so the two copies had drifted by exactly those four bugs: controlsNodes != controlsNodes compares the field to itself, so the setEquals check is unreachable and the expectation nev…
- closed
- status
- +129/−4
- diff
- 179K
- repo stars
Fix self-comparison and assert typos in TestSemantics
flutter/flutter · #191938
This replaces #185975, which the stale bot auto-closed on Jul 1. The requested tests had been pushed on May 21 (commit "Add semantics tester regression tests"), but the waiting for response label was never cleared, so the timer kept running. #185975 could not be reopened, hence this PR. @chunhtai you'd reviewed #185975 and said it lgtm pending a test. That test is here — three regression tests, o…
- merged
- status
- +134/−4
- diff
- 179K
- repo stars
Remove semantics_tester import from material_button_test.dart
flutter/flutter · #184807
Part of #182636 Summary Remove the semantics_tester.dart cross-import from material_button_test.dart. What changed Replaced the deprecated SemanticsTester/TestSemantics assertions in the MaterialButton semantics test with tester.getSemantics(...) and matchesSemantics(...) Kept the semantic size verification for the enabled and disabled button states Removed the ../widgets/semantics_tester.dart im…
- merged
- status
- +32/−50
- diff
- 179K
- repo stars