Controlling the Clock

Let's learn how to control the clock in the Cypress.

We'll cover the following

Sometimes we have to test something that relies on time intervals or timeouts. This typeof wait can slow down our test suite which is not ideal. While testing timeouts, remember that Cypress allows you to control the clock. For example, we might want to show the user a particular message if the registration AJAX requests take more than two seconds. Take a look at the next test.

Test

Note: You can see the Cypress UI better by opening the link next to Your app can be found at:

Get hands-on with 1400+ tech skills courses.