Open MikeMcC399 opened 1 year ago
Unfortunately it seems that this issue is unreliably reproducible 🙁 although it is still happening.
When it happens, screenshot copies build up, since they can't be deleted.
@MikeMcC399 It sounds like this issue should be moved to the main repo.
If a test fails, then the option trashAssetsBeforeRuns with default
true
fails to delete previous screenshots on Windows 11 if there have been previous runs which produced screenshots in nested sub-folders ofcypress/screenshots
.The error message is:
The script
dev
is opening the screenshots, which prevents Cypresstrash
from working.Steps to reproduce
Cypress:
12.13.013.0.0 Operating system: Windows 11 Node.js:16.16.018.16.1Create a new test spec
cypress/tests/demo/show-fail.spec.ts
with the following contents which will always fail when run:Execute
then in a separate terminal window, execute
The new test should fail and generate 3 screenshots
and 1 video.Kill the
dev
process (if necessary sign out and back in again) and repeatand again in a separate terminal window, execute
Note the error message (see above).
Attempt to delete
cypress/screenshots
in Windows Explorer. Note message "Folder Access Denied / You'll need to provide administrator permission to delete this folder". Deletion is not possible.Kill
yarn dev
process.Attempt to delete
cypress/screenshots
in Windows Explorer. This is successful.Suggestions
- When RWA is reworked, consider if this can be fixed.