cy-verify-downloads
cy-verify-downloads copied to clipboard
If multiple files are present in the downloads folder instead of newest file the oldest one is considered by plugin
I am using this plugin for verifying if the zip file is downloaded successfully. My downloaded files contain timestamp in their names. I observed that when multiple files with the same naming convention is present in the downloads folder, the oldest file is considered. The plugin should consider the newest file which I feel is the biggest issue with this plugin.
I am using below versions: "cy-verify-downloads": "0.2.6", "cypress": "13.16.0",
The latest generated file is 'TestReport.2025-01-15_06%3A37UTC.zip' which appears last in the list. The oldest generated file is 'TestReport.2025-01-15_05%3A47UTC'.
Please see below Cypress test logs for this plugin:
`taskfindFiles, {path: /cypress/downloads, filename: TestReport} tasklog, WARNING! More than one file found for the 'TestReport' pattern: [ TestReport.2025-01-15_05%3A47UTC, TestReport.2025-01-15_05%3A48UTC, TestReport.2025-01-15_05%3A49UTC, TestReport.2025-01-15_05%3A50UTC, TestReport.2025-01-15_06%3A29UTC, TestReport.2025-01-15_06%3A30UTC, TestReport.2025-01-15_06%3A31UTC, TestReport.2025-01-15_06%3A32UTC, TestReport.2025-01-15_06%3A35UTC, TestReport.2025-01-15_06%3A36UTC, TestReport.2025-01-15_06%3A37UTC.zip]
- the first one [TestReport.2025-01-15_05%3A47UTC] will be used
taskisFileExist, /cypress/downloads/TestReport.2025-01-15_05%3A47UTC`