-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add scripts for testing in docker container #352
feat: add scripts for testing in docker container #352
Conversation
Visual Tests Report is ready. |
Without "HOME: /root" firefox crashes during testing in GitHub Actions
testing in pr-visual-tests.yml
Npm command for testing can be passed as argument for testing scripts. Mount playwright-report folder to see test results from container
Add .dockerignore to ignore node_modules folders.
playwright/Dockerfile
Outdated
RUN npm ci | ||
COPY . . | ||
RUN cd demo && \ | ||
npm i && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm ci ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"npm ci" is used in ci.yml: https://github.com/diplodoc-platform/components/blob/master/.github/workflows/ci.yml#L24
With "npm i" testing in docker also works.
Change 'npm i' to 'npm ci' for demo folder
Add scripts for running screenshots tests in docker container for the same tests results on different OS.
Screenshot testing results depend on the OS. For this reason, tests are run in a Docker container with Ubuntu.
How it works:
Docker builds copy of app and runs screenshot tests in container. There are mounting for components and playwright-report folders. Due to this, the results of tests (screenshots, test report) in the container also appear on the host.