-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cy.route: wait on alias does not contain all requests #3516
Comments
A single In order to access all responses of a single alias, you can use the undocumented cy.wait('@getTest.all')
.should("have.length", 2)
.then((xhrs) => {
console.log(xhrs);
}); |
Hi @jennifer-shehane Can you give full example for this? |
@nvkhanh08t4 Please check the docs. |
Docs for the usage of .all syntax can be found here. It’s not officially documented because the API may change in the future. cypress-io/cypress-documentation#1573 |
Current behavior:
In the following code example an "listener" is added to the
api/test
route and after a duration of 5 seconds it waits until the route has been called. During the 5 seconds multiple (non-deterministic) calls to the route are triggered, but the alias@getTest
only contains the xhr of the first request.Desired behavior:
Expected behaviour would be that the alias
@getTest
contains an array of the fired requests.Either I did not find any solution for that or it is not (yet) implemented?
Versions
Cypress 3.1.5
The text was updated successfully, but these errors were encountered: