test: mocha reporter for e2e tests

This commit is contained in:
Dariusz Majcherczyk
2023-04-16 22:51:03 +02:00
parent 03f5ca3096
commit 82b667bd1e
4 changed files with 18 additions and 0 deletions
+12
View File
@@ -72,6 +72,18 @@ jobs:
CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }}
CYPRESS_VEGA_WALLET_API_TOKEN: ${{ steps.setup-vega.outputs.token }}
######
## Show test summary on github page
######
- name: Show test summary
if: success() || failure()
uses: dorny/test-reporter@v1
with:
name: UI Tests
path: mochawesome.json
reporter: mocha-json
######
## Upload logs
######
+3
View File
@@ -46,3 +46,6 @@ cypress.env.json
# Next.js
.next
#cypress
/apps/trading-e2e/cypress/reports/html
+2
View File
@@ -1,8 +1,10 @@
const { defineConfig } = require('cypress');
module.exports = defineConfig({
reporter: '../../node_modules/cypress-mochawesome-reporter',
e2e: {
setupNodeEvents(on, config) {
require('cypress-mochawesome-reporter/plugin')(on);
require('@cypress/grep/src/plugin')(config);
return config;
},
+1
View File
@@ -150,6 +150,7 @@
"babel-jest": "27.5.1",
"babel-loader": "8.1.0",
"cypress": "^11.2.0",
"cypress-mochawesome-reporter": "^3.3.0",
"cypress-real-events": "^1.7.1",
"dotenv": "^16.0.1",
"eslint": "8.15.0",