Bug 1599549 follow-up: Copy mozmill changes to mochitest; rs=bustage-fix
authorGeoff Lankow <geoff@darktrojan.net>
Wed, 11 Dec 2019 20:08:50 +1300
changeset 37732 e5511e03843275c543c738989bf097f4b3b52350
parent 37731 4fdb9c85df1fa282053f122f4fe90fb869a7215e
child 37733 8315ea31d2a6b01bd59b3f7a58244f0cb96226bc
push id397
push userclokep@gmail.com
push dateMon, 10 Feb 2020 21:16:13 +0000
reviewersbustage-fix
bugs1599549
Bug 1599549 follow-up: Copy mozmill changes to mochitest; rs=bustage-fix
mail/test/browser/account/browser_archiveOptions.js
--- a/mail/test/browser/account/browser_archiveOptions.js
+++ b/mail/test/browser/account/browser_archiveOptions.js
@@ -96,58 +96,59 @@ add_task(function test_archive_options_e
   open_advanced_settings(function(amc) {
     subtest_check_archive_options_enabled(amc, defaultAccount.key, false);
   });
 
   MailServices.accounts.removeAccount(account);
 });
 
 function subtest_initial_state(identity) {
-  plan_for_modal_dialog("archive-options", function(ac) {
+  plan_for_modal_dialog("Mailnews:archiveOptions", function(ac) {
     Assert.equal(
       ac.e("archiveGranularity").selectedIndex,
       identity.archiveGranularity
     );
     Assert.equal(
       ac.e("archiveKeepFolderStructure").checked,
       identity.archiveKeepFolderStructure
     );
   });
   mc.window.openDialog(
     "chrome://messenger/content/am-archiveoptions.xul",
     "",
     "centerscreen,chrome,modal,titlebar,resizable=yes",
     identity
   );
-  wait_for_modal_dialog("archive-options");
+  wait_for_modal_dialog("Mailnews:archiveOptions");
 }
 
 add_task(function test_open_archive_options() {
   for (let granularity = 0; granularity < 3; granularity++) {
     defaultIdentity.archiveGranularity = granularity;
     for (let kfs = 0; kfs < 2; kfs++) {
       defaultIdentity.archiveKeepFolderStructure = kfs;
       subtest_initial_state(defaultIdentity);
     }
   }
 });
 
 function subtest_save_state(identity, granularity, kfs) {
-  plan_for_modal_dialog("archive-options", function(ac) {
+  plan_for_modal_dialog("Mailnews:archiveOptions", function(ac) {
     ac.e("archiveGranularity").selectedIndex = granularity;
     ac.e("archiveKeepFolderStructure").checked = kfs;
     ac.keypress(null, "VK_RETURN", {});
+    ac.window.document.querySelector("dialog").acceptDialog();
   });
   mc.window.openDialog(
     "chrome://messenger/content/am-archiveoptions.xul",
     "",
     "centerscreen,chrome,modal,titlebar,resizable=yes",
     identity
   );
-  wait_for_modal_dialog("archive-options");
+  wait_for_modal_dialog("Mailnews:archiveOptions");
 }
 
 add_task(function test_save_archive_options() {
   defaultIdentity.archiveGranularity = 0;
   defaultIdentity.archiveKeepFolderStructure = false;
   subtest_save_state(defaultIdentity, 1, true);
 
   Assert.equal(defaultIdentity.archiveGranularity, 1);