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

Changing the baseUrl value in cypress.config.js will not take effect until restarting cypress #22056

Closed
Ibrahim-Krasniqi opened this issue Jun 2, 2022 · 4 comments · Fixed by #22154
Assignees
Labels
type: bug v10.0.0 🐛 Issue present since 10.0.0

Comments

@Ibrahim-Krasniqi
Copy link

Ibrahim-Krasniqi commented Jun 2, 2022

Current behavior

when changing the value of baseUrl in cypress.config.js both the cypress window as well as the cypress controlled instance of the browser reload giving the impression that the changes to configuration are taking effect, this is not the case however

Note: I did not test all values that can be altered in cypress.config.js however at least with viewportWidth and viewportHeight, altering them and saving does not require a restart of cypress for them to take effect.

Desired behavior

No response

Test code to reproduce

create cypress.config.js with the following code:

const { defineConfig } = require('cypress')

module.exports = defineConfig({

  e2e: {
    baseUrl: 'https://www.google.com/'
  }
})

cypress open in terminal
change the contents of cypress.config.js to the following while cypress is running:

const { defineConfig } = require('cypress')

module.exports = defineConfig({

  e2e: {
    baseUrl: 'https://www.cypress.io/'
  }
})

you will notice that even though the page reloads the test still go to the first url

Cypress Version

v10.0.1

Other

No response

@jennifer-shehane jennifer-shehane added the v10.0.0 🐛 Issue present since 10.0.0 label Jun 2, 2022
@jennifer-shehane
Copy link
Member

@Ibrahim-Krasniqi Thanks for reporting, we'll investigate this. This is not the desired behavior.

@jennifer-shehane
Copy link
Member

Confirmed this does not update the baseUrl when changing in the config without a restart.

Gsgzu8pUKk

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 10, 2022

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

@cypress-bot cypress-bot bot removed the stage: needs review The PR code is done & tested, needs review label Jun 10, 2022
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 10, 2022

Released in 10.1.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jun 10, 2022
@mjhenkes mjhenkes removed the PATCH label Jun 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug v10.0.0 🐛 Issue present since 10.0.0
Projects
None yet
5 participants