mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-12 18:39:58 +00:00
Fix tests for Firefox
This commit is contained in:
@@ -109,7 +109,9 @@ Testing requires geckodriver (or chromedriver for Chrome parity testing). See [s
|
|||||||
Chrome doesn't load the media router in a temporary selenium profile, so there's a bundled profile (`test/ChromeProfile.zip`). Extract the folder within as `test/ChromeProfile/`.
|
Chrome doesn't load the media router in a temporary selenium profile, so there's a bundled profile (`test/ChromeProfile.zip`). Extract the folder within as `test/ChromeProfile/`.
|
||||||
|
|
||||||
````sh
|
````sh
|
||||||
npm run build
|
npm run build --prefix ./app
|
||||||
|
npm run install-manifest
|
||||||
|
npm run package --prefix ./ext
|
||||||
npm test
|
npm test
|
||||||
SELENIUM_BROWSER=chrome npm test
|
SELENIUM_BROWSER=chrome npm test
|
||||||
````
|
````
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ if (!fs.existsSync(extensionArchivePath)) {
|
|||||||
const TEST_PAGE_URL = `file:///${__dirname}/test.html`;
|
const TEST_PAGE_URL = `file:///${__dirname}/test.html`;
|
||||||
|
|
||||||
const firefoxOptions = new firefox.Options()
|
const firefoxOptions = new firefox.Options()
|
||||||
|
.setBinary(firefox.Channel.NIGHTLY)
|
||||||
.headless()
|
.headless()
|
||||||
.addExtensions(extensionArchivePath)
|
.addExtensions(extensionArchivePath)
|
||||||
.setPreference("xpinstall.signatures.required", false);
|
.setPreference("xpinstall.signatures.required", false);
|
||||||
@@ -37,7 +38,7 @@ const chromeOptions = new chrome.Options()
|
|||||||
|
|
||||||
async function create () {
|
async function create () {
|
||||||
const driver = new webdriver.Builder()
|
const driver = new webdriver.Builder()
|
||||||
.forBrowser('firefox')
|
.forBrowser("firefox")
|
||||||
.setFirefoxOptions(firefoxOptions)
|
.setFirefoxOptions(firefoxOptions)
|
||||||
.setChromeOptions(chromeOptions)
|
.setChromeOptions(chromeOptions)
|
||||||
.build();
|
.build();
|
||||||
|
|||||||
Reference in New Issue
Block a user