Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test get trams api slack reporter ready #690

Merged
merged 6 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/cypress-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,22 @@ jobs:
with:
name: screenshots-${{ inputs.environment }}-${{ matrix.browser }}
path: screenshots

- name: Generate report
if: always()
run: |
mkdir mochareports
npm run generate:html:report

- name: Upload report
if: always()
uses: actions/upload-artifact@v4
with:
name: reports-${{ inputs.environment }}-${{ matrix.browser }}
path: CypressTests/cypress/reports/mocha

- name: Report results
if: always()
run: npm run cy:notify -- --custom-text="Environment ${{ inputs.environment }}, See more information https://github.com/DFE-Digital/academies-api/actions/runs/${{github.run_id}}"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ CypressTests/node_modules
# screenshots and videos
CypressTests/cypress/screenshots
CypressTests/cypress/videos
CypressTests/cypress/reports
*/cypress.env.json

# ZAP
.ZAP
Expand Down
11 changes: 11 additions & 0 deletions CypressTests/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ const { defineConfig } = require('cypress')
module.exports = defineConfig({
failOnStatusCode: 'false',
userAgent: 'AcademiesApi/1.0 Cypress',
reporter: "cypress-multi-reporters",
reporterOptions: {
reporterEnabled: "mochawesome",
mochawesomeReporterOptions: {
reportDir: "cypress/reports/mocha",
quite: true,
overwrite: false,
html: false,
json: true,
},
},
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
Expand Down
7 changes: 0 additions & 7 deletions CypressTests/cypress.env.json

This file was deleted.

Loading
Loading