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
I've upgraded Cypress from version 10 to 13 and I'm running into a strange issue where the test fails with the following error:
y.visit() failed trying to load:
https://localhost:4000/products/triko
The content-type of the response we received from your web server was:
> application/json
This was considered a failure because responses must have content-type: 'text/html'
However, you can likely use cy.request() instead of cy.visit().
cy.request() will automatically get and set cookies and enable you to parse responses.
Because this error occurred during a before each hook we are skipping the remaining tests in the current suite: upsell popup
However, if I look at the response from the URL I get the proper response from the server with the right content-type (screenshot below).
One difference is that I used to have on version 10 is cy.server({ whitelist: () => false }), but I can't seem to find the equivalent with cy.intercept(). Not sure if that has something to do with it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've upgraded Cypress from version 10 to 13 and I'm running into a strange issue where the test fails with the following error:
However, if I look at the response from the URL I get the proper response from the server with the right content-type (screenshot below).
One difference is that I used to have on version 10 is
cy.server({ whitelist: () => false })
, but I can't seem to find the equivalent withcy.intercept()
. Not sure if that has something to do with it.Beta Was this translation helpful? Give feedback.
All reactions