From 3913aa205e18731981963d5575d16691aaf74bcf Mon Sep 17 00:00:00 2001 From: Cecelia Martinez Date: Fri, 20 Mar 2020 19:28:57 -0400 Subject: [PATCH] adds explanation of timeout behavior when passing an array of aliases. Resolves issue #2573 --- source/api/commands/wait.md | 6 ++++++ 1 file changed, 6 insertions(+) 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 %}