-
Notifications
You must be signed in to change notification settings - Fork 0
/
wdio.conf.js
67 lines (64 loc) · 1.53 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
const timeout = process.env.DEBUG ? 99999999 : 30000
const wdioConfig = {
runner: 'local',
path: '/',
specs: ['./test/**/*.ts', './test/**/*.js'],
capabilities: [
{
maxInstances: 2,
browserName: 'chrome',
'goog:chromeOptions': {
useAutomationExtension: false,
excludeSwitches: ['enable-automation'],
prefs: {
credentials_enable_service: false,
'profile.password_manager_enabled': false,
},
args: [
'--disable-infobars',
'--disable-gpu',
'--no-sandbox',
'--disable-extensions',
'--disable-dev-shm-usage',
],
},
},
],
logLevel: 'error',
deprecationWarnings: true,
bail: 0,
baseUrl: 'http://the-internet.herokuapp.com',
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
framework: 'mocha',
reporters: [
'spec',
[
'allure',
{
outputDir: 'allure-results',
disableWebdriverStepsReporting: true,
disableMochaHooks: true,
},
],
],
mochaOpts: {
require: 'ts-node/register',
compilers: ['tsconfig-paths/register'],
ui: 'bdd',
timeout: timeout,
},
afterTest: function (test) {
if (test.error !== undefined) {
browser.takeScreenshot()
}
},
}
if (process.env.SELENOID) {
wdioConfig.services = []
wdioConfig.hostname = process.env.SELENOID
wdioConfig.port = 4444
wdioConfig.path = '/wd/hub'
} else wdioConfig.services = ['chromedriver']
exports.config = wdioConfig