-
Notifications
You must be signed in to change notification settings - Fork 28
Refactor integration/accessibility tests #22
Conversation
@linuxwolf On my mac, I'm not able to get I found a reference snippet in a semi-recent blog post that seems relevant: const binary = new firefox.Binary(firefox.Channel.NIGHTLY);
binary.addArguments("--headless");
const driver = new Builder()
.forBrowser('firefox')
.setFirefoxOptions(new firefox.Options().setBinary(binary))
.build(); This doesn't immediately work here, because the |
That's a good catch, and I'll add a way to set which Firefox to look for. I lean toward making it configurable via environment variables and/or npm config properties, though. For instance, I really want automated testing to run against either |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a few minor things / questions
const Cu = Components.utils; | ||
const Services = ChromeUtils.import("resource://gre/modules/Services.jsm"); | ||
const { WebExtensionPolicy } = Cu.getGlobalForObject(Services); | ||
return WebExtensionPolicy.getByID("${webext.id}").mozExtensionHostname; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably ask somebody on the addons team (maybe @aswan?) if there's a better incantation to use here, just to be sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point.
This was copied almost verbatim from lockbox-extension
's test setup, and was a pattern I saw elsewhere, but it doesn't make it the best.
@mozilla-lockbox/desktop-engineering mind doing another CR? There were some non-trivial changes to address the comments, and another pass seems worthwhile. |
merged with @6a68 's earlier r+ |
Connected to #9
This refactor better uses the Selenium-based
webdriver
and the underlyingweb-ext
API to run integration functional/accessibility tests using the same patterns the unit tests use.This also adds support for running accessibility testing via
axe-webdriverjs
(to start, the management homepage).