-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: avoid failing actions from old chromedriver
When the GitHub actions chrome version is updated there is not an easy way to update the version of Chromedriver in the package.json to match. Remove chromedriver from dev dependencies and instead use the version that is installed by selenium-standalone when running chromedriver tests locally. Ensure the correct version is installed in CI by specifying which version of chromedriver to install in the prepare script.
- Loading branch information
1 parent
cb6993e
commit 0c1d179
Showing
5 changed files
with
44 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,23 @@ | ||
const computeFsPaths = require('selenium-standalone/lib/compute-fs-paths'); | ||
const createDefaultOps = require('selenium-standalone/lib/default-config'); | ||
|
||
const baseConfig = require('./wdio.conf') | ||
const defaultOps = createDefaultOps() | ||
|
||
const fsPaths = computeFsPaths({ | ||
...defaultOps, | ||
seleniumVersion: defaultOps.version, | ||
drivers: { | ||
chrome: { | ||
version: process.env.CHROMEDRIVER_VERSION || 'latest', | ||
arch: process.arch, | ||
}, | ||
}, | ||
}) | ||
|
||
exports.config = { | ||
...baseConfig.config, | ||
services: ['chromedriver'], | ||
services: [ | ||
['chromedriver', {chromedriverCustomPath: fsPaths.chrome.installPath}], | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,33 @@ | ||
const computeFsPaths = require('selenium-standalone/lib/compute-fs-paths') | ||
const createDefaultOps = require('selenium-standalone/lib/default-config') | ||
|
||
const baseConfig = require('./wdio.conf') | ||
const defaultOps = createDefaultOps() | ||
|
||
const fsPaths = computeFsPaths({ | ||
...defaultOps, | ||
seleniumVersion: defaultOps.version, | ||
drivers: { | ||
firefox: { | ||
version: process.env.GECKODRIVER_VERSION || 'latest', | ||
arch: process.arch, | ||
}, | ||
}, | ||
}) | ||
|
||
exports.config = { | ||
...baseConfig.config, | ||
services: ['geckodriver'], | ||
services: [ | ||
['geckodriver', {geckodriverCustomPath: fsPaths.firefox.installPath}], | ||
], | ||
capabilities: [ | ||
{ | ||
maxInstances: 5, | ||
browserName: 'firefox', | ||
acceptInsecureCerts: true, | ||
'moz:firefoxOptions': { | ||
args: process.env.CI ? ['--headless'] : [], | ||
args: process.env.CI ? ['-headless'] : [], | ||
}, | ||
}, | ||
] | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters