Make a cy.intercept call in routes with params #9316
Unanswered
Gu7z
asked this question in
Questions and Help
Replies: 1 comment
-
I figured out that when you do some call (with querry) more than one time, the response cannot be setted again until the context end. |
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'm trying to make calls in my
/flag?login=${username}
route but I want to change the response from first time call and the nth time.My cypress code (considering that oldUser.username exists):
Then I click the button that make the api call 2 times and both responses are the same (true). So I tried to change from
res.send({ firstTime })
tores.send({ firstTime: Math.random() })
and i got the same number in both api calls.Any idea?
Beta Was this translation helpful? Give feedback.
All reactions