Bug 1499024 - Port bug 1490366: Adjust expectation of test-attachment.js. rs=bustage-fix
authorJorg K <jorgk@jorgk.com>
Mon, 15 Oct 2018 16:20:19 +0200
changeset 33378 9af6ce9373ac8132d2dd75b8ec81de429dcae53f
parent 33377 3e5b48477fb4aa88390f6e0a104b626973409410
child 33379 015eae02a5e50851d31151335df94138f9434f3c
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersbustage-fix
bugs1499024, 1490366
Bug 1499024 - Port bug 1490366: Adjust expectation of test-attachment.js. rs=bustage-fix
mail/test/mozmill/attachment/test-attachment.js
--- a/mail/test/mozmill/attachment/test-attachment.js
+++ b/mail/test/mozmill/attachment/test-attachment.js
@@ -363,18 +363,18 @@ function test_selected_attachments_are_c
   // First, select the message with two attachments.
   select_click_row(3);
 
   // Expand the attachment list.
   mc.click(mc.eid("attachmentToggle"));
 
   // Select both the attachments.
   let attachmentList = mc.e("attachmentList");
-  assert_equals(attachmentList.selectedItems.length, 0,
-                "We had selected items on first load, when we shouldn't have!");
+  assert_equals(attachmentList.selectedItems.length, 1,
+                "On first load the first item should be selected");
 
   // We can just click on the first element, but the second one needs a
   // ctrl-click (or cmd-click for those Mac-heads among us).
   mc.click(new elib.Elem(attachmentList.children[0]), 5, 5);
   EventUtils.synthesizeMouse(attachmentList.children[1], 5, 5,
                              {accelKey: true}, mc.window);
 
   assert_equals(attachmentList.selectedItems.length, 2,
@@ -383,18 +383,18 @@ function test_selected_attachments_are_c
 
   // Switch to the message with one attachment, and make sure there are no
   // selected attachments.
   select_click_row(2);
 
   // Expand the attachment list again.
   mc.click(mc.eid("attachmentToggle"));
 
-  assert_equals(attachmentList.selectedItems.length, 0,
-                "We had selected items after loading a new message!");
+  assert_equals(attachmentList.selectedItems.length, 1,
+                "After loading a new message the first item should be selected");
 }
 
 function test_attachment_toolbar_customize() {
   // This tests that removing the "save all" button from the attachment bar
   // works correctly (i.e. it doesn't throw an error in the middle of processing
   // the attachments when loading a later message).
   be_in_folder(folder);