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

204
Views
cy.intercept randomly not work when "delay" is set

I use cy.intercept to mock an api.

But I can't understand why the requests are not always intercepted by cy.intercept. The failure is random.

Here is my intercept function

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

Randomly, when this route is called several times quickly, Cypress does not intercept the request and it is sent directly to the api server.

Note that this problem does not occur when I delete the "delay" property

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!