Skip to content

[Decoupling] 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

[Decoupling] 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.
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.

2 participants