Saving and filling the countries via Form Autofill will still be limited to certain countries
but this allows the storage to be useful for Web Payments in other countries.
Differential Revision: https://phabricator.services.mozilla.com/D5194
--HG--
extra : amend_source : c6810478b747cf51aaaafa73f83682cb23711231
Contributions by Matthew Noorenberghe <mozilla@noorenberghe.ca>
Differential Revision: https://phabricator.services.mozilla.com/D6420
--HG--
extra : rebase_source : eb6ef8494e76e1ceef14cd8b9214fa6d1ba782b5
* Blur before focus to reset timer for filtering <select>
* Wait for field to get focus before sending keys to it.
* Compare unpadded strings
Differential Revision: https://phabricator.services.mozilla.com/D6338
* We get the shared colours (including hover) and dropmarker.
* Makes it harder to regress the clickable area of the <rich-select> since the problem will be visible.
* Hides the text for the closed state of the <select> so the <rich-option> text can be presented.
Differential Revision: https://phabricator.services.mozilla.com/D6330
--HG--
extra : moz-landing-system : lando
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
synthesizeKey requires the prefix of the label which would be whitespace without cc-type so add a cc-type
Depends on D6231
Differential Revision: https://phabricator.services.mozilla.com/D6232
--HG--
extra : moz-landing-system : lando
a) We have two names starting with the same prefix: "Mrs." which causes problem when typing on a <select> to filter, especially if the desired option is already selected.
b) The prefix of the payment method option would start with whitespace if cc-type is "".
c) There would be no state change for the shipping option picker when we're requesting to select the option that's already selected.
Depends on D6230
Differential Revision: https://phabricator.services.mozilla.com/D6231
--HG--
extra : moz-landing-system : lando
* 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
* 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
* Includes a workaround to explicitly cloneInto the paymentMethods data when we create the PaymentRequest object in the content window in tests.
MozReview-Commit-ID: LFy0h3fIXXA
Differential Revision: https://phabricator.services.mozilla.com/D5823
--HG--
extra : moz-landing-system : lando
This also makes various AutofillRecords methods async, with the exception of
remove() and removeAll().
Noted that I didn't implement any kind of "lock" for FormAutofillStorage --
please do not call these methods concurrently -- if you must please |await|
for the last call to resolve. This most likely would happen in tests, and
shouldn't happen in the real world, given that all user actions happen on
macrotasks, and probably not at the next tick, unless Quicksilver is a
Firefox user.
FormAutofillStorage can be improved if there are complex use cases for it.
Differential Revision: https://phabricator.services.mozilla.com/D4420
--HG--
extra : moz-landing-system : lando
This also makes various AutofillRecords methods async, with the exception of
remove() and removeAll().
Noted that I didn't implement any kind of "lock" for FormAutofillStorage --
please do not call these methods concurrently -- if you must please |await|
for the last call to resolve. This most likely would happen in tests, and
shouldn't happen in the real world, given that all user actions happen on
macrotasks, and probably not at the next tick, unless Quicksilver is a
Firefox user.
FormAutofillStorage can be improved if there are complex use cases for it.
Differential Revision: https://phabricator.services.mozilla.com/D4420
--HG--
extra : moz-landing-system : lando
* 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
Honour the .selected value provided by the merchant.
Differential Revision: https://phabricator.services.mozilla.com/D3668
--HG--
extra : rebase_source : a7ea701d875f3052dabad16ca90419f7f3f3849c
extra : amend_source : 1fe3c1ecff45d73761ae848d044911c27e1840ae
Show the labels as placeholders inside of the fields.
Differential Revision: https://phabricator.services.mozilla.com/D2955
--HG--
extra : rebase_source : 4ca24b7b6833c3c1bcd4821ec127fe07c24b44d0
When editing an existing record, invalid fields should be indicated on load.
Differential Revision: https://phabricator.services.mozilla.com/D3397
MozReview-Commit-ID: CbrqEyCUoyC
--HG--
extra : rebase_source : f44dc1b66d0c37d2b301a6b5c33ddde9fa7181bf
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
Sometimes .errorMessage exists without .message
MozReview-Commit-ID: D4zBJKxfJba
--HG--
extra : rebase_source : b665ab4c79a894462064662bbf8bcc49e320d7ce
* 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
* 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
* Use onWindowClose to spot closing windows associated with live payment requests and send a reject response
* Test to verify expected show() promise rejection behavior when closing the PR dialog
MozReview-Commit-ID: 2TJYN5NMrE6
--HG--
extra : rebase_source : 83cdfbe760f5df7e4786ac277e1ecabd3a4b08d8
`errorMessage` only contains 'TypeError: docShell is null' whereas `message` contains the file path and line.
MozReview-Commit-ID: 7Tuqph1b3lV
--HG--
extra : rebase_source : fdf20be275adaac41f25ebeee67d142456f4da8b
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
* 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
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 : 183a3bd44ed33566fccdc024eabdccef83554d50
* 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 : 467fa09ea07c0234e1839b6dfd7e53375c118104
* A new CompletionErrorPage / completion-error-page element which represents the content of the completion error
* Leave the dialog open when complete() results in a 'fail' or 'timeout'.
* The 'done' button on the fail & timeout error page closes the dialog by sending a message up to the paymentDialogWrapper.
* Rewrite the pay button rendering logic to ensure it is disabled when it should be
* Retry handling and UI not addressed here. Will need a new bug when the DOM support has landed.
* Extend completeStatus support in debugging.html and group like actions to tidy up a bit
MozReview-Commit-ID: GDhJqrj14uT
* Add tests to verify that the dialog stays open when completion fails or times out
* Add tests to verify that complete() throws after the timeout
* Rework completeStatus mochitest for PaymentDialog
MozReview-Commit-ID: 4ZNVEYMp7h5
--HG--
extra : rebase_source : 1d8e691eb44e74156a956dff73e1359af2a6934a
* Spot-fix order details test to clone request before modifying it
MozReview-Commit-ID: AXjI1veRSk9
--HG--
extra : rebase_source : ee12efc493c343b9f18cee2cb281a5fe6731731d
* Test helpers for cards
* Refactor the test_add_link test to test in private & non-private window
MozReview-Commit-ID: AeVJOkSwQps
--HG--
extra : rebase_source : 6e8380826bcac87bc408ff75a6a398b5c4f6cafa
* addSampleAddressesAndBasicCard now accepts arrays of addresses and card, but with no args defaults to its original behavior
* addAddressRecord and addCardRecord helpers
* New helpers for each step in the sequence of clicking through to add a new address
MozReview-Commit-ID: Dto5MSekJTV
--HG--
extra : rebase_source : be32c684dba62d051bb119a530437830e41bb128
* Check update of displayItems, additionalDisplay items and total (via a modifier.)
MozReview-Commit-ID: B4L7Ev9yR2f
--HG--
extra : rebase_source : 98fb71b7a71f9f30106c78bd35b4f10ff8f179b6
- Remove getTextContent since it was too verbose and unneeded.
- Replace isElementVisible with content-available isVisible and isHidden since it is more convenient to check these within content tasks.
- Removed browser_request_summary.js test since what it was testing is now covered by many other tests.
- Added a checkPaymentMethodDetailsMatchesCard function to head.js to reduce duplication of card verification tests.
- Changed some tests to use pre-defined addresses and cards instead of supplying their own.
MozReview-Commit-ID: FLwDKFJQNUY
--HG--
extra : rebase_source : 98b3675e8187073948332ef12f9f2604c6f63e9f
- Remove getTextContent since it was too verbose and unneeded.
- Replace isElementVisible with content-available isVisible and isHidden since it is more convenient to check these within content tasks.
- Removed browser_request_summary.js test since what it was testing is now covered by many other tests.
- Added a checkPaymentMethodDetailsMatchesCard function to head.js to reduce duplication of card verification tests.
- Changed some tests to use pre-defined addresses and cards instead of supplying their own.
MozReview-Commit-ID: FLwDKFJQNUY
--HG--
extra : rebase_source : cbf608ebcd872bb66d78be2b429dcb88ffedbf35
* Implement store in paymentDialogWrapper for temporary addresses & creditCards
* Add the persist checkbox to the add/edit address form. Defaults to unchecked when adding an address in a private session.
* The union of saved and temporary addresses can be retrieved from paymentRequest.getAddresses(). References to state.savedAddresses updated to use this when appropriate
* New tests for adding and editing addresses from a private window
MozReview-Commit-ID: KyD2BPNFYtZ
--HG--
extra : rebase_source : 28e17a2c018a684fab42b1321b739047b1522884
This is possibly a temporary solution to avoid sending the user's address to the merchant until they've interacted with the shipping address picker.
MozReview-Commit-ID: 5q8BYr1rLwP
--HG--
extra : rebase_source : e6c5ecee96acc4aaa25c2082b7d6a654bb82e135