Inspector integration tests are resilient to Flutter framework changes #9321
+484
−116
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.
Work towards flutter/flutter#172037
Our current inspector integration test is quite brittle, since the test cases for the inspector tree assume the implementation widgets from the Flutter frameworks will be in a consistent order. This PR removes that assumption to make sure the inspector tests won't fail due to framework changes.
This PR:
custom_widgets
) to our test fixtures which contains a few simple "custom" widgetsinspector_app
) to our test fixtures which uses the widgets from thecustom_widgets
library instead of from the Frameworkinspector_v2/inspector_integration_test
to use the newinspector_app
This way we can rely on the implementing widgets from
custom_widgets
remaining consistent. However, since those are implemented using widgets from the framework, I have skipped any golden comparisons when implementation widgets are visible in the tree.Note: We are planning on removing the legacy inspector (integration test is
packages/devtools_app/test/screens/inspector/inspector_integration_test.dart
) soon now that ~99% of users are using the new inspector. Therefore, for the legacy inspector integration test, I simply skipped any golden comparisons for the details tree.