-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwdio.conf.ts
More file actions
60 lines (58 loc) · 1.55 KB
/
wdio.conf.ts
File metadata and controls
60 lines (58 loc) · 1.55 KB
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
import allureReporter from '@wdio/allure-reporter';
const defaultOptions = [
'--no-sandbox',
'--disable-dev-shm-usage',
'--disable-extensions',
'--incognito'
];
export const config = {
specs: [
'./tests/spec/*_spec.ts'
],
runner: 'local',
host: 'localhost',
port: 4444,
path: '/wd/hub',
maxInstances: 1,
capabilities: [{
browserName: 'chrome',
'goog:chromeOptions': {
args: defaultOptions
}
}],
// Level of logging verbosity: trace | debug | info | warn | error | silent
logLevel: 'warn',
baseUrl: 'http://the-internet.herokuapp.com/',
waitforTimeout: 10000,
connectionRetryTimeout: 60000,
connectionRetryCount: 3,
services: ['chromedriver'],
specFileRetries: 0,
specFileRetriesDelay: 0,
specFileRetriesDeferred: false,
framework: 'mocha',
mochaOpts: {
ui: 'bdd',
timeout: 3000000
},
reporters: [
'spec',
['allure', {
outputDir: 'build/allure-results',
disableMochaHooks: true,
disableWebdriverStepsReporting: true,
disableWebdriverScreenshotsReporting: false,
addConsoleLogs: true
}]
],
beforeSuite: async () => {
await browser.maximizeWindow();
},
afterTest: async (test, context, { error }) => {
if (error) {
await browser.takeScreenshot();
const currentUrl = await browser.getUrl();
allureReporter.addArgument('URL page with error', currentUrl);
}
}
};