Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
henrikauppinen opened this issue Jan 7, 2021 · 4 comments · Fixed by #14643
Closed

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

henrikauppinen opened this issue Jan 7, 2021 · 4 comments · Fixed by #14643

Comments

@henrikauppinen
Copy link

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.

@jennifer-shehane
Copy link
Member

Yah that's a good one. I'm not sure that it's the pageLoadTimeout so much as the commands attempting to find the DOM elements that should timeout. The cy.get('div') should fail regardless of the redirects.

@cypress-bot cypress-bot bot added the stage: ready for work The issue is reproducible and in scope label Jan 8, 2021
@cypress-bot cypress-bot bot added stage: work in progress and removed stage: ready for work The issue is reproducible and in scope labels Jan 20, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 17, 2021

The code for this is done in cypress-io/cypress#14643, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@bahmutov
Copy link
Contributor

bahmutov commented Apr 7, 2021

Released in v7.0.0

@cypress-io cypress-io locked as resolved and limited conversation to collaborators Apr 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@henrikauppinen @jennifer-shehane @bahmutov and others