-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed as not planned
Closed as not planned
Copy link
Labels
staleno activity on this issue for a long periodno activity on this issue for a long period
Description
Current behavior
During end to end testing, I am intercepting the same api call many places (each place, it will provide different response). When i use cy.wait() command to retrieve the response, it is always showing the old response (it means, it is showing response which intercepted first time)
cy.intercept('**customerInfo/inventory/review/*').as('reviewInvetory')
cy.wait('@reviewInvetory').then((res) => {
cy.log(JSON.stringify(res.response?.body))
}) //printing reviewInvetory1 response
//doing some action in the application, then again intercepting the same call
cy.intercept('**customerInfo/inventory/review/*').as('reviewInvetory')
cy.wait('@reviewInvetory').then((res) => {
cy.log(JSON.stringify(res.response?.body))
}) //printing the first call data instead of printing the latest intercept call
Desired behavior
Expecting to show latest call instead of showing the old call
Test code to reproduce
I can't share my repo to public
Cypress Version
9.4
Other
No response
Metadata
Metadata
Assignees
Labels
staleno activity on this issue for a long periodno activity on this issue for a long period