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

201
Views
Two new urls but second one missing path variable in Cypress

Maybe a bit difficult to explain but I have the following issue. I have created a link and Cypress wants to click it, but it seems to click it twice. The second time the path variable is missing (the ID of an incident) and now it stores 'undefined' as incident ID, while the ID is '458868'

Does anyone why it calls this URL twice and why the second time the incident ID is missing in the URL?

The step definition is:

cy.get('.html-link').click({force:true});

Thanks!! enter image description here

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

It's unlikely the .click() is happening twice. More likely the 2nd call to /incidents is just part of the page load, same as call to /incidents before the click.

To check it out, put in a long wait before clicking, see if the order of logging changes.

"it stores 'undefined' as incident ID" - please clarify where it's being stored - on the server, or in the test via an intercept?

If you are using an intercept, it's matcher needs to be more specific.

about 4 years ago · Juan Pablo Isaza Report

0

I think i have solved the issue:

@Fody said to add a wait in the step.

cy.get('.html-link').wait(1000).click({force:true});

Although i'm not a fan of waits, in this case it seems to work. Thanks.

about 4 years ago · Juan Pablo Isaza Report
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!