Summary
Playwright configuration exists in the backend test directory, but the E2E test suite is minimal. As the platform grows, comprehensive end-to-end tests are essential to prevent regressions on critical user flows.
Requirements
- Write E2E tests covering the following critical flows:
- Wallet authentication: Challenge request, signature verification, JWT issuance, token refresh
- Escrow happy path: Create escrow -> invite parties -> fund -> release milestones -> complete
- Dispute flow: Create escrow -> fund -> file dispute -> admin resolves -> funds distributed
- Deadline expiration: Create escrow with deadline -> time passes -> auto-expire via scheduler
- Party acceptance: Invite party -> party accepts -> all parties accepted -> escrow activatable
- Admin operations: List users, list escrows, view audit logs, resolve disputes
- Error paths: Duplicate funding, unauthorized access, invalid state transitions, expired escrow operations
- Mock the Stellar RPC and blockchain interactions for deterministic test execution
- Set up test database fixtures with seed data
- Target 80%+ coverage of API endpoints
- Configure CI-compatible test execution (headless, parallel where possible)
Acceptance Criteria
Context
- Playwright config:
apps/backend/test/
- Existing unit tests: Jest-based across modules
- Backend entry:
apps/backend/src/main.ts
- Auth flow:
apps/backend/src/modules/auth/auth.controller.ts
Rollout Phase
Phase 5 — Admin & Production Hardening
Points: 150 (Medium)
Summary
Playwright configuration exists in the backend test directory, but the E2E test suite is minimal. As the platform grows, comprehensive end-to-end tests are essential to prevent regressions on critical user flows.
Requirements
Acceptance Criteria
Context
apps/backend/test/apps/backend/src/main.tsapps/backend/src/modules/auth/auth.controller.tsRollout Phase
Phase 5 — Admin & Production Hardening
Points: 150 (Medium)