-
Notifications
You must be signed in to change notification settings - Fork 1
/
cypress.config.ts
49 lines (45 loc) · 1.08 KB
/
cypress.config.ts
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
import { defineConfig } from 'cypress';
import * as fs from 'fs';
const allureWriter = require('@shelex/cypress-allure-plugin/writer');
export default defineConfig({
defaultCommandTimeout: 20000,
pageLoadTimeout: 60000,
requestTimeout: 20000,
responseTimeout: 30000,
execTimeout: 30000,
screenshotOnRunFailure: false,
video: false,
screenshotsFolder: 'results/screenshots',
videosFolder: 'results/videos',
downloadsFolder: 'results/downloads',
retries: {
runMode: 1,
openMode: 0,
},
reporter: 'cypress-multi-reporters',
reporterOptions: {
configFile: 'reporter-config.json',
},
env: {
allure: true,
allureResultsPath: 'results/allure',
allureAttachRequests: true,
allureClearSkippedTests: true,
},
e2e: {
setupNodeEvents(on, config) {
on('before:run', () => {
fs.writeFile('cypress/fixtures/temp.json', '{}', (err) => {
if (err) console.log(err);
});
});
on('after:run', () => {
fs.unlink('cypress/fixtures/temp.json', (err) => {
if (err) console.log(err);
});
});
allureWriter(on, config);
return config;
},
},
});