forked from hmcts/cmc-citizen-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.conf.js
91 lines (89 loc) · 2.76 KB
/
default.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
require('ts-node/register')
require('tsconfig-paths/register')
const ProxySettings = require('./src/integration-test/config/proxy-settings').ProxySettings
const claimantEmail = `civilmoneyclaims+claimant-${require('randomstring').generate(7).toLowerCase()}@gmail.com`
const defendantEmail = `civilmoneyclaims+defendant-${require('randomstring').generate(7).toLowerCase()}@gmail.com`
const { bootstrapAll } = require('./src/integration-test/bootstrap/bootstrap')
const { teardownAll } = require('./src/integration-test/bootstrap/teardown')
const outputDir = './output'
exports.config = {
name: 'citizen-integration-tests',
async bootstrapAll() {
await bootstrapAll(claimantEmail, defendantEmail)
},
async teardownAll() {
await teardownAll(claimantEmail, defendantEmail)
},
tests: './src/integration-test/tests/**/*_test.*',
output: `${process.cwd()}/${outputDir}`,
timeout: 20000,
multiple: {
parallel: {
chunks: parseInt(process.env.CHUNKS || '3')
}
},
helpers: {
WebDriver: {
host: process.env.WEB_DRIVER_HOST || 'localhost',
port: process.env.WEB_DRIVER_PORT || 4444,
browser: process.env.BROWSER || 'chrome',
url: process.env.CITIZEN_APP_URL || 'https://localhost:3000',
waitForTimeout: 60000,
restart: false,
smartWait:5000,
desiredCapabilities: {
chromeOptions: {
args: [ "--no-sandbox", "--disable-dev-shm-usage", "--allow-running-insecure-content", "--ignore-certificate-errors"]
},
proxy: new ProxySettings()
}
},
IdamHelper: {
require: './src/integration-test/helpers/idamHelper',
claimantEmail,
defendantEmail
},
ClaimStoreHelper: {
require: './src/integration-test/helpers/claimStoreHelper',
claimantEmail,
defendantEmail
},
PageHelper: {
require: './src/integration-test/helpers/pageHelper'
},
PcqHelper: {
require: './src/integration-test/helpers/pcqHelper'
},
hwfHelper: {
require: './src/integration-test/helpers/hwfHelper'
},
Mochawesome: {
uniqueScreenshotNames: 'true'
}
},
mocha: {
reporterOptions: {
'codeceptjs-cli-reporter': {
stdout: '-',
options: {
steps: true
}
},
'mocha-junit-reporter': {
stdout: `${outputDir}/citizen-mocha-stdout.log`,
options: {
mochaFile: process.env.MOCHA_JUNIT_FILE_LOCATION || `${outputDir}/citizen-integration-result.xml`
}
},
'mochawesome': {
stdout: `${outputDir}/citizen-mochawesome-stdout.log`,
options: {
reportDir: outputDir,
reportFilename: 'citizen-e2e-result',
inlineAssets: true,
reportTitle: `Citizen E2E tests result`
}
}
}
}
}