diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /browser/extensions/formautofill/test/browser/browser_autocomplete_footer.js | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/extensions/formautofill/test/browser/browser_autocomplete_footer.js')
-rw-r--r-- | browser/extensions/formautofill/test/browser/browser_autocomplete_footer.js | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/browser/extensions/formautofill/test/browser/browser_autocomplete_footer.js b/browser/extensions/formautofill/test/browser/browser_autocomplete_footer.js index fde34a0a32..1e7ba523e8 100644 --- a/browser/extensions/formautofill/test/browser/browser_autocomplete_footer.js +++ b/browser/extensions/formautofill/test/browser/browser_autocomplete_footer.js @@ -2,12 +2,57 @@ const URL = BASE_URL + "autocomplete_basic.html"; +const l10n = new Localization(["toolkit/formautofill/formAutofill.ftl"], true); + add_setup(async function setup_storage() { await setStorage( TEST_ADDRESS_2, TEST_ADDRESS_3, TEST_ADDRESS_4, - TEST_ADDRESS_5 + TEST_ADDRESS_5, + TEST_CREDIT_CARD_1 + ); +}); + +add_task(async function test_footer_has_correct_button_text_on_address() { + await BrowserTestUtils.withNewTab( + { gBrowser, url: URL }, + async function (browser) { + const { + autoCompletePopup: { richlistbox: itemsBox }, + } = browser; + + await openPopupOn(browser, "#organization"); + const footer = itemsBox.querySelector( + ".autofill-footer-row.autofill-button" + ); + Assert.equal( + footer.innerText, + l10n.formatValueSync("autofill-manage-addresses-label") + ); + await closePopup(browser); + } + ); +}); + +add_task(async function test_footer_has_correct_button_text_on_credit_card() { + await BrowserTestUtils.withNewTab( + { gBrowser, url: CREDITCARD_FORM_URL }, + async function (browser) { + const { + autoCompletePopup: { richlistbox: itemsBox }, + } = browser; + + await openPopupOn(browser, "#cc-number"); + const footer = itemsBox.querySelector( + ".autofill-footer-row.autofill-button" + ); + Assert.equal( + footer.innerText, + l10n.formatValueSync("autofill-manage-payment-methods-label") + ); + await closePopup(browser); + } ); }); |