Closed Bug 1653506 Opened 4 years ago Closed 4 years ago

Run WebExtensions tests with an IMAP server

Categories

(Thunderbird :: Add-Ons: Extensions API, enhancement)

enhancement

Tracking

(thunderbird_esr78 fixed)

RESOLVED FIXED
81 Branch
Tracking Status
thunderbird_esr78 --- fixed

People

(Reporter: darktrojan, Assigned: darktrojan)

Details

(Whiteboard: [TB 78.4.0])

Attachments

(3 files)

Most of the tests in mail/components/extensions only test against a local server. This bug is about making them also run with an IMAP server.

I've extracted commonly used functions to a separate file (utils.js) and included it in the test
extensions. I've avoided massive indentation change where possible by using a containing object.
I might tidy up the indentation in a future revision which can be marked as ignored by hg anno.

Created a duplicate test manifest which wraps the default createAccount function so that it
defaults to IMAP. There's also a bunch of utility functions for handling IMAP's asynchronicity and
a lot of tidying up.

There's a few things that just don't work on IMAP, which is the point of this bug, and will need to
be fixed in further patches.

Depends on D83910

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/f5e11159eb2a
part 1 - Refactor WebExtensions tests to use a common utilities file r=mkmelin
https://hg.mozilla.org/comm-central/rev/5114b1ed26cd
part 2 - Run WebExtensions XPCShell tests with an IMAP server r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

Comment on attachment 9164278 [details]
Bug 1653506 part 1 - Refactor WebExtensions tests to use a common utilities file

[Approval Request Comment]
Bug 1617461 was approved for uplift for 78.3.2, and it has a dependency on the getUtilsJS() function that's created in this patch.
The change itself is only unittests, so the only risk is that the tests fail. The changes landed in Thunderbird 81, so they have been on beta for some time. Any problems we do run into on the release branch should have fixes readily available.

[Triage Comment]
Test-only changes approved. I expect more MailExtension API's to be added over the coming months and in the interest of developer sanity it makes sense to be able to run the same unittests that were developed and vetted on trunk and beta on the release branch.

Attachment #9164278 - Flags: approval-comm-esr78+

Comment on attachment 9164279 [details]
Bug 1653506 part 2 - Run WebExtensions XPCShell tests with an IMAP server

[Triage Comment]

Attachment #9164279 - Flags: approval-comm-esr78+

Thunderbird 78.3.2:
https://hg.mozilla.org/releases/comm-esr78/rev/aff8c053cd75f
https://hg.mozilla.org/releases/comm-esr78/rev/9cdfdbe7adfa

Backout 78.3.2:
https://hg.mozilla.org/releases/comm-esr78/rev/ab7d41cf420f

This bug is entangled with bugs 1617461, 16622015, and 1662018, and some more as yet unidentified. Holding for 78.4.0 as some contain MailExtenson API changes, which we should be avoiding in point releases.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [TB 78.4.0]
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED

ESR78 version of part 2.

Attachment #9179819 - Flags: review+
Attachment #9179819 - Flags: approval-comm-esr78+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: