-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathexample.codecept.conf.js
108 lines (92 loc) · 2.55 KB
/
example.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
const { setHeadlessWhen } = require('@codeceptjs/configure');
// 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: 'https://test.com',
show: true,
browser: 'chrome',
windowSize: '1440 x900',
// desiredCapabilities: {
// chromeOptions: {
// args: ["--window-size=1400,900", "--disable-gpu", "--no-sandbox"]
// },
// defaultViewport: null
// },
smartWait: 5000,
waitForAction: 2000,
keepCookies: true,
restart: false,
},
REST: {
endpoint: 'https://test.api.com',
onRequest: (request) => {
},
defaultHeaders: {
"accept": 'application/json',
"authorization": 'Bearer [Your Token]'
}
},
"ChaiWrapper": {
"require": "codeceptjs-chai"
},
},
include: {
I: './steps_file.js'
},
bootstrap: null,
mocha: {
reporterOptions: {
reportDir: 'output'
},
reporterOptions: {
mochaFile: 'output/result.xml'
}
},
name: 'codecept_puppetiers',
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('Username', 'YourUsername');
I.fillField('Password', secret('YourPassword'));
I.checkOption('Remember Me');
I.click('Log In');
},
check: (I) => {
I.seeCurrentUrlEquals('/login');
},
},
},
}
},
rerun: {
// run all tests must pass exactly 5 times
minSuccess: 5,
maxReruns: 5,
}
}