Description
Current behavior
Please see my fork cypress.config.js https://github.com/alexwoollam/cypress-test-tiny/blob/master/cypress.config.js
Adding the config option downloadsFolder: ""
and running cypress run
results in
Oops...we found an error preparing this test file:
> cypress/e2e/spec.cy.js
The error was:
Error: Webpack Compilation Error
multi ./cypress/e2e/spec.cy.js
Module not found: Error: Can't resolve '/run/media/alex/93b28b87-f65f-4e20-807f-0d1b65cd0ffe/www/cypress-test-tiny/cypress/e2e/spec.cy.js' in '/run/media/alex/93b28b87-f65f-4e20-807f-0d1b65cd0ffe/www/cypress-test-tiny'
[...]
^- this error is due to the fact cypress has deleted the whole project folder (everything, including .git). This is probably by design, but presuming I didn't set downloadsFolder to the root of the project. Further testing with "../" set, in fact deletes the whole /var/www folder(!!!) (structure: /var/www/project ). Interestingly, I am not running cypress with sudo. I haven't tested this with a folder set as owned by other users yet.
Notes:
- Strangely running
cypress open
and running specs, runs as expected. - We have hit this on multiple OS', node, npm/yarn and cypress versions.
- Same behavior was observed using the typescript setup.
To reproduce:
- clone fork.
ls -al
see the project.- npm install (if needed).
cypress run
.- See error message.
ls -al
, see an empty folder.
Docs
https://docs.cypress.io/guides/references/configuration#Folders--Files
Cypress package version: 12.8.1
Cypress binary version: 12.8.1
Electron version: 21.0.0
Bundled Node version: 16.16.0
Desired behavior
Please idiot-proof this option.
Test code to reproduce
https://github.com/alexwoollam/cypress-test-tiny/
Cypress Version
12.8.1
Node version
16.1610
Operating System
Debian 11, Manjaro 6.1, MacOS 12
Debug Logs
No response
Other
No response
Activity