generated from bisco/codex-bootstrap
test: add functional portal suite
This commit is contained in:
@@ -109,6 +109,8 @@ docker compose run --rm backend python manage.py test
|
||||
docker compose run --rm frontend npm run check
|
||||
docker compose run --rm frontend npm run build
|
||||
docker compose run --rm proxy nginx -t
|
||||
docker compose -f docker-compose.yml -f docker-compose.test.yml --profile test run --rm backend python manage.py seed_demo
|
||||
docker compose -f docker-compose.yml -f docker-compose.test.yml --profile test run --build --rm functional-tests
|
||||
docker compose config --quiet
|
||||
|
||||
# Stop the stack without deleting content
|
||||
@@ -128,12 +130,30 @@ local environment; run the seed command again after the next startup.
|
||||
├── backend/ # Wagtail/Django CMS and API
|
||||
├── frontend/ # Astro public website
|
||||
├── nginx/ # Reverse-proxy virtual host
|
||||
├── tests/functional/ # Playwright browser tests
|
||||
├── docker-compose.test.yml # Functional-test Compose override
|
||||
├── docs/ # Architecture, operations, security, and ADRs
|
||||
├── docker-compose.yml
|
||||
├── .env.example
|
||||
└── README.md
|
||||
```
|
||||
|
||||
## Functional tests
|
||||
|
||||
The Compose test override builds a pinned Playwright image, exposes `azionelab.org` on
|
||||
the internal Docker network, and runs the browser suite against NGINX. It replaces the
|
||||
database mount with the isolated `test_postgres_data` volume, so the normal CMS data is
|
||||
not changed. Refresh the idempotent test seed first:
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.yml -f docker-compose.test.yml --profile test run --rm backend python manage.py seed_demo
|
||||
docker compose -f docker-compose.yml -f docker-compose.test.yml --profile test run --build --rm functional-tests
|
||||
```
|
||||
|
||||
The suite covers page content and section order, contact actions, mobile navigation,
|
||||
responsive overflow, semantic landmarks, image alternatives, the aggregate API and
|
||||
media, Wagtail admin routing, and rejection of unknown virtual hosts.
|
||||
|
||||
## Database and media backups
|
||||
|
||||
Database rows and uploaded files must be backed up together:
|
||||
|
||||
Reference in New Issue
Block a user