Skip to content
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

Merged
merged 9 commits into from
Jan 11, 2021
Merged

Conversation

chrisbreiding
Copy link
Contributor

@chrisbreiding chrisbreiding commented Jan 7, 2021

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 is false.

PR Tasks

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 7, 2021

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Jan 7, 2021



Test summary

9193 0 118 3


Run details

Project cypress
Status Passed
Commit aeff642
Started Jan 11, 2021 6:43 PM
Ended Jan 11, 2021 6:57 PM
Duration 13:31 💡
OS Linux Debian - 10.5
Browser Multiple

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

@jennifer-shehane jennifer-shehane changed the title feat: Prevent download prompts feat: Clear downloads folder when trashAssetsBeforeRuns is true Jan 8, 2021
@chrisbreiding chrisbreiding changed the title feat: Clear downloads folder when trashAssetsBeforeRuns is true feat: Trash downloads folder before runs Jan 8, 2021
@chrisbreiding chrisbreiding changed the base branch from TR-600-prevent-download-prompts to develop January 11, 2021 14:11
@chrisbreiding chrisbreiding marked this pull request as ready for review January 11, 2021 14:15
Copy link
Contributor

@flotwig flotwig left a 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: image

@chrisbreiding
Copy link
Contributor Author

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.

We discussed this and decided we might change it later if users report issues with it not being broken up.

Is there an existing docs PR for this? It looks like trashAssetsBeforeRuns docs will need an update:

Yeah, it's part of cypress-io/cypress-documentation#3472. I'll add it to the PR description.

Copy link
Contributor

@flotwig flotwig left a 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

flotwig
flotwig previously approved these changes Jan 11, 2021
Copy link
Contributor

@flotwig flotwig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great :)

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 20, 2021

Released in 6.3.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v6.3.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jan 20, 2021
@chrisbreiding chrisbreiding deleted the TR-602-clear-downloads branch April 5, 2022 18:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants