#!/usr/bin/env bash # Runs Playwright smoke tests inside the official Playwright container against # the running PedScribe app. Usage: npm run e2e (or ./scripts/e2e.sh) set -euo pipefail cd "$(dirname "$0")/.." IMAGE="mcr.microsoft.com/playwright:v1.50.0-noble" # Attach the Playwright container to the same Docker network as the app so it # can resolve pediatric-ai-scribe by service name. Internal container port is 3000. NETWORK="${E2E_NETWORK:-ped-ai_default}" BASE_URL="${BASE_URL:-http://pediatric-ai-scribe:3000}" docker run --rm --ipc=host \ --network="$NETWORK" \ -v "$PWD/e2e":/work \ -w /work \ -e BASE_URL="$BASE_URL" \ -e CI=true \ "$IMAGE" \ sh -c "npm install --no-audit --no-fund --silent && npx playwright test"