-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.js
55 lines (48 loc) · 1.38 KB
/
cypress.config.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
const { defineConfig } = require('cypress');
module.exports = defineConfig({
chromeWebSecurity: false,
video: false,
e2e: {
setupNodeEvents(on, config) {
require('cypress-mochawesome-reporter/plugin')(on);
// Populate the environment from process.env
config.env.env = process.env.ENV || 'local';
config.env.e2e = config.env.env !== 'local';
// configure cypress-keycloak
config.env.keycloak = {
root: process.env.KEYCLOAK_URL,
realm: 'lev-' + process.env.ENV,
username: process.env.TEST_USERNAME,
password: process.env.TEST_PASSWORD,
// eslint-disable-next-line camelcase
client_id: 'lev-web-ui',
// eslint-disable-next-line camelcase
redirect_uri: process.env.TEST_URL,
path_prefix: ''
};
// configure cypress-axe
on('task', {
log(message) {
console.log(message);
return null;
},
table(message) {
console.table(message);
return null;
}
});
return config;
},
reporter: 'cypress-mochawesome-reporter',
reporterOptions: {
reportDir: 'cypress/reports',
json: false,
charts: true,
reportFilename: 'Cypress Test Report',
embeddedScreenshots: true,
inlineAssets: true
},
testIsolation: false,
baseUrl: 'http://localhost:8001',
}
});