This rewrites the lazy getters, so that the lazy getter is defined at the call point, which makes it
easier for linters to understand what is being defined.
In some cases, the log is not being used, so the definition code is removed.
Differential Revision: https://phabricator.services.mozilla.com/D149716
When there is a label element right before a credit card expiry input, we will try and parse this label
as a placeholder. This allows our autofill to work as expected in cases where
the label is not wrapped around the expiry input.
Differential Revision: https://phabricator.services.mozilla.com/D145026
The previous `cc_form` event telemetry lack the following information:
1. Field-specific information.
* cc-exp, cc-exp-month, and cc-exp-year are all merged to cc-exp
* no cc-type
2. Clear form action
The `cc_form_v2` event telemetry aims to collect field specific
information so we can know whether we perform particular bad (or good)
on certain fields.
Differential Revision: https://phabricator.services.mozilla.com/D141009
This patch adds CreditCardTelemetryUtils object to process credit card related telemetry.
This patches doesn't change the logic regarding how we record telemetry.
Differential Revision: https://phabricator.services.mozilla.com/D141008
Changes the presentation format of expiry date to MM/YYYY so that Zalando's payment site doesn't break when we fill expiry dates.
Reorders the credit card transformers so that the expiry date transformer runs before the match select transformer.
This is to ensure the presentation form of expiry date (MM/YYYY) is used to create cached values for possible select element matches, as opposed to the underlying storage format of expiry date (YYYY-MM).
Because the 'profile' used in getAdaptedProfiles becomes a presentation ready form of the stored data, I've written a note explaining why the default test credit card record now has a expiry date format of 'MM/YYYY' as opposed to the old format.
Differential Revision: https://phabricator.services.mozilla.com/D125884
Enable the feature only in Nightly.
Add functionality for previewing and autofilling into multiple cc-number fields.
Fix test_Lush.js case.
Add logic to handle credit card saving/update when multiple cc-number fields are present.
Add heuristic test for Lufthansa site.
Add test for filling cc-number when there are multiple cc-number fields in a form.
Add test for collecting multiple cc-number fields via collectFormFields.
Add multiple cc-number fields case to onFormSubmitted test.
Add multiple cc-number fields with maxlength=4 case to markAsAutofillField.
Add implementation of the preview and fill test cases for multiple cc-number fields.
Differential Revision: https://phabricator.services.mozilla.com/D127987
Enables autofilling into fields that may have been filled by the site.
Enables autofill preview to work as expected if a field already has a value.
Ensures autofill does not restore the default value if the user manually clears out the field's value.
This fixes the case on next.co.uk where the value of the cardholder name is being used as a placeholder.
Differential Revision: https://phabricator.services.mozilla.com/D123260
Our previous regex did not parse "AAAA" or "AA" so I've added this to the transformation regex.
For the year first regex, I added a separate regex because trying to bolt on the missing "AA" caused the resulting parsed result to drop characters for other locales ("yyyy" became "yyy" and the same with "aaaa").
Remove backslash as a supported month/year divider when checking expiry date placeholders.
Differential Revision: https://phabricator.services.mozilla.com/D120550
Our previous regex did not parse "AAAA" or "AA" so I've added this to the transformation regex.
For the year first regex, I added a separate regex because trying to bolt on the missing "AA" caused the resulting parsed result to drop characters for other locales ("yyyy" became "yyy" and the same with "aaaa").
Remove backslash as a supported month/year divider when checking expiry date placeholders.
Differential Revision: https://phabricator.services.mozilla.com/D120550
Fixes the case where credit card autofill incorrectly fills the expiration month due to input elements and placeholders on those input elements.
Enables unit tests for form autofill.
Additionally adds tests to ensure the previous behavior of autofilling expiration month using select elements.
Added workarounds in tests so that we don't change the reality of the mocked CC storage.
Differential Revision: https://phabricator.services.mozilla.com/D119659