-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Comparing files via cy.readFile() results in endlessloop #25443
Copy link
Copy link
Open
Labels
prevent-stalemark an issue so it is ignored by stale[bot]mark an issue so it is ignored by stale[bot]type: bug
Description
Current behavior
When I am using the follwing code below and use two matching assets (.tiff or .jpeg) it works fine (low runtime & tests run green), but if I am using files that do not match (e.g two different .jpeg files) my test runner (open and run mode) seems to be stuck in some kind of endless loop, (longest run before i aborted was 1.5hours).
No loggin is performed during this runtime neither in open nor run mode.
Desired behavior
Value compare should work for not matching assets without problems and in the near the same time as the happy path.
Test code to reproduce
it('tests some asset', () => {
const someasset = 'test1.tif'
const assetNameDownload = 'test2.tif'
cy.readFile(`cypress/fixtures/assets/downloadCompare/${someasset}`, 'base64').then((original) => {
cy.readFile(`cypress/downloads/${assetNameDownload}`, 'base64').should('eq', original)
});
})Cypress Version
12.3.0
Node version
v16.15.0
Operating System
Windows 10.0.22621, Ubuntu 20.04.5 LTS
Debug Logs
No response
Other
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
prevent-stalemark an issue so it is ignored by stale[bot]mark an issue so it is ignored by stale[bot]type: bug