Bug 1554300 - Adapt testAlarmDefaultValue.js after bug 1547233. Navigate menu via keypress. r=jorgk
authorBenjamin Flanagin <benjamin@thunderbird.net>
Tue, 04 Jun 2019 09:19:48 +0200
changeset 35759 100447ecdcb26ecb78822c5938ef801542059d55
parent 35758 cd98a2947dd26a15d8b8ad3f7134fd343fc3b201
child 35760 b3ade9b78fc1313d0dfe0e127cc6a52724bf5979
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersjorgk
bugs1554300, 1547233
Bug 1554300 - Adapt testAlarmDefaultValue.js after bug 1547233. Navigate menu via keypress. r=jorgk
calendar/test/mozmill/testAlarmDefaultValue.js
--- a/calendar/test/mozmill/testAlarmDefaultValue.js
+++ b/calendar/test/mozmill/testAlarmDefaultValue.js
@@ -31,38 +31,34 @@ function setupModule(module) {
     collector.getModule("calendar-utils").setupModule(controller);
 
     ({ plan_for_modal_dialog, wait_for_modal_dialog } = collector.getModule("window-helpers"));
 
     ({ content_tab_e, content_tab_eid } = collector.getModule("content-tab-helpers"));
     collector.getModule("content-tab-helpers").setupModule();
 }
 
-testDefaultAlarms.__force_skip__ = true;
 function testDefaultAlarms() {
-    let { eid } = helpersForController(controller);
-
     let localeUnitString = cal.l10n.getCalString("unitDays");
     let unitString = PluralForm.get(DEFVALUE, localeUnitString).replace("#1", DEFVALUE);
     let alarmString = (...args) => cal.l10n.getString("calendar-alarms", ...args);
     let originStringEvent = alarmString("reminderCustomOriginBeginBeforeEvent");
     let originStringTask = alarmString("reminderCustomOriginBeginBeforeTask");
     let expectedEventReminder = alarmString("reminderCustomTitle", [unitString, originStringEvent]);
     let expectedTaskReminder = alarmString("reminderCustomTitle", [unitString, originStringTask]);
 
     let detailPath = `
         //*[@id="reminder-details"]/*[local-name()="label" and (not(@hidden) or @hidden="false")]
     `;
 
     // Configure the lightning preferences.
     openLightningPrefs(handlePrefTab, controller);
 
     // Create New Event.
-    controller.click(eid("newMsgButton-calendar-menuitem"));
-
+    controller.keypress(null, "i", { shiftKey: false, accelKey: true });
     // Set up the event dialog controller.
     invokeEventDialog(controller, null, (event, iframe) => {
         let { xpath: eventpath, eid: eventid } = helpersForController(event);
 
         // Check if the "custom" item was selected.
         event.assertDOMProperty(eventid("item-alarm"), "value", "custom");
         let reminderDetailsVisible = eventpath(detailPath);
         event.assertDOMProperty(reminderDetailsVisible, "value", expectedEventReminder);
@@ -71,17 +67,17 @@ function testDefaultAlarms() {
         event.click(reminderDetailsVisible);
         wait_for_modal_dialog("Calendar:EventDialog:Reminder");
 
         // Close the event dialog.
         event.window.close();
     });
 
     // Create New Task.
-    controller.click(eid("newMsgButton-task-menuitem"));
+    controller.keypress(null, "d", { shiftKey: false, accelKey: true });
     invokeEventDialog(controller, null, (task, iframe) => {
         let { xpath: taskpath, eid: taskid } = helpersForController(task);
 
         // Check if the "custom" item was selected.
         task.assertDOMProperty(taskid("item-alarm"), "value", "custom");
         let reminderDetailsVisible = taskpath(detailPath);
         task.assertDOMProperty(reminderDetailsVisible, "value", expectedTaskReminder);