在 Docker Container 跑 Visual Testing 之基本設定

Cypress + Docker + Chromatic ❤️

步驟

FROM cypress/base:16.13.0 # create cypress base image
RUN mkdir /app # create working directory for ducker build
WORKDIR /app # specify a path for a working directory
COPY . /app # copy cypress project code into the working directory
RUN npm install # install all dependencies
RUN $(npm bin)/cypress verify # verify cypress has been successfully installed and loaded, and make sure that cypress is ready
RUN ["npm", "run", "chromatic"] # run visual testing with chromatic
node_modules
docker build -t cypress . # create a docker image inside the root "." of the project.

在 Docker Container 跑 Visual Testing 的結果

查看 Chromatic 的結果

更多細節。

查看 Chromatic 的結果


comments powered by Disqus