Skip to content

Page load timeout will not fail the test if page is in redirection loop #14445

@henrikauppinen

Description

@henrikauppinen

Current behavior

Page load timeout will not stop the test if page is in redirection loop. The test may run forever. No log output is generated indicating what is happening.

Video: https://github.com/henrikauppinen/cypress-redirect-loop/blob/main/cypress/videos/redirect-loop.spec.js.mp4

The problem is obvious when looking at the UI but when this happens in headless mode in CI it may be extremely difficult to detect as the outcome may be just a long-running cypress process killed by CI.

We had a situation where tests completed successfully locally in headed mode and failed in CI. There was an oversight in test mocks and the application under test behaved differently in CI with drastically different performance constraints.

Desired behavior

Page load timeout should trigger and stop the test even when page redirects continuously.

Test code to reproduce

https://github.com/henrikauppinen/cypress-redirect-loop

Versions

Confirmed with 5.4 until most recent 6.2.1 version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions