forked from onemineral/qa-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwdio.conf.js
71 lines (51 loc) · 1.51 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
67
68
69
70
71
const ENV = process.env.ENV;
const { TimelineService } = require('wdio-timeline-reporter/timeline-service');
// if(!ENV || !['qa', 'dev', 'staging'].includes(ENV)){
// console.log("Please use the following format to run the tests ENV=qa|dev|staging");
// process.exit();
// }
exports.config = {
runner: 'local',
specs: [
'./tests/**/*.js'
],
//
maxInstances: 1,
//
capabilities: [{
browserName: 'chrome',
'goog:chromeOptions':{
args: [
//'--headless',
'--no-sandbox',
'--ignore-certificate-errors',
'--allow-insecure-localhost',
'--allow-running-insecure-content'
]
}
}],
// Level of logging verbosity: trace | debug | info | warn | error | silent
logLevel: 'warn',
bail: 0,
//baseUrl: url[process.env.ENV],
baseUrl: "http://test.getgrex.com/",
waitforTimeout: 5000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
services: ['selenium-standalone', [TimelineService]],
framework: 'mocha',
reporters: ['spec',['timeline',{
outputDir: './reports',
screenshotStrategy: 'on:error' }]
],
mochaOpts: {
ui: 'bdd',
timeout: 60000
},
beforeTest: function () {
const chai = require('chai');
const chaiWebdriver = require('chai-webdriverio').default;
chai.use(chaiWebdriver(browser));
global.expect = chai.expect;
},
}