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 27487 eb97031be855a8c0f955ae95617a556004d062dc
parent 27486 7921f6517883509946fcffbcf8f0c3b28ad061b3
child 27488 3095461265ccd0204de271b5ba9a37162df2fe8b
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);
 }