cy-verify-downloads
cy-verify-downloads copied to clipboard
In Cypress headless mode download.htm file is created
When starting the tests in a Cypress headless mode, .crdownload is not appended to the downloaded file and removed when the file is downloaded completely, instead the completely new file is being created inside cypress/downloads folder with the name downloads.htm.crdownload ('downloads.htm'). So at the end of testing there are 2 files:
valid_file.txt download.htm
Why is it happening?
CY v12.17.0 cy-verify-downloads v0.1.15
Thank you in advance.
I had the same problem and it's because the file is still downloading. I solved the problem by adding a cy.wait after the download action (click or get url). For example, you add 10 seconds to make sure it's finished (then maybe you can intercept it).
Hope it's help you