Phase 6: E2E Test

- Update scripts/e2e.sh to start worker alongside backend
- Create frontend/e2e/random-jobs.spec.ts with 3 tests:
  - Counter increment creates random job outcome visible to admin
  - Admin can view empty random jobs list
  - Regular user cannot access random jobs page
This commit is contained in:
counterweight 2025-12-21 23:00:54 +01:00
parent b8470b77a7
commit 7ec987c78d
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
2 changed files with 91 additions and 2 deletions

View file

@ -23,7 +23,11 @@ cd ..
# Start backend (SECRET_KEY should be set via .envrc or environment)
cd backend
uv run uvicorn main:app --port 8000 --log-level warning &
PID=$!
BACKEND_PID=$!
# Start worker for job processing
uv run python worker.py &
WORKER_PID=$!
cd ..
# Wait for backend
@ -46,7 +50,8 @@ fi
EXIT_CODE=$?
# Cleanup
kill $PID 2>/dev/null || true
kill $BACKEND_PID 2>/dev/null || true
kill $WORKER_PID 2>/dev/null || true
exit $EXIT_CODE