-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: Trash downloads folder before runs #14452
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
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.
I wonder how many users will want to auto-trash screenshots
and videos
, but not downloads
, or vice versa. We could extend trashAssetsBeforeRuns
to accept boolean | { screenshots?: boolean, videos?: boolean, downloads?: boolean }
.
But I guess that's probably not worth the effort, since the user can always add a plugin event to use fs
to delete whatever they want between tests, and it's a rare use case.
Is there an existing docs PR for this? It looks like trashAssetsBeforeRuns
docs will need an update:
We discussed this and decided we might change it later if users report issues with it not being broken up.
Yeah, it's part of cypress-io/cypress-documentation#3472. I'll add it to the PR description. |
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.
Good to go once updated to use config.downloadsFolder
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.
looks great :)
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
User facing changelog
Not sure if this needs its own changelog item, as it's just a corollary to #14431. This might actually be considered a chore rather than a feature.
Additional Details
With #14431, users can test out file downloads. With this, the downloads folder will be trashed along with screenshots and videos before a run unless
trashAssetsBeforeRuns
isfalse
.PR Tasks
cypress-documentation
? File download updates cypress-documentation#3472type definitions
?cypress.schema.json
?