-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Labels
type: unexpected behaviorUser expected result, but got anotherUser expected result, but got another
Description
Current behavior
When running something like:
cy.intercept('GET', '...url...', { fixture: 'response.json', delay: Number.MAX_SAFE_INTEGER }).as('request1');
// ...make request
cy.wait('@request1');
// ...if delay was respected this should take a million years to reachthe request will be resolved immediately. From testing the behaviour for delay >= 2^31 is the same as when delay = 0.
It seems to be an environment thing - the same test will always respect the delay on my pipeline (linux headless chrome), but never on my laptop (osx headless chrome).
Desired behavior
I doubt anyone needs delays that large, maybe it should throw an error instead of the chance that it will silently not respect the delay depending on your environment. Or just clamp the delay to within [0, 2^31) and show a warning in case of some weird usage that was relying on a bigger number.
Cypress Version
14.5.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: unexpected behaviorUser expected result, but got anotherUser expected result, but got another