Bug 1591829 - Prevent unexpected save prompt in calendar tests. r+a=pmorris
authorGeoff Lankow <geoff@darktrojan.net>
Fri, 25 Oct 2019 23:05:57 +1300
changeset 36380 4820421dbf43d8325038dab2f5070cc60268533f
parent 36379 f1bad99f776077731e4fc1c9878c62d7edd5b75b
child 36381 29842ec3bacabba2a72aa3795c86b428369f0210
push id2521
push usermozilla@jorgk.com
push dateWed, 06 Nov 2019 09:31:04 +0000
treeherdercomm-beta@308f336efa3e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1591829
Bug 1591829 - Prevent unexpected save prompt in calendar tests. r+a=pmorris
calendar/test/modules/ItemEditingHelpers.jsm
--- a/calendar/test/modules/ItemEditingHelpers.jsm
+++ b/calendar/test/modules/ItemEditingHelpers.jsm
@@ -243,16 +243,17 @@ function setData(dialog, iframe, data) {
     menulistSelect(iframeid("item-calendar"), data.calendar, dialog);
   }
 
   // all-day
   if (data.allday != undefined && isEvent) {
     let checkbox = iframeid("event-all-day");
     if (checkbox.getNode().checked != data.allday) {
       dialog.click(checkbox);
+      sleep();
     }
     Assert.equal(checkbox.getNode().checked, data.allday);
   }
 
   // timezonedisplay
   if (data.timezonedisplay !== undefined) {
     let menuitem = eid("options-timezones-menuitem");
     if (menuitem.getNode().getAttribute("checked") != data.timezonedisplay) {
@@ -327,19 +328,19 @@ function setData(dialog, iframe, data) {
   // priority
   if (data.priority != undefined) {
     dialog.mainMenu.click(`#options-priority-${data.priority}-label`);
   }
 
   // privacy
   if (data.privacy != undefined) {
     dialog.click(eid("button-privacy"));
-    let menu = dialog.getMenu("#event-privacy-menupopup");
-    menu.click(`#event-privacy-${data.privacy}-menuitem`);
-    menu.close();
+    dialog.click(eid(`event-privacy-${data.privacy}-menuitem`));
+    dialog.click(eid("button-privacy"));
+    sleep();
   }
 
   // status
   if (data.status != undefined) {
     if (isEvent) {
       dialog.mainMenu.click(`#options-status-${data.status}-menuitem`);
     } else {
       menulistSelect(iframeid("todo-status"), data.status.toUpperCase(), dialog);