-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcypress.config.js
47 lines (43 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
const { defineConfig } = require("cypress");
const fs = require('fs')
const process = require('node:process');
const { exec } = require('child_process');
const pythonLogger = process.cwd() + '/.venv/bin/python ci/cypress_reporter.py'
module.exports = defineConfig({
chromeWebSecurity: false,
e2e: {
excludeSpecPattern: "**/entity/create/*.cy.js",
experimentalSessionAndOrigin: true,
experimentalInteractiveRunEvents: true,
setupNodeEvents(on, config) {
// implement node event listeners here
// try {
// on('after:spec', (spec, results) => {
//
// exec(`${pythonLogger} ${btoa(JSON.stringify(results))}`, (err, stdout, stderr) => {
// if (err) {
// console.error(`error: ${err.message}`);
// return;
// }
//
// if (stderr) {
// console.error(`stderr: ${stderr}`);
// return;
// }
//
// console.log(`stdout:\n${stdout}`);
// });
//
// })
//
// on('after:run', (results) => {
// exec(`${pythonLogger} ${btoa(JSON.stringify({'complete': true}))}`, (err, stdout, stderr) => {
// });
// fs.writeFileSync('./ci/logs/last-run-tests-results.json', JSON.stringify(results));
// });
// } catch (e) {
// console.error(e)
// }
},
},
});