Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

214
Views
cy.intercept aleatoriamente no funciona cuando se establece "retraso"

Uso cy.intercept para simular una API.

Pero no puedo entender por qué cy.intercept no siempre intercepta las solicitudes. El fallo es aleatorio.

Aquí está mi función de intercepción

 cy.intercept('GET', '**/api/search?searchValue=**', {fixture: 'searchFixutre.json', delay: 500}).as('api');

Al azar, cuando esta ruta se llama varias veces rápidamente, Cypress no intercepta la solicitud y se envía directamente al servidor API.

Tenga en cuenta que este problema no ocurre cuando elimino la propiedad "retraso"

 cy.intercept('GET', '**/api/search?searchValue=**', {fixture: 'searchFixutre.json'}).as('api');
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!