Commit 85811726 authored by JJ Kasper's avatar JJ Kasper Committed by Joe Haddad

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
parent 6a88ec18
......@@ -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 => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment