Spaces:
Runtime error
Runtime error
E2E Tests
Playwright end-to-end specs for Mission Control API and UI.
Running
# Start the dev server first (or let Playwright auto-start via reuseExistingServer)
pnpm dev --hostname 127.0.0.1 --port 3005
# Run all tests
pnpm test:e2e
# Run offline OpenClaw harness (no OpenClaw install required)
pnpm test:e2e:openclaw
# Run a specific spec
pnpm exec playwright test tests/tasks-crud.spec.ts
Test Environment
Tests require .env.local with:
API_KEY=test-api-key-e2e-12345MC_DISABLE_RATE_LIMIT=1(bypasses mutation/read rate limits, keeps login rate limit active)
OpenClaw Offline Harness
The harness runs Mission Control against fixture data and mock binaries/gateway:
- fixtures:
tests/fixtures/openclaw/ - mock CLI:
scripts/e2e-openclaw/bin/{openclaw,clawdbot} - mock gateway:
scripts/e2e-openclaw/mock-gateway.mjs
Profiles:
pnpm test:e2e:openclaw:local- local mode (gateway not running)pnpm test:e2e:openclaw:gateway- gateway mode (mock gateway running)
Spec Files
Security & Auth
auth-guards.spec.tsβ All API routes return 401 without authcsrf-validation.spec.tsβ CSRF origin header validationlegacy-cookie-removed.spec.tsβ Old cookie format rejectedlogin-flow.spec.tsβ Login, session, redirect lifecyclerate-limiting.spec.tsβ Login brute-force protectiontiming-safe-auth.spec.tsβ Constant-time API key comparison
CRUD Lifecycle
tasks-crud.spec.tsβ Tasks POST/GET/PUT/DELETE with filters, Aegis gateagents-crud.spec.tsβ Agents CRUD, lookup by name/id, admin-only deletetask-comments.spec.tsβ Threaded comments on tasksworkflows-crud.spec.tsβ Workflow template CRUDwebhooks-crud.spec.tsβ Webhooks with secret masking and regenerationalerts-crud.spec.tsβ Alert rule CRUD with full lifecycleuser-management.spec.tsβ User admin CRUD
Features
notifications.spec.tsβ Notification delivery and read trackingquality-review.spec.tsβ Quality reviews with batch lookupsearch-and-export.spec.tsβ Global search, data export, activity feed
Infrastructure
limit-caps.spec.tsβ Endpoint limit caps enforceddelete-body.spec.tsβ DELETE body standardization
Shared
helpers.tsβ Factory functions (createTestTask,createTestAgent, etc.) and cleanup helpers