diff --git a/browser/components/payments/test/browser/browser_address_edit.js b/browser/components/payments/test/browser/browser_address_edit.js index b5a1202e2655..8fd4700d86a5 100644 --- a/browser/components/payments/test/browser/browser_address_edit.js +++ b/browser/components/payments/test/browser/browser_address_edit.js @@ -42,7 +42,7 @@ add_task(async function test_add_link() { return Object.keys(state.savedAddresses).length == 0; }, "No saved addresses when starting test"); - let addLink = content.document.querySelector("address-picker a"); + let addLink = content.document.querySelector("address-picker .add-link"); is(addLink.textContent, "Add", "Add link text"); addLink.click(); @@ -124,7 +124,7 @@ add_task(async function test_edit_link() { return Object.keys(state.savedAddresses).length == 1; }, "One saved address when starting test"); - let editLink = content.document.querySelector("address-picker a:nth-of-type(2)"); + let editLink = content.document.querySelector("address-picker .edit-link"); is(editLink.textContent, "Edit", "Edit link text"); editLink.click(); @@ -203,7 +203,7 @@ add_task(async function test_add_payer_contact_name_email_link() { return Object.keys(state.savedAddresses).length == 0; }, "No saved addresses when starting test"); - let addLink = content.document.querySelector("address-picker.payer-related a"); + let addLink = content.document.querySelector("address-picker.payer-related .add-link"); is(addLink.textContent, "Add", "Add link text"); addLink.click(); @@ -286,7 +286,7 @@ add_task(async function test_edit_payer_contact_name_email_phone_link() { }, "One saved addresses when starting test"); let editLink = - content.document.querySelector("address-picker.payer-related a:nth-of-type(2)"); + content.document.querySelector("address-picker.payer-related .edit-link"); is(editLink.textContent, "Edit", "Edit link text"); editLink.click(); diff --git a/browser/components/payments/test/browser/browser_card_edit.js b/browser/components/payments/test/browser/browser_card_edit.js index 8625fc2dffa0..548022907194 100644 --- a/browser/components/payments/test/browser/browser_card_edit.js +++ b/browser/components/payments/test/browser/browser_card_edit.js @@ -12,7 +12,7 @@ add_task(async function test_add_link() { PaymentTestUtils: PTU, } = ChromeUtils.import("resource://testing-common/PaymentTestUtils.jsm", {}); - let addLink = content.document.querySelector("payment-method-picker a"); + let addLink = content.document.querySelector("payment-method-picker .add-link"); is(addLink.textContent, "Add", "Add link text"); addLink.click(); @@ -74,7 +74,7 @@ add_task(async function test_edit_link() { PaymentTestUtils: PTU, } = ChromeUtils.import("resource://testing-common/PaymentTestUtils.jsm", {}); - let editLink = content.document.querySelector("payment-method-picker a:nth-of-type(2)"); + let editLink = content.document.querySelector("payment-method-picker .edit-link"); is(editLink.textContent, "Edit", "Edit link text"); editLink.click(); @@ -134,7 +134,7 @@ add_task(async function test_private_persist_defaults() { PaymentTestUtils: PTU, } = ChromeUtils.import("resource://testing-common/PaymentTestUtils.jsm", {}); - let addLink = content.document.querySelector("payment-method-picker a"); + let addLink = content.document.querySelector("payment-method-picker .add-link"); is(addLink.textContent, "Add", "Add link text"); addLink.click(); @@ -157,7 +157,7 @@ add_task(async function test_private_persist_defaults() { PaymentTestUtils: PTU, } = ChromeUtils.import("resource://testing-common/PaymentTestUtils.jsm", {}); - let addLink = content.document.querySelector("payment-method-picker a"); + let addLink = content.document.querySelector("payment-method-picker .add-link"); is(addLink.textContent, "Add", "Add link text"); addLink.click(); @@ -189,7 +189,7 @@ add_task(async function test_private_card_adding() { PaymentTestUtils: PTU, } = ChromeUtils.import("resource://testing-common/PaymentTestUtils.jsm", {}); - let addLink = content.document.querySelector("payment-method-picker a"); + let addLink = content.document.querySelector("payment-method-picker .add-link"); is(addLink.textContent, "Add", "Add link text"); addLink.click(); diff --git a/browser/components/payments/test/browser/browser_dropdowns.js b/browser/components/payments/test/browser/browser_dropdowns.js index aca3e60ad4fb..d3cda70dde61 100644 --- a/browser/components/payments/test/browser/browser_dropdowns.js +++ b/browser/components/payments/test/browser/browser_dropdowns.js @@ -23,7 +23,7 @@ add_task(async function test_dropdown() { PaymentTestUtils: PTU, } = ChromeUtils.import("resource://testing-common/PaymentTestUtils.jsm", {}); - let addLink = content.document.querySelector("address-picker a"); + let addLink = content.document.querySelector("address-picker .add-link"); is(addLink.textContent, "Add", "Add link text"); addLink.click();