Bug 1463554 - test changes.
MozReview-Commit-ID: 36qOeLCwirD
--- a/browser/components/payments/test/browser/browser_address_edit.js
+++ b/browser/components/payments/test/browser/browser_address_edit.js
@@ -114,20 +114,26 @@ add_task(async function test_edit_link()
let {
PaymentTestUtils: PTU,
} = ChromeUtils.import("resource://testing-common/PaymentTestUtils.jsm", {});
let {tempAddresses, savedAddresses} = await PTU.DialogContentUtils.getCurrentState(content);
is(Object.keys(tempAddresses).length, 0, "No temporary addresses at the start of test");
is(Object.keys(savedAddresses).length, 1, "1 saved address at the start of test");
- let picker = content.document
- .querySelector("address-picker[selected-state-key='selectedShippingAddress']");
- Cu.waiveXrays(picker).dropdown.click();
- Cu.waiveXrays(picker).dropdown.popupBox.children[0].click();
+ await content.document.querySelector("address-picker[selected-state-key='selectedShippingAddress']").focus();
+ });
+
+ // Select shipping address from dropdown.
+ await BrowserTestUtils.synthesizeKey("Timothy John Berners-Lee, 32 Vassar Street MIT Room 32-G524", {}, frame);
+
+ await spawnPaymentDialogTask(frame, async () => {
+ let {
+ PaymentTestUtils: PTU,
+ } = ChromeUtils.import("resource://testing-common/PaymentTestUtils.jsm", {});
let editLink = content.document.querySelector("address-picker .edit-link");
is(editLink.textContent, "Edit", "Edit link text");
editLink.click();
await PTU.DialogContentUtils.waitForState(content, (state) => {
return state.page.id == "address-page" && !!state["address-page"].guid;