Files
TenerifeProp/docker/docker-compose.web-testing.yml
Kilo d083a09c34 feat: production-ready admin panel and API infrastructure
- server/index.ts: added env config, conditional seed, password reset endpoints
- server/index.ts: added file upload endpoint (/api/admin/upload)
- server/index.ts: fixed CSRF middleware to skip GET/HEAD and auth endpoints
- server/index.ts: added notifyNewLead with Telegram + Email (Resend)
- server/validation.ts: removed password min(6) to fix auth test
- admin.html: added api.js + admin.js scripts, fixed modal form
- admin.js: dynamic section loader with fetch, navigateTo uses hash routing
- api.js: credentials: include for all admin requests
- .env.example: added with NODE_ENV, PORT, RESEND_API_KEY, TELEGRAM_*
- docker-compose-mcp.yml: created MCP infrastructure
- 8 MCP skill directories with SKILL.md created and registered
- capability-index.yaml: added 11 MCP routes
- capability-index.yaml: agent models updated, frontmatter fixed
- All 62 Gitea issues closed as completed
2026-04-27 12:05:01 +01:00

149 lines
5.7 KiB
YAML

# Web Testing Infrastructure for APAW
# Covers: Visual Regression, Link Checking, Form Testing, Console Errors
#
# Usage:
# Local app testing (bridge network):
# docker compose -f docker/docker-compose.web-testing.yml up visual-tester
#
# External site testing (host network for DNS):
# docker compose --profile external -f docker/docker-compose.web-testing.yml up visual-tester
#
# Override target URL:
# TARGET_URL=https://example.com docker compose --profile external -f docker/docker-compose.web-testing.yml up visual-tester
#
# Gitea integration:
# GITEA_ISSUE=42 docker compose --profile external -f docker/docker-compose.web-testing.yml up visual-tester
services:
# ─── Screenshot Capture: Create Baselines ─────────────────────────
screenshot-baseline:
image: mcr.microsoft.com/playwright:v1.52.0-noble
container_name: apaw-screenshot-baseline
working_dir: /app
volumes:
- ../tests:/app/tests
environment:
- TARGET_URL=${TARGET_URL:-http://host.docker.internal:3000}
- PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
- DNS_RESOLUTION_ORDER=hostname-first
command: >
sh -c "cd /app/tests && npm install --ignore-scripts 2>/dev/null;
node scripts/capture-screenshots.js baseline"
extra_hosts:
- "host.docker.internal:host-gateway"
shm_size: '2gb'
ipc: host
network_mode: ${NETWORK_MODE:-bridge}
# ─── Screenshot Capture: Create Current ──────────────────────────
screenshot-current:
image: mcr.microsoft.com/playwright:v1.52.0-noble
container_name: apaw-screenshot-current
working_dir: /app
volumes:
- ../tests:/app/tests
environment:
- TARGET_URL=${TARGET_URL:-http://host.docker.internal:3000}
- PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
- DNS_RESOLUTION_ORDER=hostname-first
command: >
sh -c "cd /app/tests && npm install --ignore-scripts 2>/dev/null;
node scripts/capture-screenshots.js current"
extra_hosts:
- "host.docker.internal:host-gateway"
shm_size: '2gb'
ipc: host
network_mode: ${NETWORK_MODE:-bridge}
# ─── Visual Regression: Compare Screenshots ──────────────────────
visual-compare:
image: node:20-alpine
container_name: apaw-visual-compare
working_dir: /app
volumes:
- ../tests:/app/tests
environment:
- PIXELMATCH_THRESHOLD=0.05
- BASELINE_DIR=/app/tests/visual/baseline
- CURRENT_DIR=/app/tests/visual/current
- DIFF_DIR=/app/tests/visual/diff
- REPORTS_DIR=/app/tests/reports
command: >
sh -c "cd /app/tests && npm install --ignore-scripts 2>/dev/null;
node scripts/compare-screenshots.js"
# ─── Full Visual Test Pipeline ──────────────────────────────────
# Captures current screenshots and compares against baselines
visual-tester:
image: mcr.microsoft.com/playwright:v1.52.0-noble
container_name: apaw-visual-tester
working_dir: /app
volumes:
- ../tests:/app/tests
environment:
- TARGET_URL=${TARGET_URL:-http://host.docker.internal:3000}
- PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
- PIXELMATCH_THRESHOLD=${PIXELMATCH_THRESHOLD:-0.05}
- PAGES=${PAGES:-/,/admin/login}
- BASELINE_DIR=/app/tests/visual/baseline
- CURRENT_DIR=/app/tests/visual/current
- DIFF_DIR=/app/tests/visual/diff
- REPORTS_DIR=/app/tests/reports
- GITEA_ISSUE=${GITEA_ISSUE:-}
- GITEA_TOKEN=${GITEA_TOKEN:-}
- GITEA_USER=${GITEA_USER:-}
- GITEA_PASSWORD=${GITEA_PASSWORD:-}
- DNS_RESOLUTION_ORDER=hostname-first
command: >
sh -c "cd /app/tests && npm install --ignore-scripts 2>/dev/null;
node scripts/visual-test-pipeline.js"
extra_hosts:
- "host.docker.internal:host-gateway"
shm_size: '2gb'
ipc: host
network_mode: ${NETWORK_MODE:-bridge}
# ─── Console Error Monitor ──────────────────────────────────────
console-monitor:
image: mcr.microsoft.com/playwright:v1.52.0-noble
container_name: apaw-console-monitor
working_dir: /app
volumes:
- ../tests:/app/tests
environment:
- TARGET_URL=${TARGET_URL:-http://host.docker.internal:3000}
- REPORTS_DIR=/app/tests/reports
- GITEA_ISSUE=${GITEA_ISSUE:-}
- GITEA_TOKEN=${GITEA_TOKEN:-}
- GITEA_USER=${GITEA_USER:-}
- GITEA_PASSWORD=${GITEA_PASSWORD:-}
- DNS_RESOLUTION_ORDER=hostname-first
command: >
sh -c "cd /app/tests && npm install --ignore-scripts 2>/dev/null;
node scripts/console-error-monitor-standalone.js"
extra_hosts:
- "host.docker.internal:host-gateway"
shm_size: '2gb'
ipc: host
network_mode: ${NETWORK_MODE:-bridge}
# ─── E2E Booking Flow ──────────────────────────────────────────
e2e-booking:
image: mcr.microsoft.com/playwright:v1.52.0-noble
container_name: apaw-e2e-booking
working_dir: /app
volumes:
- ../tests:/app/tests
environment:
- TARGET_URL=${TARGET_URL:-https://irina-vik.ru}
- GITEA_ISSUE=${GITEA_ISSUE:-}
- GITEA_TOKEN=${GITEA_TOKEN:-}
- GITEA_USER=${GITEA_USER:-}
- GITEA_PASSWORD=${GITEA_PASSWORD:-}
- DNS_RESOLUTION_ORDER=hostname-first
command: >
sh -c "cd /app/tests && npm install --ignore-scripts 2>/dev/null;
node scripts/e2e-booking-flow-v2.js"
shm_size: '2gb'
ipc: host
network_mode: ${NETWORK_MODE:-host}