-
Notifications
You must be signed in to change notification settings - Fork 147
/
wdio.conf.js
62 lines (60 loc) · 1.39 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
61
62
const config = {
bail: 0,
connectionRetryCount: 3,
connectionRetryTimeout: 30000,
framework: 'mocha',
logLevel: 'error',
maxInstances: 10,
mochaOpts: {
ui: 'bdd',
timeout: 30000,
},
reporters: ['spec'],
specs: ['./tests/functional/*.spec.js'],
waitforTimeout: 10000,
};
if (process.env.CI) {
// Saucelabs configuration
config.capabilities = [
{
acceptInsecureCerts: true,
browserName: 'chrome',
browserVersion: 'latest',
maxInstances: 5,
platformName: 'Windows 10',
},
];
config.key = process.env.SAUCE_ACCESS_KEY;
config.services = [
[
'sauce',
{
sauceConnect: true,
},
],
];
config.user = process.env.SAUCE_USERNAME;
} else {
// Local webdriver runner
config.baseUrl = 'http://localhost:5000';
config.capabilities = [
{
maxInstances: 5,
browserName: 'chrome',
acceptInsecureCerts: true,
},
];
config.headless = true;
config.runner = 'local';
config.services = [
['chromedriver'],
[
'static-server',
{
folders: [{ mount: '/', path: './tests/functional/dist' }],
port: 5000,
},
],
];
}
exports.config = config;