-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwdio.conf.js
66 lines (66 loc) · 2.12 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
63
64
65
66
// This makes ts-node to load tsconfig.json and index.d.ts. Dunno why it doesn't do this by default
process.env.TS_NODE_FILES = true
require('ts-node').register()
module.exports.config = {
// Always running with debugger enabled
debug: true,
execArgv: ['--inspect=127.0.0.1:5859'],
host: 'ip-5236.sunline.net.ua',
port: 4444,
path: '/wd/hub',
specs: [
//'tests/2/2.ts',
//'tests/1/3.ts',
'tests/1/5/example/5.ts',
],
capabilities: [
{
browserName: 'chrome',
enableVNC: true
}
],
baseUrl: 'http://the-internet.herokuapp.com',
sync: true,
// Level of logging verbosity: silent | verbose | command | data | result | error
logLevel: 'verbose',
coloredLogs: true,
// baseUrl: 'https://google.com',
// Default timeout for all waitFor* commands.
waitforTimeout: 10000,
// Default timeout in milliseconds for request
// if Selenium Grid doesn't send response
connectionRetryTimeout: 30000,
connectionRetryCount: 3,
// Saves a screenshot to a given path if a command fails.
screenshotPath: './shots/',
reporters: [
'spec',
'mochawesome',
'allure'
],
reporterOptions: {
mochawesome: {
outputDir: './mochaawesome', //mochajs json file will be written to this directory
//mochawesome_filename: 'myfile.json' //will default to wdiomochawesome.json if no name is provided
},
// http://webdriver.io/guide/reporters/allure.html
allure: {
outputDir: './allure-results'
}
},
framework: 'mocha',
mochaOpts: {
// https://mochajs.org/#usage
timeout: process.env.DEBUG == true ? 12000000 : 60000
},
onPrepare: () => {
const chai = require('chai');
global.expect = chai.expect;
global.assert = chai.assert;
global.should = chai.should();
if (process.env.DEBUG == '1') {
// VScode debugger attaches really slowly. This gives some additional time.
return new Promise(resolve => setTimeout(resolve, 7000))
}
}
}