Summary
All existing tests (756 files) rely on mocked dependencies — fetch is stubbed, WebSocket is replaced with MockWebSocket, and contexts are provided via test wrappers. We need end-to-end tests that exercise the full stack against a real running backend to catch integration failures, WebSocket lifecycle issues, and real auth flows.
Plan
A detailed plan has been committed to dev at docs/plans/e2e-testing.md. It covers:
Test categories
- API integration tests — Playwright
APIRequestContext hitting the real backend (project CRUD, ontology ops, branches, PRs, lint, search)
- WebSocket tests — raw
ws connections for protocol-level testing + browser-based WebSocket interception for collab and index-status endpoints
- UI workflow tests — full browser journeys (auth, ontology editing, branch+PR workflow, health check)
Implementation phases
- Foundation — Install Playwright, auth fixtures, API integration tests, CI docker-compose
- WebSocket tests — collab handshake, presence, index-status WS, reconnection
- UI workflow tests — auth flow, project management, ontology editing, branch+PR
- CI hardening — multi-browser matrix, flaky test detection, trace artifacts
Open questions
- Auth strategy for CI (service account vs test bypass header)
- Test database seeding (Alembic + SQL fixtures vs API calls)
- Scope boundary (ontokit-web vs monorepo-level
e2e/ directory)
- MinIO requirement for initial phases
References
- Plan document:
docs/plans/e2e-testing.md on dev
Summary
All existing tests (756 files) rely on mocked dependencies —
fetchis stubbed, WebSocket is replaced withMockWebSocket, and contexts are provided via test wrappers. We need end-to-end tests that exercise the full stack against a real running backend to catch integration failures, WebSocket lifecycle issues, and real auth flows.Plan
A detailed plan has been committed to
devatdocs/plans/e2e-testing.md. It covers:Test categories
APIRequestContexthitting the real backend (project CRUD, ontology ops, branches, PRs, lint, search)wsconnections for protocol-level testing + browser-based WebSocket interception for collab and index-status endpointsImplementation phases
Open questions
e2e/directory)References
docs/plans/e2e-testing.mdondev