Bug 1497514 - Initialize BasicCardPage selectedStateKey to 'selectPaymentCard'. r=MattN

Also require basicCardPage has a selectedStateKey

--HG--
rename : browser/components/payments/test/browser/browser_payments_onboarding_wizard.js => browser/components/payments/test/browser/browser_onboarding_wizard.js
extra : rebase_source : f73b3b3f0a5c5ec94ffdbf722f4887097d05d97d
This commit is contained in:
Diego Pino Garcia 2018-10-18 15:25:49 -07:00
Родитель 2b4f3e8c24
Коммит d875812fa7
5 изменённых файлов: 9 добавлений и 2 удалений

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

@ -151,6 +151,10 @@ export default class BasicCardForm extends PaymentStateSubscriberMixin(PaymentRe
return;
}
if (!basicCardPage.selectedStateKey) {
throw new Error("A `selectedStateKey` is required");
}
let editing = !!basicCardPage.guid;
this.cancelButton.textContent = this.dataset.cancelButtonLabel;
this.backButton.textContent = this.dataset.backButtonLabel;

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

@ -17,7 +17,7 @@ export let requestStore = new PaymentsStore({
"basic-card-page": {
guid: null,
// preserveFieldValues: true,
selectedStateKey: null,
selectedStateKey: "selectedPaymentCard",
},
"address-page": {
guid: null,

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

@ -167,6 +167,9 @@ var paymentRequest = {
id: "basic-card-page",
onboardingWizard: true,
};
state["basic-card-page"] = {
selectedStateKey: "selectedPaymentCard",
};
}
paymentDialog.setStateFromParent(state);

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

@ -14,9 +14,9 @@ skip-if = os == 'linux' && debug # bug 1465673
[browser_change_shipping.js]
[browser_dropdowns.js]
[browser_host_name.js]
[browser_onboarding_wizard.js]
[browser_openPreferences.js]
[browser_payment_completion.js]
[browser_payments_onboarding_wizard.js]
[browser_profile_storage.js]
[browser_request_serialization.js]
[browser_request_shipping.js]