Bug 1463554 - test changes. draft
authorPrathiksha <prathikshaprasadsuman@gmail.com>
Wed, 27 Jun 2018 04:29:01 +0530
changeset 811117 ecb134a1d265edf2c4ce67263ed87433d048ef6b
parent 811116 07936fcb69e2bdd48747cbeba55e35ebc8487f53
push id114190
push userbmo:prathikshaprasadsuman@gmail.com
push dateTue, 26 Jun 2018 22:41:29 +0000
bugs1463554
milestone63.0a1
Bug 1463554 - test changes. MozReview-Commit-ID: 36qOeLCwirD
browser/components/payments/test/browser/browser_address_edit.js
--- 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;