forked from nusmodifications/nusmods
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnightwatch.conf.js
60 lines (51 loc) · 1.36 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
const config = {
src_folders: ['src/e2e/tests'],
page_objects_path: 'src/e2e/page-objects',
output_folder: 'reports/junit/e2e',
selenium: {
start_process: false,
host: 'hub-cloud.browserstack.com',
port: 80,
},
test_settings: {
default: {
launch_url: process.env.LAUNCH_URL || 'http://staging.nusmods.com',
desiredCapabilities: {
'browserstack.user': process.env.BROWSERSTACK_USER,
'browserstack.key': process.env.BROWSERSTACK_ACCESS_KEY,
'browserstack.debug': true,
'browserstack.console': 'errors',
browser: 'Firefox',
// Latest ESR
browserVersion: '60',
},
},
safariMobile: {
desiredCapabilities: {
device: 'iPhone 7',
realMobile: 'true',
os_version: '10.3',
},
},
safariDesktop: {
desiredCapabilities: {
os: 'OS X',
browser: 'Safari',
browserVersion: '9.1',
},
},
edge: {
browser: 'Edge',
browserVersion: '16.0',
},
},
};
// Copy seleniumhost/port into test settings
Object.values(config.test_settings).forEach((setting) => {
setting.selenium_host = config.selenium.host;
setting.selenium_port = config.selenium.port;
});
if (process.env.LOCAL_TEST) {
config.test_settings.default.desiredCapabilities['browserstack.local'] = true;
}
module.exports = config;