Replies: 1 comment
-
@thaiching // use .all get a list of all requests then select the last one
cy.get('@gam.all').then(matches => Cypress._.last(matches))
.should(...) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a network request to spy on which will always return multiple matchers. The first few matchers usually don't contain the data that I need to perform assertion and I would need to spy only the last matcher found.
Currently I have to do a multiple cy.wait() before getting to the last matcher, which is not ideal. Just wondering if there's a better way to only wait on the last matcher?
All the interceptor network requests have the same "GET" and url pattern and the only difference are the response returned.
Beta Was this translation helpful? Give feedback.
All reactions