mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
Remove videos of successful runs
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"baseUrl": "http://localhost:8081/scm"
|
||||
"baseUrl": "http://localhost:8081/scm",
|
||||
"videoUploadOnPasses": false
|
||||
}
|
||||
|
||||
@@ -8,10 +8,12 @@
|
||||
"private": false,
|
||||
"scripts": {
|
||||
"headless": "cypress run",
|
||||
"ci": "cypress run --reporter junit --reporter-options \"mochaFile=../target/cypress-reports/TEST-[hash].xml\""
|
||||
"ci": "node src/index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"cypress": "^4.12.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cypress": "^4.12.0",
|
||||
"eslint-plugin-cypress": "^2.11.1"
|
||||
},
|
||||
"prettier": "@scm-manager/prettier-config",
|
||||
|
||||
22
scm-ui/e2e-tests/src/index.js
Normal file
22
scm-ui/e2e-tests/src/index.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const cypress = require("cypress");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
const options = {
|
||||
reporter: "junit",
|
||||
reporterOptions: {
|
||||
mochaFile: path.join("..", "target", "cypress-reports", "TEST-[hash].xml")
|
||||
}
|
||||
};
|
||||
|
||||
cypress
|
||||
.run(options)
|
||||
.then(results => {
|
||||
results.runs.forEach(run => {
|
||||
// remove videos of successful runs
|
||||
if (!run.shouldUploadVideo) {
|
||||
fs.unlinkSync(run.video);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(err => console.error(err));
|
||||
Reference in New Issue
Block a user