(In reply to Lasana Murray from comment #27) > I'm confused by this, I noticed the Mozmill documentation was deprecated but we use `../mach mochitest` to run tests, I thought Mochitest was just the test runner? Can you point me to a test that is pure mochitest so I can study? Thanks! It is definitely a confusing situation. Geoff converted the existing mozmill tests to mochitests, which involved "wrapping" the mozmill test code in mochitest "wrappers" (as it were, not a technical term...). So the tests are technically mochitests, and are run as mochitests, etc. But much of the code still uses mozmill functions, patterns, idioms, etc. (e.g. controllers). So we're migrating away from the mozmill idioms and new tests should ideally avoid them. So here's a "pure mochitest" that deals with dialogs. (I'm familiar with this one since I wrote it a few months back.) https://searchfox.org/comm-central/source/mail/components/addrbook/test/browser/browser_mailing_lists.js See also this page from the TB docs for tips on writing mochitests: https://developer.thunderbird.net/thunderbird-development/testing/writing-mochitest-tests
Bug 1575195 Comment 28 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Lasana Murray from comment #27) > I'm confused by this, I noticed the Mozmill documentation was deprecated but we use `../mach mochitest` to run tests, I thought Mochitest was just the test runner? Can you point me to a test that is pure mochitest so I can study? Thanks! It is definitely a confusing situation. Geoff converted the existing mozmill tests to mochitests, which involved "wrapping" the mozmill test code in mochitest "wrappers" (as it were, not a technical term...). So the tests are technically mochitests, and are run as mochitests, etc. But much of the code still uses mozmill functions, patterns, idioms, etc. (e.g. controllers). So we're migrating away from the mozmill idioms and new tests should ideally avoid them. So here's a "pure mochitest" that deals with dialogs. (I'm familiar with this one since I wrote it a few months back.) https://searchfox.org/comm-central/source/mail/components/addrbook/test/browser/browser_mailing_lists.js See also this page from the TB docs: https://developer.thunderbird.net/thunderbird-development/testing/writing-mochitest-tests
(In reply to Lasana Murray from comment #27) > I'm confused by this, I noticed the Mozmill documentation was deprecated but we use `../mach mochitest` to run tests, I thought Mochitest was just the test runner? Can you point me to a test that is pure mochitest so I can study? Thanks! It is definitely a confusing situation. Geoff converted the existing mozmill tests to mochitests, which involved "wrapping" the mozmill test code in mochitest "wrappers" (as it were, not a technical term...). So the tests are technically mochitests, and are run as mochitests, etc. But much of the code still uses mozmill functions, patterns, idioms, etc. (e.g. controllers). So we're migrating away from the mozmill idioms and new tests should ideally avoid them. So here's a "pure mochitest" that deals with dialogs. (I'm familiar with this one since I wrote it a few months back.) https://searchfox.org/comm-central/source/mail/components/addrbook/test/browser/browser_mailing_lists.js See also: https://developer.thunderbird.net/thunderbird-development/testing/writing-mochitest-tests