New issue
Advanced search Search tips

Issue 715243 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 707649


Participants' hotlists:
Payment-Interop


Sign in to add a comment

Test PaymentRequest using automated web-platform-tests

Reported by rob.b...@samsung.com, Apr 25 2017

Issue description

Right now we have layout tests and integration tests simulating user actions using Java. We would like to have WPT tests for the latter, i.e test the payment flow, client constructs and shows a PaymentRequest from JS, the payment dialog shows up, user selects a payment app, pays using the payment app etc.

It seems for this to work we have to be able to identify UI elements like 'Pay' or 'Cancel' buttons and activate them. WPT as I understand has no support for this atm.
 
Hard part seems to me dealing with the launched payment app in a sane way...
Cc: foolip@chromium.org

Comment 3 by foolip@chromium.org, Apr 26 2017

Rather than trying to interact with the browser UI, another approach might be an API (maybe using WebDriver) that can determine the outcome of show() and canMakePayment() without showing any UI, essentially mocking the UI bits.

For https://w3c.github.io/browser-payment-api/#dom-paymentrequest-show(), it might be some kind of callback with a request ID, in response to which one can at any later time call back into the browser with a PaymentResponse representation or failure that is used to resolve/reject the promise.
Owner: rouslan@chromium.org
Status: Available (was: Untriaged)
FYI, we're going with this proposal from Mozilla:

https://marcoscaceres.github.io/payment-method-web-platform-test/

This would be implemented using a Js mojo mock of the PaymentRequest service a la:

https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/payments/resources/payment-request-mock.js

This would reside in:

https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/external/wpt_automation/

Feel free to take this on, if you want.
Status: Assigned (was: Available)
FYI, we have *manual.https.html files on https://w3c-test.org/payment-request/ for this purpose now.

Sign in to add a comment