-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
prevent-stalemark an issue so it is ignored by stale[bot]mark an issue so it is ignored by stale[bot]stage: needs investigatingSomeone from Cypress needs to look at thisSomeone from Cypress needs to look at thistopic: cy.intercept()
Description
Current behavior
If a network request is aliased and the network request is cancelled by the browser, cy.wait
will timeout waiting for the network request.
Desired behavior
cy.wait
should complete with a failed network request and should convey that the request was cancelled.
Test code to reproduce
// Intercept an outbound request with `cy.intercept` and set it to an alias
cy.intercept("route-to-request", req => {
req.id = "cancelled-request-id"
req.reply()
}
// Redirect to a new page before the request resolves
cy.visit('http://localhost:3000/path-to-new-url')
// Wait for the cancelled request to resolve
cy.wait("@cancelled-request-id")
Cypress Version
9.1.1
Other
No response
slieschke, vaclavGabriel, laurence-myers, NavyMint, caleb015 and 5 more
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]stage: needs investigatingSomeone from Cypress needs to look at thisSomeone from Cypress needs to look at thistopic: cy.intercept()