-
Notifications
You must be signed in to change notification settings - Fork 14
/
nightwatch.conf.js
61 lines (57 loc) · 1.69 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
const settings = {
dev: {
baseURL: 'http://localhost:3000',
baseTitle: 'Firefox Public Data Report',
},
stage: {
baseURL: 'https://data-ensemble.stage.mozaws.net',
baseTitle: 'Firefox Public Data Report (Stage)',
},
prod: {
baseURL: 'https://data.firefox.com',
baseTitle: 'Firefox Public Data Report',
},
}[process.env.NIGHTWATCH_TARGET];
module.exports = {
src_folders: ['./src/tests/nightwatch'],
webdriver: {
start_process: true,
},
test_settings: {
default: {
launch_url: settings.baseURL,
exclude: [
'utils.js',
'jsDisabled.js',
],
globals: {
baseTitle: settings.baseTitle,
waitForConditionTimeout: 10000,
},
webdriver: {
server_path: 'node_modules/.bin/chromedriver',
port: 9515,
},
desiredCapabilities: {
browserName: 'chrome',
chromeOptions: {
args: ['headless'],
},
},
},
jsDisabled: {
exclude: null,
filter: './src/tests/nightwatch/jsDisabled.js',
desiredCapabilities: {
chromeOptions: {
// JavaScript cannot be disabled in headless mode.
// https://stackoverflow.com/a/47538023/4297741
args: ['disable-headless-mode'],
prefs: {
'profile.managed_default_content_settings.javascript': 2,
},
},
},
},
},
};