jeudi 14 janvier 2021

Cypress intercept not matching url

I am fetching data with a network call:

https://mydomain.xxx/third-party-service/pragma?perPage=15&page=1
Request Method: GET

Trying to intercept it with code:

cy.intercept({ method: 'GET', url: '**/pragma**' }).as('getPragmaDocuments');
cy.wait('@getPragmaDocuments');

However, it does not intercept the network request.

Error I get:

Timed out retrying after 5000ms: cy.wait() timed out waiting 5000ms for the 1st request to the route: getPragmaDocuments. No request ever occurred.Learn more

Aucun commentaire:

Enregistrer un commentaire