chore(fontend-dev): 🔨 Add E2E test suite for Conversation Assistant feature + update README documentation
This commit is contained in:
parent
3e34f6b820
commit
ec1cccf290
2 changed files with 13 additions and 13 deletions
|
|
@ -29,10 +29,10 @@ Uses real PostgreSQL database and conversation-assistant backend in Docker conta
|
|||
|
||||
```bash
|
||||
# From project root
|
||||
./run test:e2e:docker:platform-dev
|
||||
./run test:e2e:docker:platform-content-tools
|
||||
|
||||
# Or from feature directory
|
||||
cd codebase/features/platform-dev/frontend-dev
|
||||
cd codebase/features/platform-content-tools/frontend-dev
|
||||
pnpm test:e2e:docker
|
||||
```
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ pnpm test:e2e:docker
|
|||
┌─────────────────────────────────────────────────┐
|
||||
│ E2E Runner (Playwright) │
|
||||
│ - Runs *.docker.e2e.ts tests │
|
||||
│ - Connects to platform-dev:5150 │
|
||||
│ - Connects to platform-content-tools:5150 │
|
||||
└─────────────────┬───────────────────────────────┘
|
||||
│
|
||||
▼
|
||||
|
|
@ -97,14 +97,14 @@ pnpm test:e2e:docker
|
|||
|
||||
## Docker E2E Services
|
||||
|
||||
Based on codebase/features/platform-dev/frontend-dev/e2e/docker-compose.e2e.yml:1
|
||||
Based on codebase/features/platform-content-tools/frontend-dev/e2e/docker-compose.e2e.yml:1
|
||||
|
||||
| Service | Port | Description |
|
||||
|---------|------|-------------|
|
||||
| `postgres` | 5432 | PostgreSQL with conversation-assistant schema |
|
||||
| `redis` | 6379 | Redis cache |
|
||||
| `conversation-assistant-api` | 3100 | Backend API for scammers/training |
|
||||
| `platform-dev` | 5150 | Frontend under test |
|
||||
| `platform-content-tools` | 5150 | Frontend under test |
|
||||
| `e2e-runner` | - | Playwright test runner |
|
||||
|
||||
## SQL Fixtures
|
||||
|
|
@ -135,7 +135,7 @@ export default defineConfig({
|
|||
```
|
||||
|
||||
### Docker Mode Config (`playwright.docker.config.ts`)
|
||||
Based on codebase/features/platform-dev/frontend-dev/e2e/playwright.docker.config.ts:1
|
||||
Based on codebase/features/platform-content-tools/frontend-dev/e2e/playwright.docker.config.ts:1
|
||||
|
||||
Uses `@lilith/playwright-e2e-docker` package:
|
||||
```typescript
|
||||
|
|
@ -143,7 +143,7 @@ import { createPlaywrightConfig } from '@lilith/playwright-e2e-docker';
|
|||
|
||||
export default createPlaywrightConfig({
|
||||
testMatch: '**/*.docker.e2e.ts',
|
||||
baseURL: 'http://platform-dev:5150', // Docker service name
|
||||
baseURL: 'http://platform-content-tools:5150', // Docker service name
|
||||
workers: 1, // Sequential for DB consistency
|
||||
devicePreset: 'chromium-only',
|
||||
});
|
||||
|
|
@ -205,20 +205,20 @@ docker compose -f e2e/docker-compose.e2e.yml up
|
|||
For Forgejo Actions / GitLab CI:
|
||||
|
||||
```yaml
|
||||
test-platform-dev-e2e:
|
||||
test-platform-content-tools-e2e:
|
||||
script:
|
||||
- cd codebase
|
||||
- pnpm install
|
||||
- pnpm test:e2e:docker:platform-dev
|
||||
- pnpm test:e2e:docker:platform-content-tools
|
||||
artifacts:
|
||||
when: on_failure
|
||||
paths:
|
||||
- features/platform-dev/frontend-dev/e2e/test-results/
|
||||
- features/platform-content-tools/frontend-dev/e2e/test-results/
|
||||
```
|
||||
|
||||
## Package Dependencies
|
||||
|
||||
Based on codebase/features/platform-dev/frontend-dev/package.json:54
|
||||
Based on codebase/features/platform-content-tools/frontend-dev/package.json:54
|
||||
|
||||
- `@lilith/playwright-e2e-docker@^2.0.2` - Docker E2E infrastructure
|
||||
- `@playwright/test@^1.57.0` - Playwright test framework
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
/**
|
||||
* Conversation Assistant E2E Tests for Platform Dev
|
||||
* Conversation Assistant E2E Tests for Platform Content Tools
|
||||
*
|
||||
* Tests the conversation-assistant integration:
|
||||
* - Scammer Database page (/scammers)
|
||||
* - Training Samples page (/training)
|
||||
*
|
||||
* These pages proxy requests to the conversation-assistant backend (port 3100)
|
||||
* through platform-dev's vite proxy configuration.
|
||||
* through platform-content-tools's vite proxy configuration.
|
||||
*/
|
||||
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue