Skip to content

Commit

Permalink
adds explanation of timeout behavior when passing an array of aliases…
Browse files Browse the repository at this point in the history
…. Resolves issue #2573
  • Loading branch information
CypressCecelia committed Mar 20, 2020
1 parent 57c298f commit 3913aa2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/api/commands/wait.md
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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 %}
Expand Down

0 comments on commit 3913aa2

Please sign in to comment.