Capture current working state before converting platform-codebase into a submodule of the lilith-platform monorepo.
50 lines
1.7 KiB
YAML
50 lines
1.7 KiB
YAML
# E2E Testing Docker Compose for Platform Analytics Frontend
|
|
#
|
|
# Runs Playwright tests against the built app using preview server.
|
|
# Mounts test results and reports for local access.
|
|
#
|
|
# Usage:
|
|
# docker compose -f docker-compose.e2e.yml up --build --abort-on-container-exit --exit-code-from e2e-tests
|
|
# docker compose -f docker-compose.e2e.yml down -v
|
|
#
|
|
# View reports after run:
|
|
# open test-results/platform-analytics/index.html
|
|
|
|
services:
|
|
e2e-tests:
|
|
build:
|
|
context: ../../../..
|
|
dockerfile: codebase/features/platform-analytics/frontend-platform/playwright-e2e.Dockerfile
|
|
container_name: platform-analytics-e2e
|
|
|
|
environment:
|
|
# CI environment
|
|
- CI=true
|
|
- NODE_ENV=test
|
|
|
|
# Base URL for tests (uses preview server in playwright.config.ts)
|
|
- BASE_URL=http://localhost:5110
|
|
|
|
# Playwright configuration
|
|
- PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
|
|
|
|
# Use host network to avoid port mapping issues with preview server
|
|
network_mode: host
|
|
|
|
volumes:
|
|
# Mount test results for access after container exits
|
|
- ./test-results:/app/codebase/features/platform-analytics/frontend-platform/test-results
|
|
- ./playwright-report:/app/codebase/features/platform-analytics/frontend-platform/playwright-report
|
|
|
|
# Override command for different test modes
|
|
# Default: run all tests
|
|
command: pnpm test:e2e
|
|
|
|
# Alternative commands (uncomment to use):
|
|
# command: pnpm test:e2e:headed # Run with browser visible (requires DISPLAY)
|
|
# command: pnpm test:e2e:ui # Run with Playwright UI
|
|
# command: pnpm test:e2e:debug # Run in debug mode
|
|
|
|
networks:
|
|
default:
|
|
name: platform-analytics-e2e-network
|