P1a: testsf: cupertinof: material designframeworkgood first issueteam-frameworktriaged-framework
Metriche repository
- Star
- (176.322 star)
- Metriche merge PR
- (Merge medio 7g 7h) (491 PR mergiate in 30 g)
Descrizione
Some test files import test utilities from other library's tests. This won't be possible once Material and Cupertino are moved to the flutter/packages repo.
For example:
Umbrella issue: https://github.com/flutter/flutter/issues/177028
What to do about it
- Move the util to flutter_test if:
- it's used in many places.
- it has a solid API that has been in use for awhile and we are ready to commit to it.
- it's of public-level quality.
- Duplicate the util if:
- its implementation is trivial, or it's just a constant, etc.
- we are worried about its API needing changes and don't want to make it public.
- Any other options? I don't think it will be possible to import it any other way.
The utils
Rendering:
Widgets:
- TestSemantics
- A very common one.
- TestListTile
- editable_text_utils
- May contain several members that need to move. https://github.com/flutter/flutter/pull/182632 is moving TestTextField out of this file right now. I see lots of uses of textOffsetToPosition too.
- textOffsetToPosition
- MockClipboard
- live_text_utils.dart
- text_selection_toolbar_utils.dart
- simullateSystemBack
- FeedbackTester
- MockProcessTextHandler
- verifySliverGeometry
- FakeView
- TestBorder
Tests to fix:
Material importing Widgets
$ rg "import '\.\.\/widgets" packages/flutter/test/material -l
- material/segmented_button_test.dart
- material/bottom_navigation_bar_test.dart
- material/tabs_test.dart
- material/ink_well_test.dart
- material/list_tile_test.dart
- material/icon_button_test.dart
- material/user_accounts_drawer_header_test.dart
- PR:
- material/scaffold_test.dart
- material/dropdown_test.dart
- material/selectable_text_test.dart
- material/range_slider_test.dart
- PR:
- material/floating_action_button_test.dart
- material/text_button_test.dart
- PR:
- material/navigation_rail_test.dart
- PR:
- material/date_picker_test.dart
- material/outlined_button_test.dart
- PR:
- material/selection_area_test.dart
- material/filter_chip_test.dart
- material/drawer_test.dart
- PR:
- material/checkbox_list_tile_test.dart
- PR:
- material/slider_test.dart
- PR:
- material/menu_anchor_test.dart
- PR:
- material/radio_test.dart
- PR:
- material/toggle_buttons_test.dart
- PR:
- material/autocomplete_test.dart
- PR:
- material/search_anchor_test.dart
- PR:
- material/app_bar_test.dart
- PR:
- material/text_selection_toolbar_test.dart
- material/radio_list_tile_test.dart
- material/search_test.dart
- material/animated_icons_test.dart
- PR:
- material/text_selection_test.dart
- material/adaptive_text_selection_toolbar_test.dart
- material/text_field_test.dart
- material/checkbox_test.dart
- PR:
- material/bottom_sheet_test.dart
- PR:
- material/calendar_date_picker_test.dart
- material/switch_test.dart
- material/text_form_field_test.dart
- material/dialog_test.dart
- PR:
- material/popup_menu_test.dart
- material/raw_material_button_test.dart
- PR:
- material/date_range_picker_test.dart
- material/sliver_app_bar_test.dart
- PR:
- material/dropdown_menu_test.dart
- PR:
- material/card_test.dart
- PR:
- material/flexible_space_bar_test.dart
- PR:
- material/chip_test.dart
- PR:
- material/elevated_button_test.dart
- PR:
- material/switch_list_tile_test.dart
- material/tooltip_theme_test.dart
- PR:
- material/input_date_picker_form_field_test.dart
- material/app_bar_sliver_test.dart
- PR:
- material/material_button_test.dart
- PR:
- material/data_table_test.dart
- PR:
- material/filled_button_test.dart
- PR:
- material/material_test.dart
- material/time_picker_test.dart
Cupertino importing Widgets
$ rg "import '\.\.\/widgets" packages/flutter/test/cupertino -l
- cupertino/slider_test.dart
- PR:
- cupertino/tab_scaffold_test.dart
- cupertino/switch_test.dart
- cupertino/sliding_segmented_control_test.dart
- PR:
- cupertino/nav_bar_test.dart
- PR:
- cupertino/radio_test.dart
- PR:
- cupertino/action_sheet_test.dart
- PR:
- cupertino/text_selection_toolbar_test.dart
- cupertino/segmented_control_test.dart
- PR:
- cupertino/text_form_field_row_test.dart
- cupertino/text_field_test.dart
- cupertino/sheet_test.dart
- cupertino/text_selection_test.dart
- cupertino/route_test.dart
- PR:
- cupertino/checkbox_test.dart
- cupertino/button_test.dart
- PR:
- cupertino/picker_test.dart
- PR:
- cupertino/adaptive_text_selection_toolbar_test.dart
- cupertino/bottom_tab_bar_test.dart
- PR:
- cupertino/dialog_test.dart
- PR:
Cupertino importing Rendering
$ rg "import '\.\.\/rendering" packages/flutter/test/cupertino -l