forked from slimjs/slim.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnightwatch.conf.js
68 lines (59 loc) · 1.6 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
global.targetServer = process.env.targetServer || 'http://localhost:8000';
const StaticServer = require('static-server');
global.staticServer = new StaticServer({
rootPath: '.',
port: 8000,
host: '127.0.0.1',
cors: '*'
});
global.generateHASH = function() {
var _sym = 'abcdefghijklmnopqrstuvwxyz0123456789';
var str = '';
for (var i = 0; i < 8; i++) {
str += _sym[parseInt(Math.random() * (_sym.length))];
}
return str;
};
global.testHash = global.generateHASH();
var seleniumJar = require('selenium-server-standalone-jar');
module.exports = {
"output_folder" : "reports",
"custom_commands_path" : "",
"custom_assertions_path" : "",
"page_objects_path" : "",
"globals_path" : "",
"live_output": true,
"disable_colors": false,
"selenium" : {
"start_process" : true,
"server_path": "./bin/selenium.jar",
"host": "127.0.0.1",
"port": 4444,
"cli_args": {
"webdriver.chrome.driver": "./bin/chromedriver",
"webdriver.phantomjs.driver": "./node_modules/phantomjs/bin/phantomjs"
}
},
"test_settings" : {
"default" : {
"silent": true,
"screenshots": {
"enabled": true,
"path": "reports"
},
"globals": {
"abortOnAssertionFailure": true,
"waitForConditionTimeout": 25000,
},
"desiredCapabilities": {
"browserName": "chrome",
"chromeOptions" : {
"args" : ["--start-maximized"] // --headless
},
"javascriptEnabled": true,
"acceptSslCerts": true,
"headless": true
}
}
}
};