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

Cypress 9.1.0 freezes if baseUrl changes between tests #19105

Closed
Dospios opened this issue Nov 25, 2021 · 2 comments · Fixed by #19239
Closed

Cypress 9.1.0 freezes if baseUrl changes between tests #19105

Dospios opened this issue Nov 25, 2021 · 2 comments · Fixed by #19239

Comments

@Dospios
Copy link

Dospios commented Nov 25, 2021

Current behavior

In my tests, it is necessary to open an html file locally in one of the tests. It is impossible to do this with baseUrl, so for this test I reset baseUrl, but subsequent tests continue to use baseUrl, which is set globally in cypress.json. I saw such a solution here - #4450 (comment)
In cypress 9.0.0 and below, this method worked, but in 9.1.0, the execution of tests freezes if, after a test with base Url = null, a test is run in which baseUrl is set globally. At the same time, the test runner continues to work until it is stopped manually. There is an error in the console
image

www.cypress.io-1637826397522.log

Desired behavior

The execution of the tests continues correctly, just as it was in version 9.0.0.
And it is better to make it possible to visit local files with an existing baseUrl

Test code to reproduce

You can use any local html file for the test

it('Base url = null', { baseUrl: null }, () => {
  cy.visit('cypress/downloads/test.html')
})

it('Base url = https://www.cypress.io/', () => {
  cy.visit('/')
})

in cypress.json

"baseUrl": "https://www.cypress.io/"

Cypress Version

9.1.0

Other

No response

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 3, 2021

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

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 4, 2021

Released in 9.1.1.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v9.1.1, please open a new issue.

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

Successfully merging a pull request may close this issue.

1 participant