When multiple tests run the same beforeEach hook and use cy.server before a cy.visit only the 1st test mocks the server.
If the cy.server call is moved out of a beforeEach hook it will work, or if cy.server is invoked after a cy.visit.
This is due to a bug in the way Cypress juggles the server prior to a cy.visit happening.
When multiple tests run the same beforeEach hook and use
cy.serverbefore acy.visitonly the 1st test mocks the server.If the
cy.servercall is moved out of abeforeEachhook it will work, or ifcy.serveris invoked after acy.visit.This is due to a bug in the way Cypress juggles the server prior to a
cy.visithappening.