[Decoupling] Port flutter/flutter #184808 "Remove semantics_tester import from card_test.dart"#11965
Draft
justinmc wants to merge 7 commits into
Draft
[Decoupling] Port flutter/flutter #184808 "Remove semantics_tester import from card_test.dart"#11965justinmc wants to merge 7 commits into
justinmc wants to merge 7 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.