Commit graph

70 commits

Author SHA1 Message Date
Victor Porof
1f830c96da Bug 1561435 - Format browser/components/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36042

--HG--
extra : source : d3afcafdce650a6f36cebbc126ee93b17f13cf52
2019-07-05 09:53:32 +02:00
Diego Pino Garcia
3c5b7bc26a Bug 1446158 - Create a handleEvent custom element mixin to forward events from handleEvent to on* methods. r=MattN 2018-12-20 03:28:00 +02:00
Coroiu Cristina
8b010df0fc Backed out changeset 7ca43b63f0e9 (bug 1446158) for ESlint failure at browser/components/payments/res/containers/address-form.js 2018-12-18 22:08:03 +02:00
Diego Pino Garcia
76f1ed4180 Bug 1446158 - Create a handleEvent custom element mixin to forward events from handleEvent to on* methods. r=MattN 2018-12-18 06:56:00 +02:00
Diego Pino Garcia
29cb3d46ea Bug 1476873 - Use Element.toggleAttribute instead of custom handling for setAttribute vs. removeAttribute. r=Mattn 2018-12-15 01:58:00 +02:00
Sam Foster
44f245f69d Bug 1481481 - Create separate forms for shipping, payer and billing address r=MattN
* New AddressForm instances for each address type
* Move selected-state-key out of state for the address forms, and into an attribute
* Remove passing form title via state, just use data-title-edit and data-title-add on the element
* Remove shippingOption form title logic from address picker, just set the right attribute values from PaymentDialog
* Move setting the extraRequiredFields data attribute the payer form needs out to the payment-dialog's render.
* Amend onboarding logic to direct to billing address form when necessary
* Fix-up tests

Differential Revision: https://phabricator.services.mozilla.com/D11545

--HG--
extra : moz-landing-system : lando
2018-11-21 19:23:27 +00:00
Sam Foster
aa95912b8b Bug 1482689 - Use AddressPicker for the card billing address UI. r=MattN
* New BillingAddressPicker subclass of AddressPicker which just overrides some of the state-related behavior that
* Allow the RichSelect's popupBox (<select>) to be assigned after the constructor
* A couple new mochitests for the new/different behavior
* Update the test to expect 'edit' to be hidden when the empty option is selected

Differential Revision: https://phabricator.services.mozilla.com/D9321

--HG--
extra : moz-landing-system : lando
2018-11-06 00:28:46 +00:00
Matthew Noorenberghe
04e84ad672 Bug 1482689 - Don't import payment-dialog.js from other elements. r=sfoster
Importing payment-dialog.js ends up importing every other element because it imports the elements needed to render the full dialog.
We don't want all of our elements to depend on every other payment one so we shouldn't import payment-dialog.js anywhere in non-test code.

Differential Revision: https://phabricator.services.mozilla.com/D10576

--HG--
extra : moz-landing-system : lando
2018-11-06 00:19:10 +00:00
Brindusan Cristian
94b707cdd4 Backed out changeset ea5d6df24de0 (bug 1482689) as requested by sfoster. 2018-11-06 02:20:51 +02:00
Sam Foster
47668991be Bug 1482689 - Use AddressPicker for the card billing address UI. r=MattN
* New BillingAddressPicker subclass of AddressPicker which just overrides some of the state-related behavior that
* Allow the RichSelect's popupBox (<select>) to be assigned after the constructor
* A couple new mochitests for the new/different behavior
* Update the test to expect 'edit' to be hidden when the empty option is selected

Differential Revision: https://phabricator.services.mozilla.com/D9321

--HG--
extra : moz-landing-system : lando
2018-11-06 00:04:42 +00:00
Cosmin Sabou
d5f49855cd Backed out 2 changesets (bug 1482689) for browser chrome failures on browser_address_edit.js
Backed out changeset 61b49da4b9cb (bug 1482689)
Backed out changeset c810cab5dbdb (bug 1482689)
2018-11-05 18:28:15 +02:00
Sam Foster
2dbcd5bcca Bug 1482689 - Use AddressPicker for the card billing address UI. r=MattN
* New BillingAddressPicker subclass of AddressPicker which just overrides some of the state-related behavior that isn't applicable to billing addresses.
* A couple new mochitests for the new/different behavior

Differential Revision: https://phabricator.services.mozilla.com/D9321

--HG--
extra : moz-landing-system : lando
2018-11-05 15:16:02 +00:00
Matthew Noorenberghe
2e969bf86c Bug 1482689 - Don't import payment-dialog.js from other elements. r=sfoster
Importing payment-dialog.js ends up importing every other element because it imports the elements needed to render the full dialog.
We don't want all of our elements to depend on every other payment one so we shouldn't import payment-dialog.js anywhere in non-test code.

Differential Revision: https://phabricator.services.mozilla.com/D10576

--HG--
extra : moz-landing-system : lando
2018-11-01 22:01:50 +00:00
Diego Pino Garcia
ed5d90b2bc 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
2018-10-18 23:56:00 +03:00
Noemi Erli
e3e15418e9 Backed out changeset 8b3b53341da2 (bug 1497514) for failures in browser/components/payments/test/mochitest/test_basic_card_form.html
--HG--
rename : browser/components/payments/test/browser/browser_onboarding_wizard.js => browser/components/payments/test/browser/browser_payments_onboarding_wizard.js
2018-10-19 03:50:32 +03:00
Diego Pino Garcia
d875812fa7 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
2018-10-18 15:25:49 -07:00
Jared Wein
4a3b48e09b Bug 1470199 - Add a tooltip for the CVV input. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D7473

--HG--
extra : moz-landing-system : lando
2018-10-13 00:39:02 +00:00
Sam Foster
b1cda8a12a Bug 1473662 - Save button should be labelled 'Next' when adding a new address or card. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D7209

--HG--
extra : moz-landing-system : lando
2018-09-28 20:00:03 +00:00
Sam Foster
b6ecb8ed07 Bug 1477102 - Toggle accepted cards list on add/edit cards. Add stub for using AppConstants.MOZILLA_OFFICIAL to fallback for non-branded builds. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D7025

--HG--
extra : moz-landing-system : lando
2018-09-28 16:53:37 +00:00
Matthew Noorenberghe
05d5fb0939 Bug 1490805 - Add a required CSC/CVV field to the add card page. r=jaws
Depends on D6882

Differential Revision: https://phabricator.services.mozilla.com/D6883

--HG--
extra : moz-landing-system : lando
2018-09-27 17:26:24 +00:00
Jared Wein
3dc4f24d54 Bug 1470168 - Add tooltip beside 'Save to Firefox' checkbox. r=MattN
I had to move the tooltip to appear above the help icon to make sure that it cause scrollbars to appear on the address form.

Differential Revision: https://phabricator.services.mozilla.com/D6912

--HG--
extra : moz-landing-system : lando
2018-09-27 14:11:39 +00:00
Matthew Noorenberghe
5ba6f9aa93 Bug 1480717 - Fix credit card form billing address and persist checkbox layout. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D4175

--HG--
extra : moz-landing-system : lando
2018-09-24 19:51:39 +00:00
Jared Wein
cca9a56686 Bug 1490077 - Reflect DOM validation messages on the error popup on the address and basic-card form. r=MattN
Contributions by Matthew Noorenberghe <mozilla@noorenberghe.ca>

Differential Revision: https://phabricator.services.mozilla.com/D6420

--HG--
extra : rebase_source : eb6ef8494e76e1ceef14cd8b9214fa6d1ba782b5
2018-09-21 00:15:56 -07:00
Noemi Erli
3185c676dd Backed out 2 changesets (bug 1490077) for failures in browser/components/payments/test/mochitest/test_address_option.html on a CLOSED TREE
Backed out changeset 9b038cd736cf (bug 1490077)
Backed out changeset 29f6f86fb9cd (bug 1490077)
2018-09-21 11:01:46 +03:00
Jared Wein
e4f770624b Bug 1490077 - Reflect DOM validation messages on the error popup on the address and basic-card form. r=MattN
Contributions by Matthew Noorenberghe <mozilla@noorenberghe.ca>

Differential Revision: https://phabricator.services.mozilla.com/D6420
2018-09-21 00:15:56 -07:00
Jared Wein
d0800c709e Bug 1491791 - Update the Save button state after the 'change' event. r=MattN
The validity of the cc-number field is only updated to a failure state after the 'change' event in the EditCreditCard class, but there was no code within basic-card-form.js to update the Save button enabled state after the 'change' event had been handled by EditCreditCard.

Differential Revision: https://phabricator.services.mozilla.com/D6282

--HG--
extra : moz-landing-system : lando
2018-09-20 17:13:26 +00:00
Sam Foster
0f49c56e72 Bug 1491065 - Use 'Next' as label for the save buttons during onboarding. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D6318

--HG--
extra : moz-landing-system : lando
2018-09-19 22:10:50 +00:00
Sam Foster
de8e9161fa Bug 1429181 - Consider supportedNetworks when determining if payment method is valid. r=MattN
* A new accepted-cards element to represent the labeled list of card icons
* Add the accepted cards section to the summary and card add/edit page
* mochitest for the accepted-cards element
* Make cc-type a required field and validate it against the list of supported networks
* Add verification of the pay button disabling when card network is not supported

Depends on D5823

Differential Revision: https://phabricator.services.mozilla.com/D5824

--HG--
extra : moz-landing-system : lando
2018-09-19 18:15:11 +00:00
Bogdan Tara
726c5b5e54 Backed out changeset 7351a4c8d1a1 (bug 1429181) for multiple payment-related failures CLOSED TREE 2018-09-15 00:58:48 +03:00
Sam Foster
3b20596ca5 Bug 1429181 - Consider supportedNetworks when determining if payment method is valid. r=MattN
* A new accepted-cards element to represent the labeled list of card icons
* Add the accepted cards section to the summary and card add/edit page
* mochitest for the accepted-cards element
* Make cc-type a required field and validate it against the list of supported networks
* Add verification of the pay button disabling when card network is not supported

Depends on D5823

Differential Revision: https://phabricator.services.mozilla.com/D5824

--HG--
extra : moz-landing-system : lando
2018-09-14 20:28:41 +00:00
Sam Foster
2f87b0ad28 Bug 1477105 - Support cc-type as valid field for credit cards in form autofill. r=MattN
* Add cc-type as a valid field for credit card forms
* Add a select menu and new string for designating a card type in the add/edit form
* Enforce matching of cc-type to one of the list of supported network ids for Basic Card
* Expose the network ids list as CreditCard.SUPPORTED_TYPES
* Populate the cc-type options using a getCreditCardTypes util method passed into the EditCreditCard constructor

* Web Payment tests: verify cc-type picker is presented, populated as expected and selections received in the response

MozReview-Commit-ID: 9QyU1UwTRay

Differential Revision: https://phabricator.services.mozilla.com/D3830

--HG--
extra : rebase_source : 4ffffa97e845d727f1bfbcc88218992ed7d6c5a0
2018-08-28 15:59:57 -07:00
Matthew Noorenberghe
ddbfdc7178 Bug 1480886 - Position the form fields for the address-form and basic-card-form according to the spec. r=sfoster
Based on work by Jared Wein.

A follow-up will handle the persist checkbox and billing address.

Differential Revision: https://phabricator.services.mozilla.com/D4174

--HG--
extra : rebase_source : 2d06beed9083f5f565ed83f8ec0fdcaf66b10eea
2018-08-28 15:34:50 -07:00
Dorel Luca
5d1ad5e454 Backed out 2 changesets (bug 1480886) for browser-chrome failures on browser/extensions/formautofill/test/browser/browser_editAddressDialog.js. CLOSED TREE
Backed out changeset 55f933e0609f (bug 1480886)
Backed out changeset 63b68934f813 (bug 1480886)
2018-08-29 01:06:38 +03:00
Matthew Noorenberghe
38d855ba7c Bug 1480886 - Position the form fields for the address-form and basic-card-form according to the spec. r=sfoster
Based on work by Jared Wein.

A follow-up will handle the persist checkbox and billing address.

Differential Revision: https://phabricator.services.mozilla.com/D4174

--HG--
extra : rebase_source : ebca2596db11846da171ddc7d34db3dd6e161a6f
2018-08-24 16:49:53 -07:00
Jared Wein
066ed9e934 Bug 1477100 - Show the labels as placeholders inside of the fields. r=MattN
Show the labels as placeholders inside of the fields.

Differential Revision: https://phabricator.services.mozilla.com/D2955

--HG--
extra : rebase_source : 4ca24b7b6833c3c1bcd4821ec127fe07c24b44d0
2018-08-17 16:25:46 -07:00
Matthew Noorenberghe
eb2bfba0ba Bug 1476345 - Disable the address form save button when the form is invalid. r=jaws
Tests for this are in the next commit (e.g. test_address_form.html) because this can't be tested properly due to existing tests not filling fields in ways that fire input/change events.

MozReview-Commit-ID: 62CckFP6Ou3

--HG--
extra : rebase_source : 02a73ae78f6102e139cdca31e64d6248dc8d5281
2018-08-15 12:07:55 -07:00
Sam Foster
a4aca2683c Bug 1480880 - Fix exposing of payment defaults prefs object. r=MattN
MozReview-Commit-ID: DRSiGjk6wyS

--HG--
extra : rebase_source : 179cfde242c2ec965ef01c670baf26e7a06b92fb
2018-08-03 11:51:10 -07:00
Sam Foster
5b22b7f2ef Bug 1480023 - Ensure input event is handled in the correct order by waiting for EditAutofillForm constructor before adding BasicCardForm's input & change handlers. r=MattN
MozReview-Commit-ID: F9hzp54hZxX

--HG--
extra : rebase_source : 5c8e588bd931070f9925da1bc8543f6f52bdf84f
2018-08-02 17:46:56 -07:00
Jared Wein
9849e2000e Bug 1472278 - Localize the required form asterisk on the address-form, basic-card-form, and CVV entry field. r=MattN
MozReview-Commit-ID: 7VN1VY7QziT

--HG--
extra : rebase_source : b28017164a32758271059b0337e295ca4883f14b
2018-07-30 21:13:36 -04:00
Jared Wein
f9f97a19b6 Bug 1477114 - Add an asterisk to the required fields of the credit card form as well as the CVV placeholder. r=sfoster
MozReview-Commit-ID: 2zg5HOZVtxN

--HG--
extra : rebase_source : 88eff9da5e84abf8ee726ceb7fcf338ecc1f50ee
2018-07-30 17:52:24 -04:00
Brindusan Cristian
d0b636e70f Backed out changeset d402c7b803c6 (bug 1477114) as requested by jaws. 2018-08-02 23:18:53 +03:00
Jared Wein
66c08eb74d Bug 1477114 - Add an asterisk to the required fields of the credit card form as well as the CVV placeholder. r=sfoster
MozReview-Commit-ID: 2zg5HOZVtxN

--HG--
extra : rebase_source : e2ed448ec2e82a5c874e5186ee318773f3250c09
2018-07-30 17:52:24 -04:00
Sam Foster
30473eb88f Bug 1477106 - Use a pref to set default checkedness for "Save card to Firefox" and "Save address to Firefox" checkboxes. r=jaws
* Get default checkedness for the card persist checkbox from a new pref: dom.payments.defaults.saveCreditCard
* Get default checkedness for the address persist checkbox from a new pref: dom.payments.defaults.saveAddress
* Remember checked state from card page (only) so it doesnt change back when returning from add/edit address page
* Fix up card form tests to verify behavior in private/not-private windows, pref value, user opt-in for persisting the card
* Fix up address form tests to not conflate private/not-private windows with expected address persisting behaviour

MozReview-Commit-ID: GXMjqStlnlu

--HG--
extra : rebase_source : e267187766d221e4f865cb84065ea18231e7c012
2018-07-26 15:36:07 -07:00
Andreea Pavel
e3d83161a1 Backed out changeset d69e19bad6c1 (bug 1477106) for eslint failure at builds/worker/checkouts/gecko/browser/components/payments/content/paymentDialogFrameScript.js 2018-08-02 02:11:57 +03:00
Sam Foster
5275a24aca Bug 1477106 - Use a pref to set default checkedness for "Save card to Firefox" and "Save address to Firefox" checkboxes. r=jaws
* Get default checkedness for the card persist checkbox from a new pref: dom.payments.defaults.saveCreditCard
* Get default checkedness for the address persist checkbox from a new pref: dom.payments.defaults.saveAddress
* Remember checked state from card page (only) so it doesnt change back when returning from add/edit address page
* Fix up card form tests to verify behavior in private/not-private windows, pref value, user opt-in for persisting the card
* Fix up address form tests to not conflate private/not-private windows with expected address persisting behaviour

MozReview-Commit-ID: GXMjqStlnlu

--HG--
extra : rebase_source : eb5931bff4ba348503144139d3f7f625e0a4af91
2018-07-26 15:36:07 -07:00
Jared Wein
6ecd2e45dd Bug 1468153 - Update the edit strings (Add/Update) and the failure strings to use the hostname. r=sfoster
MozReview-Commit-ID: HcOMsP5zWBg

--HG--
rename : browser/components/payments/test/mochitest/test_labelled_checkbox.html => browser/components/payments/test/mochitest/test_completion_error_page.html
extra : rebase_source : a5e2ed74badabed047e707620f977081ae99247b
2018-07-30 14:22:52 -04:00
Matthew Noorenberghe
b0560084b3 Bug 1476204 - Handle autofill record update state changes in the unpriv. PR forms. r=jaws
This is easier to understand as we don't have to round-trip the whole success and error states to the privileged wrapper which could potentially lead to stale state changes.
This is also much simpler for the basic-card-form as it doesn't need a lot of the complexity of the previous implementation.

* Move selectedStateKey from page to address-page since it doesn't apply to basic-card-page

MozReview-Commit-ID: B4kiZNWElGI

--HG--
extra : rebase_source : bcca13bbdc506961834e2e3cc078dad7d6ee7ca7
2018-07-25 12:37:51 -07:00
Matthew Noorenberghe
07463fbd62 Bug 1476204 - Check Luhn algorithm in the basic-card-form and in storage and disable save button when invalid. r=jaws
* Provide an cc-exp-year option to match cc-exp-month
* Make cc-number and cc-name required in the basic-card-form
* Disable the basic-card-page save button when the form is invalid.

MozReview-Commit-ID: LjzsnAKJp6R

--HG--
extra : rebase_source : 4dcbee371cd0e30b5823b803c4f4734f897ec786
2018-07-26 13:40:22 -07:00
prathiksha
5e20dc8929 Bug 1476571 - Auto-select selectedShippingAddress as billing address when it is not null. r=MattN
MozReview-Commit-ID: 8qPIbHn7cKk

--HG--
extra : rebase_source : 023450976a481767923700f8e2ec7deb3538f4f8
2018-07-24 15:50:54 -07:00
Cosmin Sabou
80a830bce7 Backed out 5 changesets (bug 1476204) for browser chrome failures on browser_editCreditCardDialog. CLOSED TREE
Backed out changeset 10f3d1014592 (bug 1476204)
Backed out changeset a88879ea32e8 (bug 1476204)
Backed out changeset 001f13f2dd21 (bug 1476204)
Backed out changeset f0f464e3c27c (bug 1476204)
Backed out changeset ed92000eca20 (bug 1476204)
2018-07-26 04:12:56 +03:00