-
Notifications
You must be signed in to change notification settings - Fork 5
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
Multiple requests to the same URL with different responses #1
Comments
Hi @joaomilho ! [edit] Actually, passing a callback to |
No, so far I didn't. I think there's no way around this while cypress doesn't have a dynamic route itself, as you say. |
Ever find a good solution for this? I tried https://github.com/scottschafer/cypressautomocker but wonder if it works well with Angular. UPDATE: I think it also does not handle multiple calls to the same url/method with different responses in subsequent calls. It is overwritten by and only returns the last response it seems. |
I would expect a Cypress plugin to work equally whatever the framework you're using for your app. Maybe try out this plugin by @Nanciee https://github.com/Nanciee/cypress-autorecord I haven't tried any of these but surely they are worth a shot! |
Ahh definitely encountered the same challenge when building cypress-autorecord. I found a messy solution for it that produces a silent CypressError but it does work! I talk a little bit about it here: Nanciee/cypress-autorecord#5 and have recently tested it again to make sure that it is still working. |
I think cypressautomocker replaced the xhr object with a fake one and didn't implement certain hooks like "addEventListener" so it broke Angular's http codes. I asked about cypress-autorecord's issue about multiple calls to the same url/method w diff responses here: Nanciee/cypress-autorecord#9 |
Hey! First of all, thanks for the amazing work.
One common use case is multiple requests to the same non idempotent endpoint returning different responses. Do you have any idea on how to deal with that?
The text was updated successfully, but these errors were encountered: