Bug 1506528 [mozmill] testEventDialog regularly failing. r=darktrojan
authorMarkus Adrario <mozilla@adrario.de>
Fri, 23 Nov 2018 07:23:33 +0100
changeset 32915 9ec06d5d2638767467fec74475ac1ab0f7abda43
parent 32914 202a0c6da02dfed38143bbe9488ccc01faae6b92
child 32916 e78f9676177c8b8127cb26fa6fa25a152b30defb
push id2343
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:37:21 +0000
treeherdercomm-beta@a0750c375f71 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdarktrojan
bugs1506528
Bug 1506528 [mozmill] testEventDialog regularly failing. r=darktrojan
calendar/test/mozmill/shared-modules/test-item-editing-helpers.js
--- a/calendar/test/mozmill/shared-modules/test-item-editing-helpers.js
+++ b/calendar/test/mozmill/shared-modules/test-item-editing-helpers.js
@@ -521,26 +521,28 @@ function addAttendees(dialog, innerFrame
     let attendees = attendeesString.split(",");
     for (let attendee of attendees) {
         let calAttendee = innerFrame.window.attendees.find(
             aAtt => aAtt.id == `mailto:${attendee}`
         );
         // Only add if not already present.
         if (!calAttendee) {
             plan_for_modal_dialog("Calendar:EventDialog:Attendees", (attDialog) => {
-                let { lookup: attlookup, sleep: attsleep } = helpersForController(attDialog);
+                let { lookup: attlookup } = helpersForController(attDialog);
 
                 let input = attlookup(`
                     /id("calendar-event-dialog-attendees-v2")/
                     anon({"class":"box-inherit dialog-content-box"})
                 `);
                 // As starting point is always the last entered Attendee, we have
                 // to advance to not overwrite it.
                 attDialog.keypress(input, "VK_TAB", {});
-                attsleep(SHORT_SLEEP);
+                attDialog.waitFor(() =>
+                    attDialog.window.document.activeElement.getAttribute("class") == "textbox-input"
+                );
                 attDialog.type(input, attendee);
                 attDialog.click(attlookup(`
                     /id("calendar-event-dialog-attendees-v2")/anon({"anonid":"buttons"})/
                     {"dlgtype":"accept"}
                 `));
             });
             dialog.click(dlgid("button-attendees"));
             wait_for_modal_dialog("Calendar:EventDialog:Attendees", TIMEOUT_MODAL_DIALOG);