1×
Become a member
to unlock all features
Autoplay

    Wait for XHR Responses in a Cypress Test

    cypressCypress
    ^1.4.1

    When testing interactions that require asynchronous calls, we’ll need to wait on responses to make sure we’re asserting about the application state at the right time. With Cypress, we don’t have to use arbitrary time periods to wait. In this lesson, we’ll see how to use an alias for a network request and wait for it to complete without having to wait longer than required or guess at the duration.