Closed dmundra closed 2 years ago
Tested locally adding the plugins to the Dockerfile and also updating Cypress to version 9.7.0 (10+ is breaking) and it works well I believe.
FROM cypress/included:9.7.0
# Drydock environment setup
LABEL exposed.command.single=cypress
ENV TARGET=http://web
VOLUME ["/src"]
WORKDIR /src
# Ensure the binary cache folder is accessible even as non-root
ENV CYPRESS_CACHE_FOLDER=/etc/Cypress
RUN mv /root/.cache/Cypress/ /etc
# Copy in sample files for base image testing
COPY cypress.json /src/
COPY smoketest.js /src/cypress/integration/
# Install Cypress plugins
RUN yarn add --cwd ../ axe-core cypress-axe@0.14.0
RUN yarn add --cwd ../ @testing-library/cypress
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
After merging #11 I will add a merge request for this one.
We have found the need to add plugins like
cypress-axe
and@testing-library/cypress
should we just add it to this repo and build the public image to include it instead of creating our own image? E.g. from https://github.com/CivicActions/cypress-tests/blob/main/docs/Plugins.md of installing the plugins.