Bug 562266 - 1) fix wrong test: outgoing folders have "sent" columns. 2) Make it do something useful if no correspondent. r=squib a=jorgk DONTBUILD
authorJorg K
Wed, 28 Sep 2016 01:21:31 +0200
changeset 27584 158aa9c1b839c4e3de307f0f30eb1fde85cbbacb
parent 27583 265bb18b2678c00a9d92a79c6583c15fb4f2af43
child 27585 b7ced1710fc2e307d9f312257d9c9a4f866a3b1f
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssquib, jorgk
bugs562266
Bug 562266 - 1) fix wrong test: outgoing folders have "sent" columns. 2) Make it do something useful if no correspondent. r=squib a=jorgk DONTBUILD
mail/test/mozmill/folder-display/test-columns.js
--- a/mail/test/mozmill/folder-display/test-columns.js
+++ b/mail/test/mozmill/folder-display/test-columns.js
@@ -480,35 +480,41 @@ function test_apply_to_folder_no_childre
 
   be_in_folder(folderSource);
 
   // reset!
   invoke_column_picker_option([{anonid: "reset"}]);
 
   // permute!
   let conExtra = [...INBOX_DEFAULTS];
-  conExtra[5] = "senderCol";
-  hide_column("correspondentCol");
-  show_column("senderCol");
+  if (useCorrespondent) {
+    conExtra[5] = "senderCol";
+    hide_column("correspondentCol");
+    show_column("senderCol");
+  } else {
+    conExtra[5] = "correspondentCol";
+    hide_column("senderCol");
+    show_column("correspondentCol");
+  }
   assert_visible_columns(conExtra);
 
   // Apply to the one dude.
   _apply_to_folder_common(false, folderParent);
 
   // Make sure it copied to the parent.
-  let conExtraSwapped = [...INBOX_DEFAULTS];
-  conExtraSwapped[5] = "recipientCol";
+  let conExtraSwapped = [...SENT_DEFAULTS];
+  conExtraSwapped[5] = useCorrespondent ? "recipientCol" : "correspondentCol";
   be_in_folder(folderParent);
   assert_visible_columns(conExtraSwapped);
 
   // But not the children.
   be_in_folder(folderChild1);
-  assert_visible_columns(INBOX_DEFAULTS);
+  assert_visible_columns(SENT_DEFAULTS);
   be_in_folder(folderChild2);
-  assert_visible_columns(INBOX_DEFAULTS);
+  assert_visible_columns(SENT_DEFAULTS);
 }
 
 /**
  * Change settings in an incoming folder, apply them to an outgoing folder and
  * its children. Make sure the folder and its children change.
  */
 function test_apply_to_folder_and_children_swapped() {
   // No need to throttle ourselves during testing.
@@ -516,27 +522,33 @@ function test_apply_to_folder_and_childr
 
   be_in_folder(folderSource);
 
   // reset!
   invoke_column_picker_option([{anonid: "reset"}]);
 
   // permute!
   let conExtra = [...INBOX_DEFAULTS];
-  conExtra[5] = "senderCol";
-  hide_column("correspondentCol");
-  show_column("senderCol");
+  if (useCorrespondent) {
+    conExtra[5] = "senderCol";
+    hide_column("correspondentCol");
+    show_column("senderCol");
+  } else {
+    conExtra[5] = "correspondentCol";
+    hide_column("senderCol");
+    show_column("correspondentCol");
+  }
   assert_visible_columns(conExtra);
 
   // Apply to the dude and his offspring.
   _apply_to_folder_common(true, folderParent);
 
   // Make sure it copied to the parent and his children.
-  let conExtraSwapped = [...INBOX_DEFAULTS];
-  conExtraSwapped[5] = "recipientCol";
+  let conExtraSwapped = [...SENT_DEFAULTS];
+  conExtraSwapped[5] = useCorrespondent ? "recipientCol" : "correspondentCol";
   be_in_folder(folderParent);
   assert_visible_columns(conExtraSwapped);
   be_in_folder(folderChild1);
   assert_visible_columns(conExtraSwapped);
   be_in_folder(folderChild2);
   assert_visible_columns(conExtraSwapped);
 }