Nanciee / cypress-autorecord

Simplify API mocking by auto-recording/stubbing HTTP interactions and automating the process of updating/deleting mocks.
223 stars 53 forks source link

Returns `application/json` instead of `text/html` #69

Open selfagency opened 2 years ago

selfagency commented 2 years ago

For some reason when using this plugin, I get the following error in my tests:

CypressError: `cy.visit()` failed trying to load:  http://localhost:3000/search  The `content-type` of the response we received from your web server was:    > `application/json`
StudioSpindle commented 2 years ago

I am facing the same issue.

My guess is that we are using cy.visit to request an html page. However, the response header's content-type is set to "application/json" where instead it should be "text/html".

I'm not sure yet why this issue is only occurring when using cypress-autorecord.