-
Notifications
You must be signed in to change notification settings - Fork 6
/
nightwatch.conf.js
36 lines (31 loc) · 1016 Bytes
/
nightwatch.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const browserstack = require('browserstack-local');
const BUILD_NUMBER = process.env.TRAVIS_JOB_NUMBER || 'local';
let nightwatch_config = {
src_folders: ['test'],
selenium: {
start_process: false,
host: 'hub-cloud.browserstack.com',
port: 80,
},
test_settings: {
default: {
desiredCapabilities: {
project: 'Test project',
build: `Chrome ${BUILD_NUMBER}`,
'browserstack.user': process.env.BROWSERSTACK_USERNAME,
'browserstack.key': process.env.BROWSERSTACK_ACCESS_KEY,
'browserstack.debug': true,
'browserstack.local': true,
'browserstack.networkLogs': true,
browser: 'chrome',
},
},
},
};
// Code to copy seleniumhost/port into test settings
for (let i in nightwatch_config.test_settings) {
const config = nightwatch_config.test_settings[i];
config['selenium_host'] = nightwatch_config.selenium.host;
config['selenium_port'] = nightwatch_config.selenium.port;
}
module.exports = nightwatch_config;