Skip to content

Latest commit

 

History

History

server-communication__wait-for-api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Wait for API

Sometimes the backend API is not immediately ready and our test needs to wait. This recipe shows how to avoid hard-coded waits, and instead ping the API periodically using cy.request. When we finally get the successful response, we know the API is ready and proceed with the rest of the test.

Tests

The recipe shows how to implement the network calls with retries via recursion or via cypress-recurse