I would like to check that a file is downloaded as part of my test. I only need to confirm that the file is downloaded after clicking a button. I have no need to read the file and its contents. All the files I am downloading are zips, not sure if that makes them harder to read?
it('Initiate download', () => {
cy.get('[id="download-button"]')
.should('be.visible')
.click()
});
it('Verify the downloaded file', () => {
cy.readFile('/Downloads/fileName.zip')
.should('exist')
});