This is an example showing how to stub navigator.cookieEnabled.
The application index.html displays a different message depending on whether the user has cookies enabled via the navigator.cookieEnabled value.
- cypress/e2e/spec.cy.js stubs the
window.navigator.cookieEnabledmethod usingcy.stub(). We create the method stub within theonBeforeLoadof thecy.visit()
