-
Notifications
You must be signed in to change notification settings - Fork 24
/
wdio.conf.js
60 lines (53 loc) · 1.63 KB
/
wdio.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
exports.config = {
runner: 'local',
specs: ['./tests/**/*.test.js'],
exclude: [],
maxInstances: 5,
// NOTE: capabilities are set at the bottom of the file instead!
//capabilities: [],
// Level of logging verbosity: silent | verbose | command | data | result | error
logLevel: process.env.EE_LOG_LEVEL || 'error',
bail: 0,
baseUrl: 'http://127.0.0.1:3000',
waitforTimeout: 10000,
connectionRetryTimeout: 120000,
connectionRetryCount: 3,
services: [],
framework: 'jasmine',
reporters: ['spec'],
jasmineNodeOpts: {
defaultTimeoutInterval: 60000,
},
};
exports.config.capabilities = [
{
browserName: 'chrome',
'goog:chromeOptions': {},
},
{
browserName: 'firefox',
'moz:firefoxOptions': {},
},
];
if (process.env.EE_BROWSER) {
exports.config.capabilities = exports.config.capabilities.filter(
(conf) => conf.browserName === process.env.EE_BROWSER
);
}
if (process.env.EE_HEADLESS) {
const chromeCapability = exports.config.capabilities.find((conf) => conf.browserName === 'chrome');
if (chromeCapability) {
chromeCapability['goog:chromeOptions'] = Object.assign(chromeCapability['goog:chromeOptions'], {
args: ['--headless', '--disable-gpu', '--window-size=1280,800'],
});
}
const firefoxCapability = exports.config.capabilities.find((conf) => conf.browserName === 'firefox');
if (firefoxCapability) {
firefoxCapability['moz:firefoxOptions'] = Object.assign(firefoxCapability['moz:firefoxOptions'], {
args: ['-headless', '--window-size=1280,800'],
});
}
}
if (process.env.EE_WDIO_EXEC_ARGV) {
exports.config.execArgv = [process.env.EE_WDIO_EXEC_ARGV];
}