I am trying to run my vue3 component tests on docker, for which I have created below image.
image version: 10.5.0 cypress version: 13.7.3 OS: Windows 10
it runs my component tests from command prompt with below command: npx cypress run --component
But, when I try to run through docker using file as seen above, it by default picks my e2e tests and runs instead of my component tests.(dockerfile command: CMD ["npm","run","npx cypress run --component"])
Please guide me.
I tried multiple attampts of creating images in docker, and also tried with changing versions.
It worked with below dockerfile.. Have changed my command there..
Old docker command: CMD ["npm", "run", "npx cypress run --component"]//not working
New solution: CMD ["npm", "run", "npx cypress run", "--component"] //working
Docker file below works fine for me now. I can test my Vue3 component tests from Cypress in docker.
After adding this Dockerfile to Cypress root project, please execute below through terminal: