There can be many potential causes for flaky Cypress tests and this can be a cause of frustration when it comes to testing. I recently upgraded a project to Cypress 10 and discovered one of the causes for flakiness was due to assertions running prematurely before network requests had completed. I assumed Cypress automagically handled waiting for requests to finish but that's not the case. So let's take a look at how to wait for network requests to finish before your assertions are run.
Flaky Cypress Tests and Network Requests
· 3 min read