Skip to content

Calling "cy.verifyDownload" with an empty string results in success #189

@BillyTom

Description

@BillyTom

I have been using cy-verify-downloads version 0.2.4 for a while now, and I just noticed an unwanted behaviour.

I accidentally changed one of my test suites so that it would call verifyDownload with an empty string as a parameter. In that case the test would be marked as "pass", even though the file download was not actually tested. The log output in Cypress UI looked like this:

verifyDownload - Waiting for the file to be exist
task - isFileExist, /home/foobar/project/cypress/downloads
assert - The file has been downloaded successfully: expected true to be true

I think this is misleading behaviour. If "cy.verifyDownload" is called with an empty string, then the test case should fail.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions