lundi 11 février 2019

Cypress not catching XHR request

I have made a simple cypress test and I want to start mocking the responses.

So in my beforeEach method I have the following

    cy.server()
    cy.route({
        method: "POST",
        url: "/perf/performance/track",
        status: 200,
        response: {}
    });

However it is not being triggered. The cypress UI displays the route as stubbed but not hit.

However I do see this in the console, which I find odd since it means that cypress knows about the call, right=

POST /perf/performance/track 503 32.261 ms - -

So any ideas of what the issue might be or where to start looking?

Aucun commentaire:

Enregistrer un commentaire