Change a Response Body with cy.intercept to Provide Your Own Data in an API Call

InstructorFilip Hric

Share this video with your friends

Send Tweet

With .intercept() command, we can change the response body. This enables us to provide our own response instead of the real one coming from server. We can then test our application’s behavior under different situations and test different edge cases.