Test PaymentRequest using automated web-platform-tests
Reported by
rob.b...@samsung.com,
Apr 25 2017
|
||||
Issue descriptionRight 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.
,
Apr 25 2017
,
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.
,
Jun 19 2017
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.
,
Aug 28 2017
,
Sep 13 2017
FYI, we have *manual.https.html files on https://w3c-test.org/payment-request/ for this purpose now. |
||||
►
Sign in to add a comment |
||||
Comment 1 by rob.b...@samsung.com
, Apr 25 2017