Skip to content
Snippets Groups Projects
Commit 987680d7 authored by Corey Frang's avatar Corey Frang
Browse files

Add USE_HEADLESS=no npm run test:integration option

parent 6f5686ba
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,8 @@ import webdriver from 'selenium-webdriver';
const {By, until, Button} = webdriver;
const USE_HEADLESS = process.env.USE_HEADLESS !== 'no';
class SeleniumHelper {
constructor () {
bindAll(this, [
......@@ -35,7 +37,11 @@ class SeleniumHelper {
getDriver () {
const chromeCapabilities = webdriver.Capabilities.chrome();
chromeCapabilities.set('chromeOptions', {args: ['--headless']});
const args = [];
if (USE_HEADLESS) {
args.push('--headless');
}
chromeCapabilities.set('chromeOptions', {args});
this.driver = new webdriver.Builder()
.forBrowser('chrome')
.withCapabilities(chromeCapabilities)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment