36 lines
1.2 KiB
Docker
36 lines
1.2 KiB
Docker
# =============================================================================
|
|
# Playwright Test Runner - E2E Production Auth Tests
|
|
# =============================================================================
|
|
#
|
|
# Headless Playwright container for running E2E auth tests.
|
|
# Uses mcr.microsoft.com/playwright for pre-installed browsers.
|
|
#
|
|
# Build context should be project root (lilith-platform/)
|
|
|
|
FROM mcr.microsoft.com/playwright:v1.50.0-noble
|
|
|
|
WORKDIR /app
|
|
|
|
# Install redis-tools for rate limit key flushing between tests
|
|
RUN apt-get update && apt-get install -y --no-install-recommends redis-tools && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy the e2e-auth package (local testing utility)
|
|
COPY codebase/@packages/@testing/e2e-auth/ ./packages/e2e-auth/
|
|
|
|
# Copy test package files
|
|
COPY codebase/e2e/prod-auth/package.json ./
|
|
COPY codebase/e2e/prod-auth/tsconfig.json ./
|
|
|
|
# Copy test sources
|
|
COPY codebase/e2e/prod-auth/tests/ ./tests/
|
|
COPY codebase/e2e/prod-auth/playwright.config.ts ./
|
|
COPY codebase/e2e/prod-auth/global-setup.ts ./
|
|
|
|
# Install dependencies
|
|
RUN npm install --ignore-scripts
|
|
|
|
# Create directories for test outputs
|
|
RUN mkdir -p /app/test-results /app/playwright-report
|
|
|
|
# Default command runs tests
|
|
CMD ["npx", "playwright", "test"]
|