Skip to content

Allow cy.wait command to accept "requestTimeout" and "responseTimeout" option. #2446

@prodrammer

Description

@prodrammer

Current behavior:

The cy.wait command does not respect the "requestTimeout" option. The following command will still timeout waiting for a request to begin after 5000ms:

cy.wait('@completeUpload', {requestTimeout: 20000})

Desired behavior:

The following command should wait up to 20000ms for a request to start before timing out.

cy.wait('@completeUpload', {requestTimeout: 20000})

Steps to reproduce:

cy.wait('@completeUpload', {requestTimeout: 20000})

Versions

Cypress: 3.1.0
OS: macOS 10.13.6
Browser: Chrome 68

Workaround

Setting timeout, as the documentation states, appears to set both requestTimeout and responseTimeout.

cy.wait('@completeUpload', {timeout: 20000})

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementRequested enhancement of existing feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions