Allowing skipping local selenium server when not needed (#10312)
* Disable local selenium server when not needed * Disable skipping for firefox as it appears to be needed still
This commit is contained in:
parent
6a88ec1852
commit
8581172654
2 changed files with 6 additions and 2 deletions
1
.github/workflows/build_test_deploy.yml
vendored
1
.github/workflows/build_test_deploy.yml
vendored
|
@ -80,6 +80,7 @@ jobs:
|
|||
env:
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
BROWSERSTACK: true
|
||||
SKIP_LOCAL_SELENIUM_SERVER: true
|
||||
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
|
||||
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
|
||||
steps:
|
||||
|
|
|
@ -4,7 +4,10 @@ const getPort = require('get-port')
|
|||
const seleniumServer = require('selenium-standalone')
|
||||
const NodeEnvironment = require('jest-environment-node')
|
||||
|
||||
const { BROWSER_NAME: browserName = 'chrome' } = process.env
|
||||
const {
|
||||
BROWSER_NAME: browserName = 'chrome',
|
||||
SKIP_LOCAL_SELENIUM_SERVER,
|
||||
} = process.env
|
||||
|
||||
const newTabPg = `
|
||||
<!DOCTYPE html>
|
||||
|
@ -38,7 +41,7 @@ class CustomEnvironment extends NodeEnvironment {
|
|||
|
||||
let seleniumServerPort
|
||||
|
||||
if (browserName !== 'chrome') {
|
||||
if (browserName !== 'chrome' && SKIP_LOCAL_SELENIUM_SERVER !== 'true') {
|
||||
console.log('Installing selenium server')
|
||||
await new Promise((resolve, reject) => {
|
||||
seleniumServer.install(err => {
|
||||
|
|
Loading…
Reference in a new issue