Bug 1504172 [wpt PR 13859] - Remove tests for supportedTypes from basic-card, a=testonly

Automatic update from web-platform-testsRemove tests for supportedTypes from basic-card (#13859)

* 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 <marcos@marcosc.com>

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

Co-Authored-By: marcoscaceres <marcos@marcosc.com>

--

wpt-commits: fb15e14b52049f952612623ee0d7fb7a620a57c9
wpt-pr: 13859
This commit is contained in:
Marcos Cáceres 2018-11-09 16:58:12 +00:00 коммит произвёл moz-wptsync-bot
Родитель 702069faba
Коммит b676d37749
2 изменённых файлов: 28 добавлений и 13 удалений

Просмотреть файл

@ -77,7 +77,7 @@ function runPromiseTest(button, data, expectedCard = visaCredit, expectedAddress
The test expects the following credit card. The test expects the following credit card.
</p> </p>
<ol> <ol>
<li>Add credit card: <li>Add card:
<dl> <dl>
<dt>Cardholder name:</dt> <dt>Cardholder name:</dt>
<dd>web platform test</dd> <dd>web platform test</dd>
@ -112,22 +112,12 @@ function runPromiseTest(button, data, expectedCard = visaCredit, expectedAddress
<ol> <ol>
<li> <li>
<button onclick="runPromiseTest(this, {});"> <button onclick="runPromiseTest(this, {});">
When passed BasicCardRequest without members, allow the user to input of any credit card type. When passed BasicCardRequest without members, allow the user to input a card on any network.
</button>
</li>
<li>
<button onclick="runPromiseTest(this, { supportedNetworks: [], supportedTypes: [] });">
Returns any card type on any network, because zero length supportedNetworks and supportedTypes.
</button> </button>
</li> </li>
<li> <li>
<button onclick="runPromiseTest(this, { supportedNetworks: [] });"> <button onclick="runPromiseTest(this, { supportedNetworks: [] });">
Returns any card type on any network, because supportedNetworks is missing and supportedTypes is empty. Returns a card on any network, because zero length supportedNetworks.
</button>
</li>
<li>
<button onclick="runPromiseTest(this, { supportedTypes: [] });">
Returns any card type on any network missing supportedTypes, and empty supportedNetwork.
</button> </button>
</li> </li>
</ol> </ol>

Просмотреть файл

@ -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>