Skip to content

Fix group handling for widget tests (#1249). #1258

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

Merged
merged 2 commits into from
Aug 3, 2017

Conversation

pq
Copy link
Contributor

@pq pq commented Aug 2, 2017

Copy link
Member

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

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

lgtm

@pq, can you open an issue to upstream the necessary changes to DartTestEventsConverterZ.java and DartTestLocationProviderZ.java (access related?); I'm worried about the technical debt we'll accumulate otherwise -

private static boolean isSyntheticWidgetTestGroup(@NotNull Group group) {
return Objects.equals(group.getUrl(), "package:flutter_test/src/widget_tester.dart") &&
Objects.equals(group.getName(), SYNTHETIC_WIDGET_GROUP_NAME);
private static boolean isSyntheticWidgetTestGroup(@Nullable Item group) {
Copy link
Member

Choose a reason for hiding this comment

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

rename the param to item?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Done.

Objects.equals(group.getName(), SYNTHETIC_WIDGET_GROUP_NAME);
private static boolean isSyntheticWidgetTestGroup(@Nullable Item group) {
return group instanceof Group && Objects.equals(group.getUrl(), "package:flutter_test/src/widget_tester.dart") &&
group.getName().endsWith(SYNTHETIC_WIDGET_GROUP_NAME);
Copy link
Member

Choose a reason for hiding this comment

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

I'm guessing group.getName() will always be non-null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, I think so but I'm not sure it's specified so better safe than sorry; will fix.

Thanks!

@pq
Copy link
Contributor Author

pq commented Aug 3, 2017

#1260 opened to track upstreaming 👍

@pq pq merged commit 068a731 into flutter:master Aug 3, 2017
@pq pq deleted the widget_test_groups branch March 16, 2018 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants