Skip to content

Commit

Permalink
Remove tests for supportedTypes from basic-card (#13859)
Browse files Browse the repository at this point in the history
* Remove tests for supportedTypes from basic-card

* Add historical check for supportedType

* Update payment-method-basic-card/empty-data-manual.https.html

Co-Authored-By: marcoscaceres <[email protected]>

* Update payment-method-basic-card/empty-data-manual.https.html

Co-Authored-By: marcoscaceres <[email protected]>
  • Loading branch information
marcoscaceres authored Nov 2, 2018
1 parent 5d4871b commit fb15e14
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 13 deletions.
16 changes: 3 additions & 13 deletions payment-method-basic-card/empty-data-manual.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ <h2>
The test expects the following credit card.
</p>
<ol>
<li>Add credit card:
<li>Add card:
<dl>
<dt>Cardholder name:</dt>
<dd>web platform test</dd>
Expand Down Expand Up @@ -112,22 +112,12 @@ <h2>
<ol>
<li>
<button onclick="runPromiseTest(this, {});">
When passed BasicCardRequest without members, allow the user to input of any credit card type.
</button>
</li>
<li>
<button onclick="runPromiseTest(this, { supportedNetworks: [], supportedTypes: [] });">
Returns any card type on any network, because zero length supportedNetworks and supportedTypes.
When passed BasicCardRequest without members, allow the user to input a card on any network.
</button>
</li>
<li>
<button onclick="runPromiseTest(this, { supportedNetworks: [] });">
Returns any card type on any network, because supportedNetworks is missing and supportedTypes is empty.
</button>
</li>
<li>
<button onclick="runPromiseTest(this, { supportedTypes: [] });">
Returns any card type on any network missing supportedTypes, and empty supportedNetwork.
Returns a card on any network, because zero length supportedNetworks.
</button>
</li>
</ol>
Expand Down
25 changes: 25 additions & 0 deletions payment-method-basic-card/historical.https.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!doctype html>
<meta charset=utf-8>
<title>Historical Basic Card Changes</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
// https://github.com/w3c/payment-method-basic-card/pull/62
test(() => {
try {
new PaymentRequest(
[
{
supportedMethods: "basic-card",
supportedTypes: [
"this was an enum value once - so this would have thrown",
],
},
],
{ total: { label: "bar", amount: { currency: "BAZ", value: "0" } } }
);
} catch (err) {
assert_unreached("Unexpected error");
}
}, "supportedTypes and BasicCardType enum were removed from the spec");
</script>

0 comments on commit fb15e14

Please sign in to comment.