-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathnightwatch.browserstack.js
90 lines (85 loc) · 2.3 KB
/
nightwatch.browserstack.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
89
90
const merge = require('deepmerge')
const commonTestSettings = {
launch_url: 'http://localhost:8888',
silent: true,
live_output: true,
desiredCapabilities: {
project: 'CanvasLatex',
build: process.env.BUILD_NAME || 'CanvasLatex - ' + process.env.USER,
'browserstack.user': process.env.BROWSERSTACK_USERNAME || process.env.BROWSERSTACK_USR,
'browserstack.key': process.env.BROWSERSTACK_ACCESS_KEY || process.env.BROWSERSTACK_PSW,
resolution: '1920x1080',
'browserstack.debug': true,
'browserstack.local': true,
acceptSslCerts: true
},
globals: {
environment: 'browserstack',
updateMode: process.env.UPDATE_MODE
}
}
const nightwatchConfig = {
src_folders: ['test/selenium/tests'],
custom_commands_path: 'test/selenium/commands',
custom_assertions_path: 'test/selenium/assertions',
output_folder: 'reports',
selenium: {
start_process: false,
host: 'hub-cloud.browserstack.com',
port: 443
},
test_settings: {
chrome: {
desiredCapabilities: {
os: 'OS X',
os_version: 'Monterey',
browser: 'chrome',
browserName: 'chrome',
device: null,
browser_version: '98.0',
real_mobile: null
}
},
firefox: {
desiredCapabilities: {
os: 'OS X',
os_version: 'Monterey',
browser: 'firefox',
browserName: 'firefox',
device: null,
browser_version: '97.0',
real_mobile: null
}
},
edge: {
desiredCapabilities: {
os: 'Windows',
os_version: '11',
browser: 'edge',
browserName: 'edge',
device: null,
browser_version: '97.0',
real_mobile: null
}
},
safari: {
desiredCapabilities: {
os: 'OS X',
os_version: 'Big Sur',
browser: 'safari',
browserName: 'safari',
device: null,
browser_version: '14.1',
real_mobile: null
}
}
}
}
// Code to copy seleniumhost/port into test settings
for (const i in nightwatchConfig.test_settings) {
const config = nightwatchConfig.test_settings[i]
config.selenium_host = nightwatchConfig.selenium.host
config.selenium_port = nightwatchConfig.selenium.port
nightwatchConfig.test_settings[i] = merge(config, commonTestSettings)
}
module.exports = nightwatchConfig