Skip to content

[Driver] correction of data returned by getWidgetDiagnostics#45985

Merged
fluttergithubbot merged 1 commit intoflutter:masterfrom
jacek-marchwicki:flutter-driver-widget-diagnostics-fix
Dec 4, 2019
Merged

[Driver] correction of data returned by getWidgetDiagnostics#45985
fluttergithubbot merged 1 commit intoflutter:masterfrom
jacek-marchwicki:flutter-driver-widget-diagnostics-fix

Conversation

@jacek-marchwicki
Copy link
Copy Markdown
Contributor

Description

Previously getWidgetDiagnostics were returning a render object diagnostics instead of the widget diagnostics.
The method has been returning the same data as getRenderObjectDiagnostics.

This is my first contribution to the project, so please forgive me If I do something incorrectly.

Related Issues

No issues related.
Related change: #34440

Tests

The code wasn't covered by tests, so added sends the getWidgetDiagnostics command and sends the getRenderObjectDiagnostics command tests.

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I updated/added relevant documentation (doc comments with ///). No new features
  • All existing and new tests are passing. (Hopefully, yes. I've executed (cd packages/flutter_driver && ../../bin/flutter test))
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

It's hard to say if this is a breaking change. Actually, the method has been returning incorrect results. So the results of using the method in tests are different now.

@fluttergithubbot fluttergithubbot added a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels. labels Dec 3, 2019
}) async {
return _sendCommand(GetDiagnosticsTree(
finder,
DiagnosticsType.renderObject,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: you can see that this was exactly the same implementation as getRenderObjectDiagnostics:

  Future<Map<String, Object>> getRenderObjectDiagnostics(
      SerializableFinder finder, {
      int subtreeDepth = 0,
      bool includeProperties = true,
      Duration timeout,
  }) async {
    return _sendCommand(GetDiagnosticsTree(
      finder,
      DiagnosticsType.renderObject,
      subtreeDepth: subtreeDepth,
      includeProperties: includeProperties,
      timeout: timeout,
    ));
  }

Copy link
Copy Markdown
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fluttergithubbot fluttergithubbot merged commit 50532f3 into flutter:master Dec 4, 2019
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants