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

fix: use open instead of connectToNewSpec in electron #27128

Merged
merged 8 commits into from
Jun 27, 2023

Conversation

mschile
Copy link
Contributor

@mschile mschile commented Jun 23, 2023

Additional details

Electron doesn't support multiple tabs/windows so calling connectToNewSpec in electron doesn't make sense. This change will call open instead which will ensure all the shutdown and startup logic associated with launching a new electron window is properly handled.

Steps to test

How has the user experience changed?

Potentially shutdown and startup issues are now properly handled.

PR Tasks

@cypress
Copy link

cypress bot commented Jun 23, 2023

5 flaky tests on run #48267 ↗︎

0 672 32 0 Flakiness 5

Details:

Merge branch 'develop' into mschile/issue-26900_browserCriClient
Project: cypress Commit: 766d40c474
Status: Passed Duration: 18:15 💡
Started: Jun 26, 2023 11:15 PM Ended: Jun 26, 2023 11:33 PM
Flakiness  cypress\e2e\create-from-component.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
... > Shows create from component card for React projects Output Screenshots Video
Flakiness  cypress\e2e\specs.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
... > shows No Specs page with specPattern from config Output Screenshots Video
Flakiness  cypress\e2e\cypress-in-cypress-component.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
Cypress In Cypress CT > default config > redirects to the specs list with error if a spec is not found Output Screenshots Video
Flakiness  cypress\e2e\cypress-origin-communicator.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
Cypress In Cypress Origin Communicator > cy.origin passivity with app interactions > passes upon test reload mid test execution Output Screenshots Video
Flakiness  cypress\e2e\scaffold-project.cy.ts • 1 flaky test • launchpad-e2e

View Output Video

Test Artifacts
scaffolding new projects > scaffolds E2E for a JS project Output Screenshots Video

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

if (options.shouldLaunchNewTab) {
// if we should launch a new tab and we are not running in electron (which does not support connecting to a new spec)
// then we can connect to the new spec
if (options.shouldLaunchNewTab && browser.name !== 'electron') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might need to check and some tests with #27116 or this (whatever goes in first) to make sure the behavior is expected, but I think the behavior should play nicely together.

@ryanthemanuel ryanthemanuel merged commit a94a48e into develop Jun 27, 2023
5 of 7 checks passed
@ryanthemanuel ryanthemanuel deleted the mschile/issue-26900_browserCriClient branch June 27, 2023 14:07
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 6, 2023

Released in 12.17.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jul 6, 2023
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 this pull request may close these issues.

Cypress crash with "There was an error reconnecting to the Chrome DevTools protocol"
4 participants