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: update firefox to close extra windows between specs #29475

Merged
merged 3 commits into from May 6, 2024

Conversation

mschile
Copy link
Contributor

@mschile mschile commented May 6, 2024

Additional details

In firefox, if window.open is used to open a new window, we do not close the extra window between specs which can lead to issues in subsequent specs such as performance issues in service workers.

window.open('/fixtures/blocking_beforeunload_event.html')
  • Updated background.js to close the extra windows between specs
  • Renamed resetBrowserTabsForNextTest to resetBrowserTabsForNextSpec

Steps to test

Run a test that opens a new window in firefox and verify it gets closed between specs.

How has the user experience changed?

Before:
Screenshot 2024-05-06 at 11 42 36 AM

After:
Screenshot 2024-05-06 at 11 40 24 AM

PR Tasks

@@ -136,8 +136,8 @@ const connect = function (host, path, extraOpts) {
return invoke('takeScreenshot', id)
case 'reset:browser:state':
return invoke('resetBrowserState', id)
case 'reset:browser:tabs:for:next:test':
return invoke('resetBrowserTabsForNextTest', id)
case 'reset:browser:tabs:for:next:spec':
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for fixing my bad naming.

Copy link

cypress bot commented May 6, 2024

10 flaky tests on run #55322 ↗︎

0 29193 1328 0 Flakiness 10

Details:

updating changelog
Project: cypress Commit: 1fc1357a93
Status: Passed Duration: 20:02 💡
Started: May 6, 2024 5:57 PM Ended: May 6, 2024 6:17 PM
Flakiness  project-setup.cy.ts • 2 flaky tests • launchpad-e2e

View Output

Test Artifacts
... > skips the setup page when choosing e2e tests to run Test Replay Screenshots
Launchpad: Setup Project > openLink > opens docs link in the default browser Test Replay Screenshots
Flakiness  runner/sessions.ui.cy.ts • 1 flaky test • app-e2e

View Output

Test Artifacts
runner/cypress sessions.ui.spec > creates, not recreates, session when validation fails then succeeds Test Replay Screenshots
Flakiness  commands/waiting.cy.js • 1 flaky test • 5x-driver-chrome:beta

View Output

Test Artifacts
... > errors > throws when waiting for 2nd response to route Test Replay
Flakiness  e2e/origin/commands/waiting.cy.ts • 1 flaky test • 5x-driver-chrome:beta

View Output

Test Artifacts
... > throws when foo cannot resolve Test Replay
Flakiness  commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-chrome

View Output

Test Artifacts
... > stops waiting when an fetch request is canceled Test Replay

The first 5 flaky specs are shown, see all 7 specs in Cypress Cloud.

Review all test suite changes for PR #29475 ↗︎

@mschile mschile merged commit 555a924 into develop May 6, 2024
80 of 82 checks passed
@mschile mschile deleted the mschile/firefox_close_window branch May 6, 2024 18:33
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 8, 2024

Released in 13.9.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 8, 2024
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.

Flaky internal service-worker test on Firefox browser
3 participants