Closed
Bug 805953
Opened 12 years ago
Closed 12 years ago
create a shared function to determine account tree row to click for account manager test files, instead of each test hardcoding its own assumptions
Categories
(Thunderbird :: Testing Infrastructure, defect)
Thunderbird
Testing Infrastructure
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 19.0
People
(Reporter: aceman, Assigned: aceman)
References
Details
Attachments
(1 file)
14.66 KB,
patch
|
mconley
:
review+
|
Details | Diff | Splinter Review |
As seen in bug 749200, some tests in mail/test/mozmill/account do not properly determine which row to click in the account manager tree. They use hardcoded values or depend on account order or have assumptions that may not be met after future changes.
In this bug I propose to move the function test-archive-options.js::get_account_tree_row() into mail/test/mozmill/shared-modules/test-account-manager-helpers.js and make use of it in all of the mail/test/mozmill/account tests. They already import this module. While they do not fail now, they may break anytime in the future. So I propose to make them more robust beforehand.
Preliminary patch to show what this intends to do.
Attachment #675957 -
Flags: review?(mconley)
Comment 2•12 years ago
|
||
Comment on attachment 675957 [details] [diff] [review]
patch
Review of attachment 675957 [details] [diff] [review]:
-----------------------------------------------------------------
This looks good - glad to see us chucking out repetitive code. So, am I to understand that all of our Mozmill tests automatically have access to Services and MailServices? When did that happen?
::: mail/test/mozmill/account/test-ab-whitelist.js
@@ +29,5 @@
> amh.installInto(module);
>
> let server = MailServices.accounts
> .FindServer("tinderbox", "tinderbox", "pop3");
> + gAccount = MailServices.accounts.FindAccountForServer(server);
So, MailServices is already available in this scope, and we don't need to re-import it? When did that happen?
Comment 4•12 years ago
|
||
Comment on attachment 675957 [details] [diff] [review]
patch
Review of attachment 675957 [details] [diff] [review]:
-----------------------------------------------------------------
Yep, looks good. Thanks aceman!
Attachment #675957 -
Flags: review?(mconley) → review+
Keywords: checkin-needed
Comment 5•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 19.0
You need to log in
before you can comment on or make changes to this bug.
Description
•