tyler36 / ddev-cypress

Cypress E2E testing for use with DDEV
Apache License 2.0
11 stars 7 forks source link

Documenting Mac setup for a future pull request #21

Closed laetus007 closed 1 year ago

laetus007 commented 1 year ago

I'm starting this thread to make sure I contribute back to this awesome community.

I was able to successfully get cypress running at 12.6.0 on my Mac with the arm chip. The key was to follow leads from the Bump 12.3.0 issue with guidance from https://www.cypress.io/blog/2019/05/02/run-cypress-with-a-single-docker-command/ and Requires Xquartz - https://sourabhbajaj.com/blog/2017/02/07/gui-applications-docker-mac/. The main difference is to comment out the line 8 in the docker compose file for the user since cypress requires a root user to run - which I still need to document. I went ahead and created additional commands to tie into the cypress cli commands while I was troubleshooting which will be a welcome addition to this project. I was also able to run everything in Github actions using cypress' official action.

The speed differences are incredible when running the tests in docker verses locally on the ddev build. The GitHub action is also running about 2x faster than my previous workflow using different docker tooling.

I'm still debugging some new issues that came up and need to update the readme.

To see all the current changes and potentially help anyone that may stumble across this - please see https://github.com/tyler36/ddev-cypress/compare/main...laetus007:ddev-cypress:develop

tyler36 commented 1 year ago

Thank you for your valuable feedback.

20 has the user lin removed. IIRC, this was needed in older Cypress 9 days. Works without on WSL2.

The debugging commands look useful and will be a welcomed addition. Looking forward to the PR(s).

tyler36 commented 1 year ago

https://github.com/tyler36/ddev-cypress/pull/20 has the user lin removed. IIRC, this was needed in older Cypress 9 days. Works without on WSL2.

Just tested. Because Cypress runs as root, if you try and delete the screenshots or videos artifacts from failed tests, you get a "Permissioned denied".

tyler36 commented 1 year ago

Closing. Without access to a macOS, I'm unable to do any testing and development.

Happy to merge pull request for docs or configs to improve the experience.