Consider specifying a testing IDL for a mock payment UI
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 510
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Description
WebKit has converted some of the manual payment-request tests into automated tests by creating a mock payment UI in our testing harness that can be scripted from the test. Here's what the IDL looks like right now:
interface MockPaymentCoordinator {
void setShippingAddress(MockPaymentAddress shippingAddress);
void changeShippingOption(DOMString shippingOption);
void changePaymentMethod(ApplePayPaymentMethod paymentMethod);
void acceptPayment();
void cancelPayment();
readonly attribute ApplePayLineItem total;
readonly attribute sequence<ApplePayLineItem> lineItems;
readonly attribute sequence<MockPaymentError> errors;
};
This is specific to Apple Pay right now, and is missing some stuff, so obviously this wouldn't be used as-is.
But maybe we could specify something like this so that (a) the WebKit-specific tests could be upstreamed to WPT, and (b) other browsers could run them.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the MockPaymentCoordinator IDL shown in the issue and the existing WebKit automated payment-request tests described there. Determine the scope of a browser-neutral testing IDL and what would be needed for the tests to be upstreamed to WPT and run by other browsers; done means the proposal is specified and agreed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- api, payments, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100