diff --git a/source/api/commands/wait.md b/source/api/commands/wait.md index 791d008788..842bbd579b 100644 --- a/source/api/commands/wait.md +++ b/source/api/commands/wait.md @@ -136,6 +136,8 @@ cy.get('#book-results').should('have.length', 1) ### You can pass an array of aliases that will be waited on before resolving. +When passing an array of aliases to `cy.wait()`, Cypress will wait for all requests to complete within the given `requestTimeout` and `responseTimeout`. + ```javascript cy.server() cy.route('users/*').as('getUsers') @@ -209,6 +211,10 @@ This means Cypress will now wait up to 20 seconds for the external server to res This gives you the best of both worlds - a fast error feedback loop when requests never go out and a much longer duration for the actual external response. +### Using an Array of Aliases + +When passing an array of aliases to `cy.wait()`, Cypress will wait for all requests to complete within the given `requestTimeout` and `responseTimeout`. + # Rules ## Requirements {% helper_icon requirements %}