Skip to content

Migrate from cy.route to cy.intercept - requests mocked via MSW are not intercepted anymore #14745

Open
@ElisaDellaC

Description

Current behavior

For our component tests we use storybook to render the component in isolation and cypress to run tests against it.
We have mocking done at Storybook level using Mock Service Worker

using cy.route we could successfully spy on the mocked requests, once migrating to cy.intercept even if I can see the requests in the network tab of the developer tools, they are not intercepted by the cy.intercept

Desired behavior

If this is a wanted change in behaviour, could you please advice on a workaround to migrate to cy.intercept that supports our use case?

Test code to reproduce

https://github.com/rosahealth/mws-cypress-storybook

Versions

Migrate from version 5.0.0 to 6.3.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions