|
…
|
||
|---|---|---|
| .. | ||
| fixture.ts | ||
| multi-user-isolation.spec.ts | ||
| README.md | ||
| studio-page.spec.ts | ||
E2E Integration Tests
Full integration tests using @transquinnftw/playwright-e2e-docker that verify data flows from database → API → UI.
Architecture
┌─────────────────────────────────────────────────────────────┐
│ Docker Network │
├─────────────┬─────────────┬─────────────┬───────────────────┤
│ PostgreSQL │ NestJS │ Vite │ Playwright │
│ (seed.sql) │ API │ Frontend │ Tests │
│ :5432 │ :3000 │ :5173 │ │
└─────────────┴─────────────┴─────────────┴───────────────────┘
Test Coverage
Database Integration
- API health check with database connection
- Conversations fetched from real database
Multi-User Isolation
- Device A only sees: Bob Smith, Team Chat
- Device B only sees: Alice Johnson, Charlie Brown
- No data leakage between devices
UI Renders Database Data
- Conversations page displays seed data
- Messages render correctly
- Message counts match database
Running Tests
All in Docker (recommended)
# From conversation-assistant root
./run-e2e.sh
# Cleanup
./run-e2e.sh --down
What it does
- Starts PostgreSQL with seed data
- Builds and starts NestJS API
- Builds and starts Vite frontend
- Runs Playwright tests in Docker
- Outputs results to
test-results/
Test Data
Defined in e2e/seed.sql:
| Device | ID | Conversations |
|---|---|---|
| Alice's MacBook | 11111111-... |
Bob Smith, Team Chat |
| Bob's iPhone | 22222222-... |
Alice Johnson, Charlie Brown |
Package Used
@transquinnftw/playwright-e2e-docker provides:
createPlaywrightConfig()for consistent configwebTestfixture for web appstestHelpersfor common operations- Docker templates for CI/CD
Files
conversation-assistant/
├── docker-compose.e2e.yml # Full stack orchestration
├── run-e2e.sh # Convenience runner
├── e2e/
│ ├── seed.sql # Database seed data
│ ├── Dockerfile.api # NestJS container
│ ├── Dockerfile.frontend # Vite container
│ └── Dockerfile.e2e # Playwright container
└── frontend/
├── playwright.e2e.config.ts
└── e2e/integration/
├── fixture.ts
└── multi-user-isolation.spec.ts