Closed Bug 560741 Opened 14 years ago Closed 14 years ago

Add tests for TB2 to TB3 migration.

Categories

(Thunderbird :: Migration, defect)

defect
Not set
normal

Tracking

(blocking-thunderbird3.1 rc1+, thunderbird3.1 rc1-fixed)

RESOLVED FIXED
Thunderbird 3.1rc1
Tracking Status
blocking-thunderbird3.1 --- rc1+
thunderbird3.1 --- rc1-fixed

People

(Reporter: bwinton, Assigned: bwinton)

References

Details

Attachments

(1 file)

We have a lot of tests, but none of them start with an actual TB2 profile, and we should really test that case.
Marking this as 3.1rc1 blocker, because it's effectively the second part of a patch that meets the criterion:

a) make the upgrade experience from TB2 very painful for a large number of users

and was allowed to land without tests in order to make string freeze.
blocking-thunderbird3.1: --- → rc1+
Whiteboard: [ETA for review-ready patch: Friday, May 7]
I'm having a devil of a time trying to get it to pick up my TB2 profile, and not overwrite it with the TB3 settings, so I'm going to push the ETA on this out to Tuesday.
Whiteboard: [ETA for review-ready patch: Friday, May 7] → [ETA for review-ready patch: Tuesday, May 11th]
Just an update: I finally got it to use a TB2 profile, so all that's left now is to write the tests, and it should be good to go.
I needed to put the test in a new folder, because it requires a different profile.  And it made sense to put all the tests in a single file because we don't want the modal dialog to go away between the runs, because if it does, then the profile will already have been upgraded, and we won't get the migration assistant auto-popping up the second time.

Later,
Blake.
Attachment #444538 - Flags: review?(bugmail)
Whiteboard: [ETA for review-ready patch: Tuesday, May 11th] → [patch up, needs r asuth]
holy strict JS warnings, batman!

In order to get the test to pass for me I had to do:

diff --git a/mail/test/mozmill/migration-from-tb2/test-1-introduction.js b/mail/test/mozmill/migration-from-tb2/test-1-introduction.js
--- a/mail/test/mozmill/migration-from-tb2/test-1-introduction.js
+++ b/mail/test/mozmill/migration-from-tb2/test-1-introduction.js
@@ -54,18 +54,17 @@ function setupModule(module) {
   wh.installInto(module);
 }
 
 /**
  * Make sure the migration assistant, has opened automatically when we upgrade.
  */
 function test_open_and_close_migration_assistant() {
   // Ensure that the migration assistant is opened on upgrade.
-  plan_for_new_window("mailnews:featureconfigurator");
-  let fc = wait_for_new_window("mailnews:featureconfigurator");
+  let fc = wait_for_existing_window("mailnews:featureconfigurator");
 
   // The first page should be the introduction page.
   let content = fc.e("contentFrame");
   url = content.getAttribute("src");
   assert_true(url.indexOf("introduction") != -1,
               "The first page (" + url + ") isn't the introduction page!");
   check_introduction_page(fc);

Now that that is happy, I shall investigate more thoroughlike.
Comment on attachment 444538 [details] [diff] [review]
A first cut at some tests.

remove the fc.sleep(15000) and do that other thing I said and we've got a deal.

Since get_subpage creates a controller and that should spin on the page being loaded, you probably should not need a sleep anyways.  If the test starts exploding on the tinderbox we can conclude I was wrong about that.
Attachment #444538 - Flags: review?(bugmail) → review+
Yeah, that was a debugging line, not a useful sleep.  <sheepish grin>

Fixes made, and pushed as:
http://hg.mozilla.org/comm-central/rev/3dcef10a2f4d
http://hg.mozilla.org/releases/comm-1.9.2/rev/f5787e731a79

Thanks,
Blake.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [patch up, needs r asuth]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: