[cupertino_ui] Remove widgets import from menu_anchor_test.dart#12068
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the skip annotation and refactors menu_anchor_test.dart to use SemanticsHandle and isSemantics assertions instead of SemanticsTester and hasSemantics. It also simplifies constructors in NestedTag and DebugCupertinoMenuEntry. The review feedback suggests utilizing addTearDown to handle the disposal of SemanticsHandle instances to ensure proper cleanup in case of test failures, and removing the corresponding manual disposal calls.
There was a problem hiding this comment.
I agree with Gemini about addTearDown, otherwise LGTM 👍
Edit: Actually, per #12057 (comment) it looks like we don't need ensureSemantics at all.
2983581 to
3aa4839
Compare
|
Regarding Gemini's comment, I tried to use But I removed |
…er#188863) flutter/packages@274ed3e...e742106 2026-07-01 [email protected] [cupertino_ui] Re-enable `tab_scaffold_test.dart` (flutter/packages#12064) 2026-07-01 [email protected] [material_ui] Port flutter/flutter flutter#184808 "Remove semantics_tester import from card_test.dart" (flutter/packages#11965) 2026-07-01 [email protected] [cupertino_ui] Migrate `sliding_segmented_control_test.dart` to `SemanticsHandle` (flutter/packages#11979) 2026-07-01 [email protected] [cupertino_ui] Migrate `route_test.dart` to `SemanticsHandle` (flutter/packages#11993) 2026-07-01 [email protected] [cupertino_ui] Migrate `nav_bar_test.dart` to `SemanticsHandle` (flutter/packages#11980) 2026-07-01 [email protected] [cupertino_ui] Migrate `segmented_control_test.dart` to `SemanticsHandle` (flutter/packages#11982) 2026-07-01 [email protected] [cupertino_ui] Re-enable `text_field_test.dart` (flutter/packages#12067) 2026-06-30 [email protected] [camera_android_camerax] Pass targetVideoEncodingBitRate to Recorder (flutter/packages#11960) 2026-06-30 [email protected] [camera_android_camerax] Migrate check-readiness skill from bash to Dart (flutter/packages#11943) 2026-06-30 [email protected] [material_ui] Enable `time_picker_test` (flutter/packages#12061) 2026-06-30 [email protected] [cupertino_ui] Migrate checkbox_test.dart to SemanticsHandle (flutter/packages#12065) 2026-06-30 [email protected] [image_picker] Handle limit: 1 in pickMultiImage and pickMultipleMedia gracefully (flutter/packages#11825) 2026-06-30 [email protected] [cross_file] Document native mimeType behavior (flutter/packages#11662) 2026-06-30 [email protected] [material_ui] Remove `image_data.dart` imports from `circle_avatar_test.dart`, `color_scheme_test.dart` (flutter/packages#12059) 2026-06-30 [email protected] [cupertino_ui] Remove `image_data.dart` import from `scaffold_test.dart` (flutter/packages#12060) 2026-06-30 [email protected] [cupertino_ui] Remove widgets import from menu_anchor_test.dart (flutter/packages#12068) 2026-06-30 [email protected] [material_ui] Enable `checkbox_list_tile_test` (flutter/packages#12007) 2026-06-30 [email protected] [in_app_purchase_storekit] Expose quantity in Transactions (flutter/packages#11879) 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 [email protected] 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
Part of flutter/flutter#182636 and flutter/flutter#188395
This PR:
widgets/semantics_tester.dartfrommenu_anchor_test.dart.SemanticsTesterusages.@Skipannotation and moves the file to thetest/folder.NestedTagandDebugCupertinoMenuEntryconstructors to satisfyprefer_initializing_formalsafter the file became analyzed undertest/. These helper changes are analyzer-only cleanup; without them,dart analyze --fatal-infosfails.