-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: transition eventManager errors #19835
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ 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 |
cc @lmiller1990 as this sounds related to work we did previously together regarding initialization and memoizing initialization of the runner code |
@@ -15,6 +15,7 @@ export function useUnifiedRunner () { | |||
|
|||
onBeforeUnmount(() => { | |||
UnifiedRunnerAPI.teardown() | |||
initialized.value = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, seems like a good place to do this
I wonder if we can add a basic test of sorts, eg - navigate to the runner, choose a spec, navigate away? IIRC that was breaking when we tried last week, and since this fixes that problem, we could also add a test for it (I think we have the infrastructure to facilitate this kind of test now)? |
Yes, we have the infra now. I wouldn’t have merged this PR without tests. Please add them. No PRs should be going in without tests. That’s just asking for regressions to trip us up later. |
Yes, just checked and with the new Cypress in Cypress, we can visit the spec, then go to Settings or Runs and go back to the Specs List and click in to see the spec again. Seems like there is a lot of great stuff we'll be able to do with this! I'll make a PR with the new tests shortly. |
Two small fixes:
initialized
ref when we unmount the runner component fixes that, because the container component usesv-if="initialized"
to decide when to render the runner itself, so if it stays true, we render too early on subsequent visits.