cypress
cypress copied to clipboard
fix: cypress hang caused in run mode when test:before:run handler throws
- 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
?
Thanks for taking the time to open a PR!
- Create a Draft Pull Request if your PR is not ready for review. Mark the PR as Ready for Review when you're ready for a Cypress team member to review the PR.
- Become familiar with the Code Review Checklist for guidelines on coding standards and what needs to be done before a PR can be merged.
Test summary
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 ![]() |
2 ![]() |
|
---|---|---|---|
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 ![]() |
1 ![]() |
|
1 | Working with next-12.1.6 > should detect new spec |
![]() |
|
![]() |
e2e/origin/commands/assertions.cy.ts ![]() |
1 ![]() |
|
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