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
just wondering because I didn't find a doc about this, but what we have a case of doing a mock to different states of the same response.
for example:
/welcome api will return "Hi World" and then on subsequent /welcome needs to be returned like “Hi Globe”
is there a way to play around this that could enable me to mock the response in states
because my issue now is that the UI test just continue without waiting the response to be fully mocked (same response) or it just override everything to the latest mock
Thanks so much guys for your support that I really need because I am stuck in this for quite some time :)
The text was updated successfully, but these errors were encountered:
You can use define a state class and pass the reference into your response handler closure. Modify the value of State every time it gets called. Here's an example
@fangpenlin Thank you so much for this, it helped me so much adding my data responses and passing them in states.
there is some concern left, when I did this, sometimes the responses got mixed so the API is not mocked in the same order of state I am given, I had to use sleep(timeout) which I don't like, is there any reason might be the reason for this issue?
Hey guys,
just wondering because I didn't find a doc about this, but what we have a case of doing a mock to different states of the same response.
for example:
/welcome api will return "Hi World" and then on subsequent /welcome needs to be returned like “Hi Globe”
is there a way to play around this that could enable me to mock the response in states
because my issue now is that the UI test just continue without waiting the response to be fully mocked (same response) or it just override everything to the latest mock
Thanks so much guys for your support that I really need because I am stuck in this for quite some time :)
The text was updated successfully, but these errors were encountered: