Refactor common calendar mochitest helper functions into single CalendarTestUtils
Categories
(Calendar :: General, task)
Tracking
(thunderbird_esr78 wontfix, thunderbird83 wontfix)
People
(Reporter: lasana, Assigned: lasana)
Details
Attachments
(1 file, 3 obsolete files)
|
32.16 KB,
patch
|
darktrojan
:
review+
|
Details | Diff | Splinter Review |
Some of the more recent calendar mochitest style tests have similar helper functions either in head.js files or in the test file itself.
We could probably improve the experience of writing tests for calendar by adding a CalendarTestUtils.jsm object that will contain typical boilerplate associated with calendar albeit, not using mozmill.
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 1•5 years ago
|
||
I took some of functions from head.js and added a function for removing a calendar with its items for now. I can move more stuff in there later.
| Assignee | ||
Comment 2•5 years ago
|
||
In a follow up bug I can replace the functions in head.js with the ones from CalendarTestUtils.jsm but may need to observe this a little more first.
| Assignee | ||
Comment 3•5 years ago
|
||
Comment 4•5 years ago
|
||
| Assignee | ||
Comment 5•5 years ago
|
||
I remove the removeCalendarAndItems function, I thought the items were not deleted but I realize now why I did. In the head.js file I replaced the functions with bound versions from CalendarTestUtils.
| Assignee | ||
Comment 6•5 years ago
|
||
Comment 7•5 years ago
|
||
| Assignee | ||
Comment 8•5 years ago
|
||
I would rather have these removed from head.js completely and the references updated. I guess you did this to avoid making a lot of changes, but the changes are justified IMO.
Correct, I wanted to avoid changing those tests directly in this patch, I'll update them now.
Are jsm imports preferred over the head.js files?
| Assignee | ||
Comment 9•5 years ago
|
||
I made the changes. I ran into a few test failures locally using an artifact build particularly browser_calendarList timing out. I get the same failures without the patch though.
Maybe browser_calendarList needs to be changed to clean up on failure?
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
(In reply to Lasana Murray from comment #9)
I made the changes. I ran into a few test failures locally using an artifact build particularly
browser_calendarListtiming out. I get the same failures without the patch though.Maybe
browser_calendarListneeds to be changed to clean up on failure?
Yeah, it does this. I've no idea why. Bug 1604369 if you want to work on it.
| Assignee | ||
Comment 12•5 years ago
|
||
Tidied up!
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
Comment 13•5 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/258debd6c817
Add CalendarTestUtils module for common calendar testing helpers. r=darktrojan
Updated•5 years ago
|
Description
•