Skip to content

cy.server will not mock requests after the 1st test when used prior to cy.visit #59

@brian-mann

Description

@brian-mann

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions