...
 
const combine = require('./combine.js')
const data = combine.combineMochaAwesomeReports()
const uuid = Date.now()
combine.writeReport(data, uuid)
const combine = require('./combine.js')
const data = combine.combineMochaAwesomeReports()
const path = require('path')
const uuidv1 = require('uuid/v1')
const rimraf = require('rimraf')
const shell = require('shelljs')
const uuid = uuidv1()
combine.writeReport(data, uuid)
shell.exec(
`../../node_modules/mochawesome-report-generator/bin/cli.js ./${uuid}.json --saveHtml`,
(code, stdout, stderr) => {
if (stderr) throw stderr
rimraf(path.join(__dirname, '..', 'mochawesome-report'), () => {})
rimraf(path.join(__dirname, '..', `${uuid}.json`), () => {})
},
)
../mochawesome-report-generator/bin/cli.js
\ No newline at end of file
......@@ -4,8 +4,7 @@
"main": "index.js",
"license": "MIT",
"devDependencies": {
"cypress": "^3.1.0",
"mochawesome": "^3.1.1"
"cypress": "^3.1.0"
},
"scripts": {
"cypress:open": "./node_modules/.bin/cypress open",
......@@ -14,6 +13,10 @@
},
"dependencies": {
"mocha": "^5.2.0",
"pg": "^7.7.1"
"pg": "^7.7.1",
"mochawesome": "^3.1.1",
"rimraf": "^2.6.2",
"shelljs": "^0.8.2",
"uuid": "^3.3.2"
}
}
......@@ -31,7 +31,7 @@ do
echo "Clearing database ... "
yarn cypress run --spec "cypress/integration/db-scripts/clearManuscripts.spec.js" --reporter mochawesome --reporter-options "overwrite=false,reportTitle=report.html,showPassed=true"
yarn cypress run --spec "cypress/integration/db-scripts/clearUsers.spec.js" --reporter mochawesome --reporter-options "overwrite=false,reportTitle=report.html,showPassed=true"
node ./combineReports/combineReports.js
node ./combineReports/generateReport.js
sleep 3
echo "Database cleared"
function0
......@@ -58,7 +58,7 @@ do
5)
echo "Running user actions flows ... "
yarn cypress run --spec "cypress/integration/user-flow/*" --reporter mochawesome --reporter-options "overwrite=false,reportTitle=report.html,showPassed=true"
node ./combineReports/combineReports.js
node ./combineReports/generateReport.js
sleep 3
function0
;;
......
......@@ -11878,6 +11878,15 @@ shell-quote@1.6.1:
array-reduce "~0.0.0"
jsonify "~0.0.0"
shelljs@^0.8.2:
version "0.8.3"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097"
integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==
dependencies:
glob "^7.0.0"
interpret "^1.0.0"
rechoir "^0.6.2"
shellwords@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
......