Created
June 20, 2018 08:22
-
-
Save gdomiciano/0afdb4c58cfa766cac2d4eb076ba6ea8 to your computer and use it in GitHub Desktop.
Nightwatch configuration headless without selenium
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
const SCREENSHOT_PATH = 'test/integration/screenshots/'; | |
const BINPATH = 'test/integration/libs'; | |
const TIME_OUT = process.env.NODE_ENV !== 'testing' ? 2000 : false; | |
const CHROME = process.env.NODE_ENV !== 'testing' ? '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' : '/usr/bin/google-chrome'; | |
module.exports = { | |
src_folders: ['test/integration/specs'], | |
output_folder: 'test/integration/reports', | |
selenium: { | |
start_process: false, | |
port: 4444, | |
cli_args: { | |
'webdriver.chrome.driver': `${BINPATH}/chromedriver/chromedriver`, | |
}, | |
}, | |
test_settings: { | |
default: { | |
launch_url: 'localhost:3000', | |
selenium_port: '9515', | |
selenium_host: 'localhost', | |
silent: true, | |
screenshots: { | |
enabled: true, | |
path: SCREENSHOT_PATH, | |
on_failure: true, | |
}, | |
globals: { | |
Timeout: TIME_OUT, | |
urls: { | |
Home: 'http://localhost:3000', | |
RubyConf: 'http://localhost:3000/ruby-conf', | |
}, | |
input: { | |
simpleName: 'Geisy', | |
completeName: 'Geiseany Domiciano', | |
specialCharName: 'João José da Silva', | |
numbers: '123456', | |
} | |
}, | |
desiredCapabilities: { | |
browserName: 'chrome', | |
acceptSslCerts: true, | |
chromeOptions: { | |
args: [ | |
'--headless', | |
'--no-sandbox', | |
'--window-size=360, 640', | |
], | |
binary: CHROME, | |
}, | |
}, | |
}, | |
chrome: { | |
desiredCapabilities: { | |
browserName: 'chrome', | |
}, | |
}, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment