FROM mcr.microsoft.com/playwright:v1.61.1-noble@sha256:5b8f294aff9041b7191c34a4bab3ac270157a28774d4b0660e9743297b697e48

WORKDIR /work

COPY --chown=pwuser:pwuser package.json package-lock.json ./
RUN npm ci --ignore-scripts

COPY --chown=pwuser:pwuser playwright.config.ts playwright.bootstrap.config.ts playwright.pwa.config.ts playwright.cross-client.config.ts ./
COPY --chown=pwuser:pwuser tests tests
COPY --chown=pwuser:pwuser setup setup
COPY --chown=pwuser:pwuser pwa pwa
COPY --chown=pwuser:pwuser cross-client cross-client

USER pwuser

CMD ["npx", "playwright", "test"]
