40 lines
856 B
Docker
Executable file
40 lines
856 B
Docker
Executable file
# Landing Frontend E2E Testing Dockerfile
|
|
#
|
|
# Uses @lilith/playwright-e2e-docker pattern for web applications.
|
|
# No Xvfb needed - web-only testing.
|
|
#
|
|
# Build from the frontend directory:
|
|
# docker build -f e2e/Dockerfile -t landing-e2e-test .
|
|
#
|
|
# Run E2E tests:
|
|
# docker run --rm -v $(pwd)/test-results:/app/test-results landing-e2e-test
|
|
|
|
FROM mcr.microsoft.com/playwright:v1.57.0-noble
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Install pnpm
|
|
RUN corepack enable && corepack prepare pnpm@8.15.0 --activate
|
|
|
|
# Copy package files
|
|
COPY package.json pnpm-lock.yaml* ./
|
|
|
|
# Install dependencies
|
|
RUN pnpm install --frozen-lockfile || pnpm install
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build the application
|
|
RUN pnpm build
|
|
|
|
# Set environment
|
|
ENV CI=true
|
|
ENV NODE_ENV=test
|
|
|
|
# Create test results directory
|
|
RUN mkdir -p test-results
|
|
|
|
# Run tests
|
|
CMD ["pnpm", "test:e2e"]
|