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
The route2 reply handler doesn't allow any further commands, making it impossible to save fixtures, which is necessary for us to be able to use Cypress for mocking our backend.
Uncaught CypressError: The following error originated from your test code, not from Cypress.
> A response callback passed to `req.reply()` threw an error while intercepting a response:
Cypress detected that you returned a promise from a command while also invoking one or more cy commands in that promise.
The command that returned the promise was:
> `cy.visit()`
The cy command you invoked inside the promise was:
> `cy.writeFile()`
Desired behavior
Make it possible to access the response outside route2, possibly by letting the handler inside reply yield it.
Test code to reproduce
See the snippet above.
Versions
5.6.0
The text was updated successfully, but these errors were encountered:
The route2 reply handler doesn't allow any further commands
This is an open feature request for this here: #7667 I am not sure if this will actually ever get added, since it makes it really easy to write non-deterministic tests, but arguably there should be a way to use things like cy.task from inside a route handler.
The route2 reply handler doesn't allow any further commands, making it impossible to save fixtures, which is necessary for us to be able to use Cypress for mocking our backend.
Using the following example:
Current behavior
Using the snippet above causes this error:
Desired behavior
Make it possible to access the response outside route2, possibly by letting the handler inside
reply
yield it.Test code to reproduce
See the snippet above.
Versions
5.6.0
The text was updated successfully, but these errors were encountered: