-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcodecept.conf.js
109 lines (101 loc) · 2.81 KB
/
codecept.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
const { setHeadlessWhen } = require('@codeceptjs/configure');
require('dotenv').config()
const { env } = require('./utils')
// turn on headless mode when running with HEADLESS=true environment variable
// HEADLESS=true npx codecept run
setHeadlessWhen(process.env.HEADLESS);
exports.config = {
tests: 'core-tests/**/**/*_test.js', //./tests./*_test.js
output: './output',
helpers: {
Puppeteer: {
url: env('URL'),
show: false,
browser: 'chrome',
windowSize: '1440 x900',
// desiredCapabilities: {
// chromeOptions: {
// args: ["--window-size=1400,900", "--disable-gpu", "--no-sandbox"]
// },
// defaultViewport: null
// },
chrome: {
args: [
"--no-sandbox",
"--window-size=1440,900"
],
"defaultViewport": null
},
smartWait: 5000,
waitForAction: 2000,
keepCookies: true,
keepBrowserState: true,
restart: false,
},
REST: {
endpoint: env('ENDPOINT'),
onRequest: (request) => {},
defaultHeaders: {
"accept": 'application/json',
"authorization": env('BEARER')
}
},
"ChaiWrapper": {
"require": "codeceptjs-chai"
},
},
include: {
I: './steps_file.js'
},
bootstrap: null,
// mocha: {
// reporterOptions: {
// reportDir: 'output'
// },
// reporterOptions: {
// mochaFile: 'output/result.xml'
// }
// },
name: 'codecept_puppeteers',
plugins: {
retryFailedStep: {
enabled: false
},
screenshotOnFail: {
enabled: false
},
multiple: {
smoke: '@explore_analytics'
},
allure: {
enabled: 'true'
},
tryTo: {
enabled: true
},
autoLogin: {
enabled: true,
saveToFile: false,
inject: 'loginAs',
users: {
admin: {
login: (I) => {
I.amOnPage('/login');
I.fillField('Email Address', env('USERNAME')); //
I.fillField('Password', secret(env('PASSWORD')));
I.click('Log in');
//I.see('Plugins');
},
check: (I) => {
I.see('Plugins');
},
}
},
}
},
rerun: {
// run all tests must pass exactly 5 times
minSuccess: 5,
maxReruns: 5,
}
}