This gist shows how to create a Cypress test case that verifies redirect.
In the current example, the redirect-data.json
has only one object. However, you can add more objects.
Article: https://alexzh.com/testing-redirect-with-cypress/
File pathes:
- cypress/fixtures/redirect-data.json
- cypress/integration/website-redirect/website-redirect.spec.js