Skip to content

[material_ui] Port flutter/flutter #184808 "Remove semantics_tester import from card_test.dart"#11965

Draft
justinmc wants to merge 7 commits into
flutter:mainfrom
justinmc:decoupling-port-184808
Draft

[material_ui] Port flutter/flutter #184808 "Remove semantics_tester import from card_test.dart"#11965
justinmc wants to merge 7 commits into
flutter:mainfrom
justinmc:decoupling-port-184808

Conversation

@justinmc

Copy link
Copy Markdown
Contributor

This PR ports flutter/flutter#184808 by @Sanaullah49 from flutter/flutter to flutter/packages.

This is the first unmerged PR that I've attempted to port, so reviewers please let me know if you see problems with this process.

Replace manual SemanticsHandle + try/finally + dispose with the
addTearDown pattern as requested by @justinmc and @gemini-code-assist.
testWidgets has semanticsEnabled: true by default, which creates and
disposes a SemanticsHandle automatically. The addTearDown registered
an extra handle that runs AFTER the framework's
_verifySemanticsHandlesWereDisposed check, causing it to fail with
'A SemanticsHandle was active at the end of the test.'

Removing the addTearDown line - tester.getSemantics works against the
auto-created handle.
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 23, 2026
@github-actions github-actions Bot added triage-framework Should be looked at in framework triage p: material_ui labels Jun 23, 2026
@Piinks Piinks changed the title [Decoupling] Port flutter/flutter #184808 "Remove semantics_tester import from card_test.dart" [material_ui] Port flutter/flutter #184808 "Remove semantics_tester import from card_test.dart" Jun 25, 2026

@Piinks Piinks 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD p: material_ui triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants