-
Notifications
You must be signed in to change notification settings - Fork 63
/
nightwatch.conf.js
88 lines (77 loc) · 1.86 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
86
87
88
const additonalEnvironments = require("./environments");
if(!additonalEnvironments.test_settings)
additonalEnvironments.test_settings = {};
const bstackOptions = {
'bstack:options' : {
"os" : "OS X",
"osVersion" : "Big Sur",
"buildName" : "browserstack-build-1",
"sessionName" : "BStack nightwatch snippet",
"source": "nightwatch:sample-sdk:v1.0",
"seleniumVersion" : "4.0.0",
userName: '${BROWSERSTACK_USERNAME}' || 'YOUR_USERNAME',
accessKey: '${BROWSERSTACK_ACCESS_KEY}' || 'YOUR_ACCESS_KEY',
},
}
const browserStack = {
webdriver: {
start_process: false,
timeout_options: {
timeout: 120000,
retry_attempts: 3
},
keep_alive: true
},
selenium: {
host: 'hub.browserstack.com',
port: 443
},
desiredCapabilities: {
browserName: 'chrome',
...bstackOptions
}
}
const nightwatchConfigs = {
src_folders: [],
live_output: true,
plugins: ['@nightwatch/browserstack'],
'@nightwatch/browserstack': {
browserstackLocal: true // set true to manage browserstack local tunnel. Defaults to false.
},
test_settings: {
default: {
launch_url: 'https://nightwatchjs.org'
},
browserstack: {
...browserStack
},
"browserstack.chrome": {
...browserStack,
desiredCapabilities:{
browserName: 'chrome',
...bstackOptions
}
},
"browserstack.firefox": {
...browserStack,
desiredCapabilities:{
browserName: 'firefox',
...bstackOptions
}
},
"browserstack.edge": {
...browserStack,
desiredCapabilities:{
browserName: 'Edge',
...bstackOptions
}
}
}
}
for(let key in additonalEnvironments.test_settings) {
nightwatchConfigs.test_settings[key] = {
...browserStack,
...additonalEnvironments.test_settings[key]
};
}
module.exports = nightwatchConfigs;