Skip to content

Inspector integration tests are resilient to Flutter framework changes #9321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

elliette
Copy link
Member

@elliette elliette commented Jul 16, 2025

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:

  • Adds a custom widget library (named custom_widgets ) to our test fixtures which contains a few simple "custom" widgets
  • Adds a new test app (named inspector_app) to our test fixtures which uses the widgets from the custom_widgets library instead of from the Framework
  • Updates inspector_v2/inspector_integration_test to use the new inspector_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.

@elliette elliette marked this pull request as ready for review July 18, 2025 16:26
@elliette elliette requested a review from a team as a code owner July 18, 2025 16:26
@elliette elliette requested review from kenzieschmoll and justinmc and removed request for a team and kenzieschmoll July 18, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant