FROM mcr.microsoft.com/playwright:v1.25.0-focal

WORKDIR /usr/local/src/playwright

COPY tsconfig.json ./
COPY package-lock.json ./
COPY package.json ./
COPY playwright.config.ts playwright.config.ts

RUN NODE_ENV=development npm install \
    && npx playwright install

COPY src src

VOLUME ["/usr/local/src/playwright/test-results", "/usr/local/src/playwright/playwright-report"]

CMD ["xvfb-run", "npx", "playwright", "test", "--grep-invert", "@special", "--project", "chromium", "--headed"]
