Wiki/e2e/README.md
Corentin JOGUET e9695450ef
Some checks are pending
CI / Lint bridge (Biome) (push) Waiting to run
CI / Type-check bridge (push) Blocked by required conditions
CI / Tests unit bridge (push) Blocked by required conditions
CI / Tests integration bridge (push) Blocked by required conditions
CI / Security scan (push) Waiting to run
CI / Docker build + healthcheck (push) Blocked by required conditions
E2E Playwright / Playwright e2e (chromium) (push) Waiting to run
test(e2e): add Playwright cross-stack tests for R3.1.e database-view
7 scenarios covering the full bridge+DocAdenice+Baserow chain:
auth login, database-view insert, inline edit persistence, SSE realtime
update (no reload), RBAC write-denied, kanban drag-drop, calendar reschedule.

Includes docker-compose.e2e.yml (Postgres+Redis+Baserow+bridge+DocAdenice),
playwright.config.ts (3 projects: chromium/firefox/webkit), auth+baserow+cleanup
fixtures, global setup (API login + Baserow seed), and GitHub Actions e2e.yml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 00:37:23 +02:00

58 lines
1.9 KiB
Markdown

# E2E Playwright — formation-hub (R3.1.e)
Cross-stack end-to-end tests for the bridge + DocAdenice + Baserow chain.
## Prerequisites
- Docker + Docker Compose v2
- Node 22 + npm
- The repo cloned locally at `/home/imugiii/Documents/jsap/formation-hub`
## Quick start (local)
```bash
# 1. Boot the e2e stack (all services)
docker compose -f docker-compose.e2e.yml --env-file .env.e2e up -d --wait
# 2. Install Playwright and browsers (one-time)
cd e2e
npm install
npx playwright install chromium
# 3. Run all 7 scenarios
npm run e2e
# 4. Headed (interactive) run
npm run e2e:headed
# 5. Debug specific test
npm run e2e:debug -- tests/database-view-insert.spec.ts
# 6. Teardown
cd ..
docker compose -f docker-compose.e2e.yml down -v
```
## Test scenarios
| File | Scenario |
|------|----------|
| `tests/auth-login.spec.ts` | Login UI -> workspace home |
| `tests/database-view-insert.spec.ts` | Slash /database -> insert table view -> rows visible |
| `tests/database-view-edit-inline.spec.ts` | Double-click cell -> edit -> persist after reload |
| `tests/database-view-realtime-sse.spec.ts` | Baserow API update -> SSE -> UI updates without reload |
| `tests/database-view-rbac-denied.spec.ts` | User without rows:write -> double-click -> read-only only |
| `tests/database-view-kanban-drag.spec.ts` | Drag kanban card -> column change -> persist after reload |
| `tests/database-view-calendar-reschedule.spec.ts` | Drag calendar event -> new date -> persist after reload |
## Environment
Copy `.env.e2e` from the repo root and adjust if needed. No real secrets are
required for local dev — all defaults are non-sensitive placeholders.
## CI
The workflow `.github/workflows/e2e.yml` runs automatically on push to main
and on pull requests. It boots the full stack via Docker Compose, runs the
Playwright suite in chromium, and uploads test-results + HTML report as
artifacts.