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

Fix queryAppState protocol #3977

Merged

Conversation

nextlevelbeard
Copy link
Member

@nextlevelbeard nextlevelbeard commented May 15, 2019

Proposed changes

Fixes #3976

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Reviewers: @webdriverio/technical-committee

@jsf-clabot
Copy link

jsf-clabot commented May 15, 2019

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented May 15, 2019

Codecov Report

Merging #3977 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3977   +/-   ##
=======================================
  Coverage   98.59%   98.59%           
=======================================
  Files         155      155           
  Lines        3496     3496           
  Branches      767      767           
=======================================
  Hits         3447     3447           
  Misses         44       44           
  Partials        5        5

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c97d37...745586f. Read the comment docs.

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

Sorry, it seems this in not correct according to the Appium docs: http://appium.io/docs/en/commands/device/app/app-state/

@nextlevelbeard
Copy link
Member Author

nextlevelbeard commented May 15, 2019

@christian-bromann Just noticed but it may be out of date.
A POST method has been added to the JSONWP Specification in appium/appium-base-driver#185.

https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L472 .

Could you try to reproduce #3976 ?

@mgrybyk
Copy link
Member

mgrybyk commented May 17, 2019

According to https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L472 both GET and POST methods should be supported. Most likely one of them is outdated and exists for compatibility.

However according to http://appium.io/docs/en/commands/device/app/app-state/ it should be GET, which is not necessarily correct because queryAppState request has payload.

I don't mind changing it from GET to POST if POST works with latest Appium version, which seems to be true.

@nextlevelbeard nextlevelbeard changed the title WIP: Fix queryAppState protocol Fix queryAppState protocol May 18, 2019
@nextlevelbeard
Copy link
Member Author

I don't mind changing it from GET to POST if POST works with latest Appium version, which seems to be true.

It seems to be true for me and just to reinforce: this isn't a nitpicking thing like "we should use POST cause I feel like it". By using GET, the queryAppState command is not working for me right now, as I've detailed in #3976. An empty payload is sent instead of the appId/bundleId.

@christian-bromann christian-bromann dismissed their stale review May 18, 2019 14:58

Fix queryAppState protocol (#3977)

@christian-bromann christian-bromann added the PR: Spec Compliancy 👓 PRs that contain changes to the protocol specs label May 18, 2019
@christian-bromann christian-bromann merged commit ee1b95c into webdriverio:master May 18, 2019
yamkay pushed a commit to MoveInc/webdriverio that referenced this pull request Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Spec Compliancy 👓 PRs that contain changes to the protocol specs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

queryAppState not working correctly
4 participants