Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

203
Vistas
Cypress - Waiting on canceled XHR Request

I have the intended functionality of canceling a pending XHR request in the application. I want to verify that the request is canceled after invoking the cancel action.

Right now I have this:

cy.intercept('GET', '**/request/**').as('Request');
invokeRequest();
invokeCancel();
cy.wait('@Request');

However, cypress is timing out on the cy.wait(). Is there a way to verify the request has been canceled?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can use should and validate

it('should use wait value', () => {
  cy.intercept('/todos').as('todos')
  cy.visit('/')
  cy.wait('@todos').should('include.all.keys', ['request', 'response'])
})

else you can use cy.route() instead of cy.intercept(). Refer this Has lot of examples: https://glebbahmutov.com/blog/cypress-intercept-problems/

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda