-
Notifications
You must be signed in to change notification settings - Fork 4
/
nightwatch.conf.js
90 lines (82 loc) · 2.5 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
const seleniumServer = require('selenium-server');
const chromedriver = require('chromedriver');
const phantomjs = require('phantomjs-prebuilt');
const dockerSeleniumHub = '127.0.0.1';
const argv = require('yargs').argv;
if (argv.cucumber) {
require('nightwatch-cucumber')({
cucumberArgs: ['--require', 'timeout.js', '--require', 'features/step_definitions', '--format', 'pretty', '--format', 'json:features/reports/cucumber.json', 'features']
});
}
module.exports = {
selenium : {
start_process : true,
server_path : seleniumServer.path,
log_path : '' ,
selenium_host : '127.0.0.1',
selenium_port : 4444,
cli_args : {
'webdriver.chrome.driver' : chromedriver.path,
'webdriver.ie.driver' :'' ,
'webdriver.firefox.profile':''
}
},
test_settings : {
default : {
launch_url : 'http://localhost',
silent : true,
disable_colors: false,
screenshots: {
enabled: true,
on_failure: true,
on_error: false,
path: 'screenshoots/' // relativ to src directory
},
desiredCapabilities : {
browserName : 'chrome',
javascriptEnabled : true,
acceptSslCerts : true,
'phantomjs.binary.path': phantomjs.path
},
},
chrome: {
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true
}
},
firefox: {
desiredCapabilities: {
browserName: 'firefox',
javascriptEnabled: true,
acceptSslCerts: true
}
},
phantomjs: {
desiredCapabilities: {
browserName: 'phantomjs',
javascriptEnabled: true,
acceptSslCerts: true,
'phantomjs.binary.path': phantomjs.path
}
},
local_docker:{
selenium_host: dockerSeleniumHub,
selenium_port: 4444,
start_process : false,
desiredCapabilities: {
browserName: 'firefox'
}
},
mocha: {
test_runner: {
type: 'mocha',
options: {
ui: 'bdd',
reporter: 'list'
}
}
}
}
};