Adding e2e testing

This commit is contained in:
2026-06-20 10:43:08 -04:00
parent 10ab215396
commit 5e33c1d47b
14 changed files with 506 additions and 1 deletions
+14
View File
@@ -208,6 +208,20 @@ Or in Docker:
docker compose exec api pytest --cov=app --cov-report=term-missing
```
### End-to-End Testing
Browser e2e tests use pytest plus Playwright. The recommended path is the containerized runner, which joins the same Compose network as the app and opens the web service at `http://web`.
```bash
docker compose -f docker-compose.yml -f docker-compose.e2e.yml up -d db api web
docker compose -f docker-compose.yml -f docker-compose.e2e.yml run --rm e2e
```
Authenticated browser tests are skipped unless `E2E_ADMIN_USERNAME` and `E2E_ADMIN_PASSWORD` are supplied. See [`tests/e2e/README.md`](./tests/e2e/README.md) for credential examples, host-run instructions, and guidance for adding specs.
The e2e Compose override uses a separate MySQL container and volume, so tests do not use the normal dev/prod database configured in `.env`. It is still a real MySQL database, but isolated for e2e.
E2e reports are written to `test-results/e2e-report.html` and `test-results/e2e-junit.xml`.
## Additional Features
### Email Notifications