-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwdio.conf.js
67 lines (66 loc) · 1.93 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
let helpers = require('./test/helpers/helpers')
const chai = require('chai');
const chaiHttp = require('chai-http');
const should = chai.should();
exports.config = {
path: '/',
runner: 'local',
specs: [
'./test/specs/**',
'./test/specs/elements/*'
],
// Patterns to exclude.
exclude: [
],
maxInstances: 1,
capabilities: [{
browserName: 'chrome',
}],
// Level of logging verbosity: trace | debug | info | warn | error | silent
logLevel: 'error',
bail: 0,
baseUrl: 'https://expresspigeontest.com',
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
framework: 'mocha',
reporters: ['spec', ['allure', {
outputDir: 'allure-results',
disableWebdriverStepsReporting: false,
disableWebdriverScreenshotsReporting: false,
}]],
mochaOpts: {
ui: 'bdd',
timeout: 60000 * 5,
compilers: ['js:@babel/register'],
},
before: function() {
const chai = require('chai');
global.expect = chai.expect;
global.assert = chai.assert;
global.should = chai.should();
},
beforeTest: function () {
browser.maximizeWindow();
},
afterTest: function(test) {
if (test.error !== undefined) {
browser.saveScreenshot('./screenshots/'+Date.now()+'.png');
}
},
onComplete: async function () {
// var res;
// res = await helpers.getAdminSession();
// res.should.have.status(302);
// var resCookie = res.headers['set-cookie'].pop().split(';')[0];
// res = await helpers.accountReset(resCookie)
// res.should.have.status(200);
// var res1
// do {
// res1 = await helpers.accountResetStatus(resCookie)
// res.should.have.status(200);
// }
// while (res1.body.started == true);
// console.log('Account reset')
},
}