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: stop running spec when switching specs #21038

Merged

Conversation

estrada9166
Copy link
Member

@estrada9166 estrada9166 commented Apr 12, 2022

User facing changelog

Additional details

When there was a spec running and the user changed the spec, the running spec timed out, affecting the state of the new spec, showing the timed out result in the new fresh spec which does not have any failure

image

Update error message when the test was stopped while running
image

How has the user experience changed?

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?
  • Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 12, 2022

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Apr 12, 2022



Test summary

4336 0 48 0Flakiness 0


Run details

Project cypress
Status Passed
Commit d030acd
Started Apr 14, 2022 12:08 AM
Ended Apr 14, 2022 12:22 AM
Duration 13:46 💡
OS Linux Debian - 10.10
Browser Electron 94

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

@estrada9166 estrada9166 marked this pull request as ready for review April 12, 2022 17:22
@estrada9166 estrada9166 requested review from a team as code owners April 12, 2022 17:22
@estrada9166 estrada9166 requested review from jennifer-shehane and removed request for a team April 12, 2022 17:22
@jennifer-shehane jennifer-shehane removed their request for review April 12, 2022 17:23
@estrada9166 estrada9166 removed the request for review from a team April 12, 2022 17:34
@estrada9166 estrada9166 marked this pull request as draft April 12, 2022 18:34
@estrada9166 estrada9166 marked this pull request as ready for review April 12, 2022 19:41
Copy link
Contributor

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

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

When will this log be shown? If you navigate away, eg to another test, won't that one start running (and clear the command log?)

Guessing this was never a problem in 9.x since you could not really navigate away from a spec? But what about if you changed the url? I'm kind of surprised you had to patch this in the driver - it feels like something that should have been introduced in 10.x, but patching the driver suggests this same bug should be reproducible in 9.x, too 🤔

@estrada9166
Copy link
Member Author

@lmiller1990

When will this log be shown? If you navigate away, eg to another test, won't that one start running (and clear the command log?)

This is going to be only shown when you are running a test and stop it while running, if you change the spec it's not going to log anything as it should be

it feels like something that should have been introduced in 10.x, but patching the driver suggests this same bug should be reproducible in 9.x

This may be related to how we update the states when mounting and unmounting the components when you switch specs on v10 from the side nav, it do not unmount the component, so, there're significative changes related with how it was

Copy link
Member

@tgriesser tgriesser left a comment

Choose a reason for hiding this comment

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

LGTM

@lmiller1990
Copy link
Contributor

Let's ship it

@lmiller1990 lmiller1990 merged commit de17f44 into 10.0-release Apr 14, 2022
@lmiller1990 lmiller1990 deleted the alejandro/fix/emit-stop-while-switching-specs branch April 14, 2022 02:28
tgriesser added a commit that referenced this pull request Apr 14, 2022
* 10.0-release: (25 commits)
  fix: stop running spec when switching specs (#21038)
  fix: remove asset size warnings and enable nuxt e2e tests (#21074)
  feat: swap the #__cy_root id selector to become data-cy-root for component mounting (#20951)
  fix: Doc changes around vue2 (#21066)
  feat: Add vue2 package from npm/vue/v2 branch (#21026)
  skip failing test
  fix: add possible frameworks to object API config (#21056)
  fix snapshot spacing
  fix system test
  fix snapshot
  update snapshots
  rename spec files
  rename files
  update snapshots
  release 9.5.4 [skip ci]
  fix(regression): cy.pause() should not be ignored with `cypress run --headed --no-exit` (#20877)
  fix: add missing Cypress.Commands.addAll() types (#20894)
  chore: Don't store video and screenshot artifacts for runs (#20979)
  chore: Update Chrome (beta) to 101.0.4951.26 (#20957)
  chore: remove parallelism from test-binary-against-repo jobs (#21004)
  ...
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.

3 participants