You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
beforeEach(()=>{cy.visit('/')})it('confirms the number of times an intercept was called',()=>{cy.intercept('/users?_limit=3').as('users3')cy.intercept('/users?_limit=5').as('users5')cy.get('#load-users').click().click()cy.wait('@users3')// to avoid clicking too quickly, add small pausescy.get('#load-five-users').click().wait(20).click().wait(20).click().wait(20).click()})it('spies using query parameter',()=>{cy.intercept({pathname: '/users',query: {_limit: '3',},}).as('users3')cy.intercept({pathname: '/users',query: {_limit: '5',},}).as('users5')cy.get('#load-users').click()cy.wait('@users3')cy.get('#load-five-users').click()cy.wait('@users5')})
I have noticed that the last XHR of the first test never completes
Note that if there is no second test, or if the first test is it.only then everything is fine, the XHR completes right away. So something about the state is leaking from one test into another I guess
Cypress v6.3.0
In this two test scenario
I have noticed that the last XHR of the first test never completes
never-completes.mp4
Reproduction
Repo and branch https://github.com/cypress-io/cypress-example-recipes/tree/runaway-test
cd examples/stubbing-spying__interceptnpm run devspec.jsNote that if there is no second test, or if the first test is
it.onlythen everything is fine, the XHR completes right away. So something about the state is leaking from one test into another I guess