Skip to content

misc: rerun tests on unloadEvent instead of on beforeunload#33456

Open
mabela416 wants to merge 5 commits intodevelopfrom
mabel/issue-12584-unsaved-changes-on-refresh
Open

misc: rerun tests on unloadEvent instead of on beforeunload#33456
mabela416 wants to merge 5 commits intodevelopfrom
mabel/issue-12584-unsaved-changes-on-refresh

Conversation

@mabela416
Copy link
Contributor

@mabela416 mabela416 commented Mar 9, 2026

Additional details


Note

Medium Risk
Changes core runner lifecycle behavior for when tests are restarted and cookies/state are cleared, which could alter navigation/teardown timing across browsers.

Overview
Rerun/reset is now tied to real unload events. The runner (event-manager.ts) stops triggering test restarts/state cleanup on beforeunload and instead does so on pagehide for Chromium and unload for other browsers, avoiding reruns when a beforeunload confirmation is cancelled.

Updates the 15.12.0 changelog to document this behavior change under Misc.

Written by Cursor Bugbot for commit 14dd14d. This will update automatically on new commits. Configure here.

Steps to test

How has the user experience changed?

PR Tasks

@mabela416 mabela416 changed the title chore: rerun tests on unloadEvent instead of on beforeunload misc: rerun tests on unloadEvent instead of on beforeunload Mar 9, 2026
@cypress
Copy link

cypress bot commented Mar 9, 2026

cypress    Run #69299

Run Properties:  status check failed Failed #69299  •  git commit 14dd14dbf6: fix changelog
Project cypress
Branch Review mabel/issue-12584-unsaved-changes-on-refresh
Run status status check failed Failed #69299
Run duration 49m 05s
Commit git commit 14dd14dbf6: fix changelog
Committer Mabel Amaya
View all properties for this run ↗︎

Test results
Tests that failed  Failures 268
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 106
Tests that did not run due to a failure in a mocha hook  Skipped 20
Tests that passed  Passing 4304
View all changes introduced in this branch ↗︎

Warning

Partial Report: The results for the Application Quality reports may be incomplete.

UI Coverage  30%
  Untested elements 33  
  Tested elements 15  
Accessibility  99.32%
  Failed rules  0 critical   3 serious   0 moderate   0 minor
  Failed elements 13  

Tests for review

Failed  e2e/origin/cookie_login.cy.ts • 43 failed tests • 5x-driver-electron

View Output

Test Artifacts
cy.origin - cookie login > general behavior > handles browser-sent cookies being overridden by server-kept cookies Test Replay
cy.origin - cookie login > general behavior > cy.clearCookie() -> not logged in Test Replay
cy.origin - cookie login > general behavior > cy.clearCookies() -> not logged in Test Replay
cy.origin - cookie login > SameSite > no SameSite (defaults to Lax) -> logged in Test Replay
cy.origin - cookie login > SameSite > SameSite=Lax -> logged in Test Replay
cy.origin - cookie login > SameSite > SameSite=Strict -> not logged in Test Replay
cy.origin - cookie login > SameSite > SameSite=None -> not logged in Test Replay
cy.origin - cookie login > SameSite > invalid SameSite (defaults to Lax) -> logged in Test Replay
cy.origin - cookie login > Secure > Secure + https -> logged in Test Replay
cy.origin - cookie login > Secure > Secure + http -> not logged in Test Replay
The first 10 failed tests are shown, see all 43 tests in Cypress Cloud.
Failed  memory/memory.cy.js • 0 failed tests • 5x-driver-electron

View Output

Test Artifacts
Failed  commands/actions/click.cy.ts • 0 failed tests • 5x-driver-electron

View Output

Test Artifacts
Failed  commands/actions/type_special_chars.cy.ts • 0 failed tests • 5x-driver-electron

View Output

Test Artifacts
Failed  memory/dom-stress-test.cy.js • 0 failed tests • 5x-driver-electron

View Output

Test Artifacts

The first 5 failed specs are shown, see all 1165 specs in Cypress Cloud.

Flakiness  cypress/e2e/commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-firefox

View Output

Test Artifacts
... > stops waiting when an xhr request is canceled
    </td>
  </tr></table>

…nsaved-changes-on-refresh' into mabel/issue-12584-unsaved-changes-on-refresh
@mabela416 mabela416 self-assigned this Mar 9, 2026
@mabela416 mabela416 requested review from astone123 and mschile March 9, 2026 20:46
@mschile mschile requested a review from cacieprins March 9, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant