cypress icon indicating copy to clipboard operation
cypress copied to clipboard

fix: cypress hang caused in run mode when test:before:run handler throws

Open emilyrohrbough opened this issue 1 year ago • 2 comments

  • Closes #23039

When in runMode, and a test fails, we will generate the before & after snapshots. We are relying on the reporter's UI to update to indicate when the before snapshot has been taken. Because before:test:run has yet to start the runnable, no logs have been updated and the reporter UI is essentially static and won't be updated, which means the snapshot callback was never executed, which caused the hang.

User facing changelog

Fixed an edge-case bug where Cypress would hang in run-mode if an error was through from a test:before:run event handler. Fixed #23039.

PR Tasks

  • [x] Have tests been added/updated?
  • [x] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • [n/a Has a PR for user-facing changes been opened in cypress-documentation?
  • [n/a] Have API changes been updated in the type definitions?

emilyrohrbough avatar Aug 09 '22 21:08 emilyrohrbough

Thanks for taking the time to open a PR!

cypress-bot[bot] avatar Aug 09 '22 21:08 cypress-bot[bot]



Test summary

37846 0 469 0Flakiness 4


Run details

Project cypress
Status Passed
Commit 32eebd2445
Started Aug 10, 2022 7:24 PM
Ended Aug 10, 2022 7:44 PM
Duration 20:11 💡
OS Linux Debian - 11.3
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/proxy-logging.cy.ts Flakiness
1 Proxy Logging > request logging > xhr log has response body/status code when xhr response is logged second
2 Proxy Logging > request logging > xhr log has response body/status code when xhr response is logged second
next.cy.ts Flakiness
1 Working with next-12.1.6 > should detect new spec
e2e/origin/commands/assertions.cy.ts Flakiness
1 cy.origin assertions > #consoleProps > .should() and .and()

This 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

cypress[bot] avatar Aug 09 '22 22:08 cypress[bot]