-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: restart Cypress server and browser on baseUrl change #22154
fix: restart Cypress server and browser on baseUrl change #22154
Conversation
Thanks for taking the time to open a PR!
|
@@ -190,7 +190,7 @@ describe('Choose a Browser Page', () => { | |||
cy.get('h1').should('contain', 'Choose a Browser') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are for unrelated flake.
Test summaryRun details
View run in Cypress Dashboard ➡️ FlakinessThis comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice - changes look pretty straightforward to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as advertised 👍
…#22154) * fix: restart server on baseUrl change * Rework how baseUrl works * Refactor how we determine if we should ping the base url * Fix test * Update packages/launchpad/cypress/e2e/choose-a-browser.cy.ts * Update packages/launchpad/cypress/e2e/choose-a-browser.cy.ts Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
User facing changelog
The
baseUrl
config option will now restart the Cypress server automatically when it is updated in a Cypress config file.Additional details
There are several things that use the baseUrl during the server's initialization like the browser and xhr urls and remote states. In order to properly ensure they are reinitialized appropriately, we will need to restart the server. Thus, we change
baseUrl
'srequireRestartOnChange
property toserver
.Steps to test
cypress open
a project with abaseUrl
baseUrl
in cypress.config.jsbaseUrl
How has the user experience changed?
Before
baseUrl.-.Before.mov
After
baseUrl.-.After.mov
PR Tasks
cypress-documentation
?type definitions
?