Cypress · Senior · Question 61 of 76
How do you test long-running background jobs triggered from the UI?
- 1Poll the status via
cy.requestor UI with a timeout - 2Wait a fixed ten minutes before asserting anything
- 3Background jobs can't be tested end to end
Show the answer
Correct answer: Poll the status via cy.request or UI with a timeout
Explanation
Retrying assertions or a polling task wait just long enough and fail clearly if the job never finishes.