Skip to content
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

Add detailed network info to the device information endpoint #265

Merged
merged 5 commits into from
Apr 16, 2019

Conversation

mykola-mokhnach
Copy link
Contributor

@@ -38,6 +45,51 @@ public GetDeviceInfo(String mappedUri) {
super(mappedUri);
}

private static JSONArray networksInfoToJSON(DeviceInfoHelper deviceInfoHelper,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the s is needed. networkInfoToJSON would be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

Copy link
Contributor

@dpgraham dpgraham left a comment

Choose a reason for hiding this comment

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

Looks good. Just one minor comment.

}
resultItem.put("capabilities", formatNull(networkCaps == null ? null : caps));

if (networkCaps != null || networkInfo != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we check that resultItem is not empty?

if (resultItem.length() > 0) { ... }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

@dpgraham
Copy link
Contributor

I'd like to add a test for this in appium-uiautomator2-driver when this is published.

@mykola-mokhnach
Copy link
Contributor Author

I've added an integration test for getInfo endpoint for this module

@dpgraham dpgraham merged commit 58529d3 into appium:master Apr 16, 2019
@mykola-mokhnach mykola-mokhnach deleted the net_info branch April 16, 2019 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants