Bug 1583520 - Follow-up: fix testEventDialog.js and testTaskView.js. r=pmorris
authorKhushil Mistry <khushil324@gmail.com>
Thu, 26 Sep 2019 19:23:17 +0200
changeset 36958 3ef7c0d8bbba7fade82a59ce1de418f7ed76baa8
parent 36957 a3e31c684ffad09291eec7822ce797637807b452
child 36959 580590b5d1b4f9e258c0c4a457a2cdd89233a3cf
push id395
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:38:57 +0000
reviewerspmorris
bugs1583520
Bug 1583520 - Follow-up: fix testEventDialog.js and testTaskView.js. r=pmorris
calendar/test/mozmill/eventDialog/testEventDialog.js
calendar/test/mozmill/views/testTaskView.js
--- a/calendar/test/mozmill/eventDialog/testEventDialog.js
+++ b/calendar/test/mozmill/eventDialog/testEventDialog.js
@@ -220,22 +220,22 @@ testEventDialog.EXCLUDED_PLATFORMS = ["d
 function checkTooltip(row, col, startTime, endTime) {
   let item = lookupEventBox("month", CANVAS_BOX, row, col, null, EVENTPATH);
 
   let toolTip = '/id("messengerWindow")/id("calendar-popupset")/id("itemTooltip")';
   let toolTipNode = lookup(toolTip).getNode();
   toolTipNode.ownerGlobal.onMouseOverItem({ currentTarget: item.getNode() });
 
   // Check title.
-  let toolTipGrid = toolTip + '/{"class":"tooltipBox"}/{"class":"tooltipHeaderGrid"}/';
-  let eventName = lookup(`${toolTipGrid}/[1]/[0]/[1]`);
+  let toolTipTable = toolTip + '/{"class":"tooltipBox"}/{"class":"tooltipHeaderTable"}/';
+  let eventName = lookup(`${toolTipTable}/[0]/[1]`);
   controller.assert(() => eventName.getNode().textContent == EVENTTITLE);
 
   // Check date and time.
-  let dateTime = lookup(`${toolTipGrid}/[1]/[2]/[1]`);
+  let dateTime = lookup(`${toolTipTable}/[2]/[1]`);
 
   let currDate = firstDay.clone();
   currDate.addDuration(cal.createDuration(`P${7 * (row - 1) + (col - 1)}D`));
   let startDate = cal.getDateFormatter().formatDate(currDate);
 
   controller.assert(() => {
     let text = dateTime.getNode().textContent;
     dump(`${text} / ${startDate} ${startTime} -\n`);
--- a/calendar/test/mozmill/views/testTaskView.js
+++ b/calendar/test/mozmill/views/testTaskView.js
@@ -31,17 +31,17 @@ function setupModule(module) {
 
 // Mozmill doesn't support trees yet, therefore completed checkbox and line-through style are not
 // checked.
 function testTaskView() {
   // paths
   let treeChildren = `${TASK_VIEW}/[1]/id("calendar-task-tree")/{"class":"calendar-task-treechildren"}`;
   let taskTree = TASK_VIEW + '[1]/id("calendar-task-tree")';
   let toolTip = '/id("messengerWindow")/id("calendar-popupset")/id("taskTreeTooltip")';
-  let toolTipGrid = toolTip + '/{"class":"tooltipBox"}/{"class":"tooltipHeaderGrid"}/';
+  let toolTipTable = toolTip + '/{"class":"tooltipBox"}/{"class":"tooltipHeaderTable"}/';
 
   // Open task view.
   controller.click(eid("task-tab-button"));
   sleep();
 
   // Make sure that testing calendar is selected.
   controller.click(lookup(`${CALENDARLIST}/{"calendar-id":"${CALENDARID}"}`));
 
@@ -119,21 +119,21 @@ function testTaskView() {
   sleep();
   let priorityNode = eid("calendar-task-details-priority-high");
   controller.assertNotDOMProperty(priorityNode, "hidden");
 
   // Verify that tooltip shows status, priority and percent complete.
   let toolTipNode = lookup(toolTip).getNode();
   toolTipNode.ownerGlobal.showToolTip(toolTipNode, taskTreeNode.getTaskAtRow(0));
 
-  let toolTipName = lookup(toolTipGrid + "[1]/[0]/[1]");
-  let toolTipCalendar = lookup(toolTipGrid + "[1]/[1]/[1]");
-  let toolTipPriority = lookup(toolTipGrid + "[1]/[2]/[1]");
-  let toolTipStatus = lookup(toolTipGrid + "[1]/[3]/[1]");
-  let toolTipComplete = lookup(toolTipGrid + "[1]/[4]/[1]");
+  let toolTipName = lookup(toolTipTable + "[0]/[1]");
+  let toolTipCalendar = lookup(toolTipTable + "[1]/[1]");
+  let toolTipPriority = lookup(toolTipTable + "[2]/[1]");
+  let toolTipStatus = lookup(toolTipTable + "[3]/[1]");
+  let toolTipComplete = lookup(toolTipTable + "[4]/[1]");
 
   controller.assertJSProperty(toolTipName, "textContent", TITLE);
   controller.assertJSProperty(toolTipCalendar, "textContent", CALENDARNAME);
   controller.assertJSProperty(toolTipPriority, "textContent", "High");
   controller.assertJSProperty(toolTipStatus, "textContent", "Needs Action");
   controller.assertJSProperty(toolTipComplete, "textContent", PERCENTCOMPLETE + "%");
 
   // Mark completed, verify.