Skip to content

Commit

Permalink
Merge pull request #644 from DFE-Digital/test-get-academisation-api-s…
Browse files Browse the repository at this point in the history
…lack-reporter-ready

Test get academisation api slack reporter ready
  • Loading branch information
dangood84 authored Feb 6, 2025
2 parents 03ab525 + f1c9fab commit 466aa81
Show file tree
Hide file tree
Showing 5 changed files with 1,329 additions and 23 deletions.
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: CypressTests/cypress/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-academisation-api/actions/runs/${{github.run_id}}"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -397,3 +397,4 @@ ZAP-Report.html
# Cypress
*/cypress/screenshots
*/cypress/videos
*/cypress/reports
11 changes: 11 additions & 0 deletions CypressTests/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ module.exports = defineConfig({
},
video: false,
userAgent: 'DfEAcademiesAcademisation/1.0 Cypress',
reporter: "cypress-multi-reporters",
reporterOptions: {
reporterEnabled: "mochawesome",
mochawesomeReporterOptions: {
reportDir: "cypress/reports/mocha",
quite: true,
overwrite: false,
html: false,
json: true,
},
},
e2e: {
setupNodeEvents(on, config) {
on('after:run', async () => {
Expand Down
Loading

0 comments on commit 466aa81

Please sign in to comment.