mirror of
https://github.com/velocitatem/PHANTOM.git
synced 2026-05-31 16:43:36 +00:00
Add dynamic pricing E2E test suite with Playwright
Implement comprehensive E2E tests to validate the surge pricing pipeline: - Test SimpleSurgePricer with configurable thresholds (high=3, surge=1.5x) - Verify discount pricing when demand is below low_threshold - Test multi-product differential pricing based on demand signals - Validate price propagation from pipeline through Redis to API Test infrastructure: - Playwright configuration with custom fixtures - Python pipeline worker for direct test execution (bypasses Airflow) - API client for event ingestion and price verification - Event generator for creating realistic interaction sequences - docker-compose.e2e.yml with minimal services for testing
This commit is contained in:
27
e2e/package.json
Normal file
27
e2e/package.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "phantom-e2e-tests",
|
||||
"version": "1.0.0",
|
||||
"description": "E2E tests for PHANTOM Dynamic Pricing Pipeline",
|
||||
"scripts": {
|
||||
"test": "playwright test",
|
||||
"test:ui": "playwright test --ui",
|
||||
"test:headed": "playwright test --headed",
|
||||
"test:debug": "playwright test --debug",
|
||||
"test:report": "playwright show-report",
|
||||
"test:pricing": "playwright test dynamic-pricing",
|
||||
"test:health": "playwright test --grep 'health'",
|
||||
"pipeline:run": "python3 lib/pipeline-worker.py --store-mode hotel --high-threshold 3 --surge-multiplier 1.5",
|
||||
"pipeline:dry-run": "python3 lib/pipeline-worker.py --dry-run --json-output",
|
||||
"services:check": "curl -s http://localhost:5000/health && curl -s http://localhost:5001/health"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.49.0",
|
||||
"@types/node": "^20.0.0",
|
||||
"typescript": "^5.0.0",
|
||||
"uuid": "^9.0.0",
|
||||
"@types/uuid": "^9.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user