-
Notifications
You must be signed in to change notification settings - Fork 0
/
codecept.conf.js
85 lines (84 loc) · 2.51 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
const ptest = require('./conf/ptest.conf.js').config;
const siteIncludes = require('./conf/site.conf.js').siteIncludes;
exports.config = {
output: './output',
helpers: {
Puppeteer: {
url: ptest.url,
show: ptest.show,
slowMo: 10,
waitForAction: 1000,
waitForNavigation: 'networkidle2',
chrome: {
// args: ['--start-fullscreen'],
defaultViewport: {
width: 1100,
height: 600
}
}
},
REST: {
endpoint: 'http://admin:admin@localhost:8080'
},
CmdHelper: {
require: './node_modules/codeceptjs-cmdhelper',
options: {
showOutput: true
}
},
RobotHelper: {
require: './helpers/robot_helper.js',
},
RecorderHelper: {
require: './helpers/recorder_helper.js',
},
EventHelper: {
require: './helpers/event_helper.js',
}
},
include: siteIncludes,
mocha: {},
bootstrap: null,
teardown: null,
hooks: [],
// gherkin: {
// features: './features/*.feature',
// steps: ['./step_definitions/steps.js']
// },
plugins: {
screenshotOnFail: {
enabled: true
},
retryFailedStep: {
enabled: true
},
allure: {},
autoLogin: {
enabled: true,
saveToFile: false,
inject: 'login',
users: {
admin: {
login: (I) => {
I.say('>> boilerplate: login');
I.amOnPage('/system/sling/form/login');
I.fillField('j_username', 'admin');
I.fillField('j_password', 'admin');
I.click('Login');
I.see('welcome');
I.say('>> /boilerplate');
},
check: (I) => {
I.say('>> boilerplate: check if logged in');
I.amOnPage('/perapi/admin/access.json');
I.see('"admin"');
I.say('>> /boilerplate');
}
}
}
}
},
// This path matches all of out tests -- use test runner to constrain via tag
tests: '{./tests/(!experiments)/*test.js,./tests/admin/**/*test*.js}',
name: 'peregrine-test'
}