'Visiting a Url in cypress

I have a deployed application. when i open the url the website opens just fine. when i try to test it using cypress i become

cy.visit() failed trying to load:

https://test.windows.net/en-US/home

The response we received from your web server was:

  > 404: Not Found

This was considered a failure because the status code was not 2xx.
If you do not want status codes to cause failures pass the option: failOnStatusCode: false
In my code i just have

cy.visit(`https://test.windows.net/en-US/home`);

on the online documentation i found that failOnStatusCode could be used with cy.request but not with cy.visit

Edit: When I perform the same steps on chrome everything works just fine



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source