Skip to content

Commit

Permalink
Refactor widget_inspector_test.dart (#149850)
Browse files Browse the repository at this point in the history
Work towards flutter/devtools#7894

The Flutter DevTools team is working on a new Widget Inspector. As part of this work, we need to make adjusts to the widget inspector service API. 

This PR simply re-factors the `widget_inspector_test` in preparation for this work, to make it easier for us to modify the tests / add new tests. 

Although this PR is large (`widget_inspector_test` is over 5000 lines!!), it does not change any of the current test logic. 

Instead it:
- Moves test cases that were prefixed with "WidgetInspectorService" into the pre-existing group named "WidgetInspectorService"
- Moves tests cases in that group which were skipped with `!WidgetInspectorService.instance.isWidgetCreationTracked() // [intended] Test requires --track-widget-creation flag` into a group called "Requires flag --track-widget-creation"
- Adds two helper functions, `pumpWidgetTreeWithABC` and `findElementABC` and uses them in all test cases that were duplicating the same widget set-up.
  • Loading branch information
elliette authored Jun 7, 2024
1 parent dcc5361 commit 2be334f
Showing 1 changed file with 1,202 additions and 1,619 deletions.
Loading

0 comments on commit 2be334f

Please sign in to comment.