Use a Fixture in Cypress to Provide Response Data to Network Requests

InstructorFilip Hric

Share this video with your friends

Send Tweet

Instead of explicitly providing the exact body, you can choose to save the data you want to use in a separate file. When you create a file in the fixtures folder, you can reference it using fixture option in the .intercept() command. This will automatically look into the fixtures folder and load the data from the file.