-
Notifications
You must be signed in to change notification settings - Fork 5
/
codecept.conf.js
87 lines (86 loc) · 2.34 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
// eslint-disable-next-line import/no-extraneous-dependencies
const { setHeadlessWhen } = require('@codeceptjs/configure');
const bootstrap = require('./testing/scripts/testsBootstrap');
// turn on headless mode when running with HEADLESS=true environment variable
// export HEADLESS=true && npx codeceptjs run
setHeadlessWhen(process.env.HEADLESS);
exports.config = {
tests: './testing/tests/*_test.js',
output: './testing/output',
helpers: {
Puppeteer: {
url: 'http://localhost:3000',
show: false,
windowSize: '1200x900',
waitForNavigation: 'networkidle0',
chrome: {
executablePath: '/usr/bin/chromium',
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-dev-shm-usage',
'--no-first-run',
'--disable-gpu',
'--disable-component-update',
'--disable-extensions',
'--remote-debugging-address=0.0.0.0',
'--remote-debugging-port=9222',
'--font-render-hinting=none'
],
defaultViewport: {
width: 1200,
height: 900,
deviceScaleFactor: 1,
},
},
waitForTimeout: 1000,
},
DbHelper: {
require: './testing/helpers/dbHelper.js',
},
EnvHelper: {
require: './testing/helpers/envHelper.js',
},
ResembleHelper: {
require: 'codeceptjs-resemblehelper',
screenshotFolder: './testing/output/',
baseFolder: './testing/screenshots/base/',
diffFolder: './testing/screenshots/diff/',
},
},
include: {
I: './testing/steps/steps_file.js',
MainPage: './testing/pages/Main.js',
CommonPage: './testing/pages/Common.js',
DetailPage: './testing/pages/Detail.js',
DataTables: './testing/datatables/index.js',
},
// eslint-disable-next-line global-require
bootstrap: bootstrap.bootstrap,
teardown: bootstrap.teardown,
mocha: {
bail: true,
reporterOptions: {
mochaFile: 'testing/reports/result.xml',
},
},
name: 'caninclude',
plugins: {
pauseOnFail: {},
retryFailedStep: {
enabled: true,
},
tryTo: {
enabled: true,
},
screenshotOnFail: {
enabled: true,
uniqueScreenshotNames: true,
fullPageScreenshots: true,
},
dbPlugin: {
enabled: true,
require: './testing/plugins/dbPlugin.js',
},
},
};