Hi awesome gurus, i would like to do cy.request wi...
# help
s
Hi awesome gurus, i would like to do cy.request with retries until it expects s certain state (e.g. body.data.status = ‘COMPLETE’). I tried something similar to the answer here but it didnt work (error is mixing async and sync code): https://stackoverflow.com/questions/54079106/cypress-request-with-retry … attached is my line of codes. pls help!
b
It looks like you'll need a recurse to continuously make the api request until
COMPLETE
. Cypress-recurse is a nice plugin with configs to retry. https://github.com/bahmutov/cypress-recurse
f
This one is pretty popular too https://github.com/NoriSte/cypress-wait-until
3 Views