Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
b12c7a3
chore: update .gitignore to include Cypress output directories and re…
paulushcgcj Mar 19, 2026
f445e64
Merge branch 'main' into ci/improve-cypress
paulushcgcj Mar 19, 2026
a7069cd
feat: add mochawesome reporter and update Cypress scripts for local a…
paulushcgcj Mar 19, 2026
0f1b2df
feat: add mochawesome reporter configuration and script for generatin…
paulushcgcj Mar 19, 2026
44a821b
feat: enhance Cypress scripts with clean report functionality for imp…
paulushcgcj Mar 19, 2026
049ca67
feat: integrate accessibility checks into Cypress tests and enhance r…
paulushcgcj Mar 19, 2026
f2d6573
feat: add accessibility step definitions for Cypress tests
paulushcgcj Mar 19, 2026
052ced8
feat: update markdown headers in Cypress test summary for consistency
paulushcgcj Mar 19, 2026
44ebad2
chore: update cypress scripts and dependencies in package.json
paulushcgcj Mar 20, 2026
a296391
feat: integrate Lighthouse audits into Cypress tests and enhance repo…
paulushcgcj Mar 20, 2026
2a37213
feat: enhance accessibility checks with live region support and focus…
paulushcgcj Mar 19, 2026
3a19d22
feat: enable Mochawesome reporting for Cypress tests and simplify run…
paulushcgcj Mar 20, 2026
2a1c6d9
feat: add markdown report generation and summary to GitHub Action for…
paulushcgcj Mar 20, 2026
1f67aa1
fix: correct working directory for Markdown report generation and sum…
paulushcgcj Mar 20, 2026
bfe2ac2
fix: ensure summary and screenshot checks always run in GitHub Action
paulushcgcj Mar 20, 2026
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
17 changes: 16 additions & 1 deletion .github/workflows/.automated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,27 @@ jobs:
uses: cypress-io/github-action@v5
with:
working-directory: cypress
browser: chrome
config: reporter=mochawesome,reporter-options=reportDir=reports/mochawesome,overwrite=false,html=false,json=true
env:
CYPRESS_baseUrl: https://${{ inputs.url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_idir_password: ${{ secrets.IDIR_UAT_PASSWORD }}
CYPRESS_idir_username: ${{ secrets.IDIR_UAT_USERNAME }}
CYPRESS_bceid_password: ${{ secrets.BCEID_UAT_PASSWORD2 }}
CYPRESS_bceid_username: ${{ secrets.BCEID_UAT_USERNAME2 }}
CYPRESS_bceid_username: ${{ secrets.BCEID_UAT_USERNAME2 }}
MOCHAWESOME_REPORT: true

- name: Generate Markdown Report
if: failure()
working-directory: cypress
run: |
npm run report:md

- name: Add summary to GitHub Action
if: always()
working-directory: cypress
run: cat summary.md >> $GITHUB_STEP_SUMMARY

- name: Publish Cypress Results
uses: mikepenz/action-junit-report@49b2ca06f62aa7ef83ae6769a2179271e160d8e4 # v6
Expand All @@ -47,6 +61,7 @@ jobs:
job_name: User Journeys

- name: Check for Cypress Screenshots and Videos
if: always()
run: |
if [ -d "cypress/cypress/screenshots" ] && [ "$(ls -A cypress/cypress/screenshots)" ]; then
echo "Screenshots folder is not empty, uploading artifacts."
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -375,4 +375,7 @@ pyrightconfig.json
docker-compose.override.yml
**/config/application-dev-*.yml
**/config/application-dev-*.properties
**/screenshots/**.png
**/screenshots/**.png
**/videos/**.mp4
**/reports
cypress/summary.md
175 changes: 175 additions & 0 deletions cypress/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,node,cypressio
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,node,cypressio

### CypressIO ###
# gitignore template for the CypressIO, browser test framework
# website: https://www.cypress.io/

cypress/results/*
cypress/reports/*
cypress/screenshots/*
cypress/videos/*

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

### Node Patch ###
# Serverless Webpack directories
.webpack/

# Optional stylelint cache

# SvelteKit build / generate output
.svelte-kit

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,node,cypressio

reports/
summary.md
46 changes: 46 additions & 0 deletions cypress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,59 @@ npm run cy:open:local
# Headless mode against localhost
npm run cy:run:local

# Headless mode with mochawesome JSON output (for markdown summary)
npm run cy:run:md:local

# Against a custom URL
npm run cy:open -- --config baseUrl=https://your-app-url.example.com
```

> [!NOTE]
> You need a `.env` file with login credentials before running the tests. See the [Developer Guide](../../wiki/Developer-Guide#local-development--env-file) for details.

## Accessibility steps (Gherkin)

Accessibility checks are available as first-class Gherkin steps and can be mixed with existing user journey scenarios.

```gherkin
Then the page should have no accessibility violations
Then the "main" region should have no accessibility violations
When I press "Tab" 3 times
Then the element "Facility Name" should be focused
```

These steps use `cypress-axe`, `axe-core`, `@testing-library/cypress`, and `cypress-real-events`.

## GitHub Actions markdown summary (mochawesome)

To generate a markdown report for `GITHUB_STEP_SUMMARY`, run Cypress with mochawesome JSON output and then generate the summary markdown file:

```bash
# Generates JSON files in reports/mochawesome and accessibility metadata in reports/a11y
npm run cy:run:md

# Converts mochawesome + accessibility metadata into summary.md
npm run report:md
```

Generated artifacts:

- `reports/mochawesome/**/*.json` (machine-readable test results)
- `reports/a11y/a11y-results.json` (accessibility checks metadata)
- `summary.md` (markdown report ready for GitHub Actions summary)

In GitHub Actions, append it after your Cypress step:

```bash
cat cypress/summary.md >> "$GITHUB_STEP_SUMMARY"
```

`summary.md` includes:

- test totals and failed tests
- failed test screenshots and videos (when available)
- accessibility check totals and top violations

## Submitting a test without coding

You can submit test scenarios directly through GitHub Issues — no coding required:
Expand Down
Loading
Loading