-
Notifications
You must be signed in to change notification settings - Fork 1
/
wdio.BASE.conf.ts
78 lines (75 loc) · 2.24 KB
/
wdio.BASE.conf.ts
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
72
73
74
75
76
77
78
require('dotenv').config(); // load process.env from ".env" file for local
// Load the libraries we need for path/filesystem manipulation
const path = require('path');
const fs = require('fs');
// Store the directory path in a global,
// which allows us to access this path inside our tests
global.downloadDir = path.join(__dirname, 'build/downloads');
let build = 'local';
if (process.env.CIRCLE_BUILD_NUM && process.env.CIRCLE_BUILD_NUM) {
build = `${process.env.CIRCLE_BRANCH}-${process.env.CIRCLE_BUILD_NUM}`;
}
exports.config = {
onPrepare() {
// make sure download directory exists
if (!fs.existsSync(global.downloadDir)) {
// if it doesn't exist, create it
fs.mkdirSync(global.downloadDir);
}
},
runner: 'local',
path: '/',
specs: [
'./features/**/*.feature',
],
maxInstances: 1,
capabilities: [{
maxInstances: 1,
browserName: 'chrome',
'goog:chromeOptions': {
prefs: {
directory_upgrade: true,
prompt_for_download: false,
'safebrowsing.enabled': false,
'download.default_directory': global.downloadDir,
},
}, // see wdio.*.conf.js
}],
build,
logLevel: process.env.LOG_LEVEL || 'warn',
coloredLogs: true,
screenshotPath: './build/screenshots/',
baseUrl: process.env.BASE_URL,
waitforTimeout: 90000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
specFileRetries: 2,
services: [
], // see wdio.*.conf.js for additional entries
framework: 'cucumber',
reporters: [
'spec',
['junit', {
outputDir: './build/wdio',
outputFileFormat(options) {
return `results-${options.cid}.${options.capabilities}.xml`;
},
}],
],
cucumberOpts: {
backtrace: false,
requireModule: [],
failAmbiguousDefinitions: true,
failFast: false,
ignoreUndefinedDefinitions: false,
name: [],
snippets: true,
source: true,
profile: [],
require: ['./steps/**/*.js'],
snippetSyntax: undefined,
strict: true,
tagsInTitle: false,
timeout: 90000,
},
};