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(driver): cy.pause() should not be ignored with cypress run --headed --no-exit #18358

Merged
merged 17 commits into from
Oct 8, 2021

Conversation

davidmunechika
Copy link
Contributor

@davidmunechika davidmunechika commented Oct 5, 2021

User facing changelog

Users will be able to use cy.pause() and observe that a test paused when using cypress run --headed --no-exit.

Additional details

Previous behavior: cy.pause() was ignored when using cypress run even if --headed and --no-exit flags were passed.

New behavior: cy.pause() works as expected (i.e. the same as with cypress open) when --headed and --no-exit flags are passed to cypress run.

PR Tasks

  • Have tests been added/updated?
  • Has the original issue or this PR been tagged with a release in ZenHub?
  • [n/a] 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? --> N/A

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 5, 2021

Thanks for taking the time to open a PR!

@davidmunechika davidmunechika self-assigned this Oct 5, 2021
@cypress
Copy link

cypress bot commented Oct 5, 2021



Test summary

4205 0 50 2Flakiness 0


Run details

Project cypress
Status Passed
Commit ccc845d
Started Oct 8, 2021 8:23 PM
Ended Oct 8, 2021 8:33 PM
Duration 09:36 💡
OS Linux Debian - 10.9
Browser Chrome 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

@davidmunechika davidmunechika marked this pull request as ready for review October 6, 2021 13:43
@davidmunechika davidmunechika requested a review from a team as a code owner October 6, 2021 13:43
@davidmunechika davidmunechika requested review from flotwig and BlueWinds and removed request for a team October 6, 2021 13:43
Copy link
Contributor

@flotwig flotwig left a comment

Choose a reason for hiding this comment

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

Yeowch, this is a hard PR to test all the way...

Since you are not creating a full e2e test for this fix, only an integration test that uses mocks, i think it would probably be prudent to update a unit/integration test somewhere that also checks that exit is being passed to the runner controller, along with isHeadless, etc. Surely such a test exists already and can be updated to add exit.

Past that small testing concern, this looks great!

@flotwig flotwig merged commit 1d08280 into develop Oct 8, 2021
@davidmunechika davidmunechika deleted the issue-4044-pause-ignored-headed branch October 8, 2021 22:05
tgriesser added a commit that referenced this pull request Oct 13, 2021
…ramework

* unified-desktop-gui:
  fix conflicts
  fix conflicts
  feat: create a copy when selecting a pre-existing story (#18440)
  feat: add configured state to TestingTypeCard (#18461)
  feat(app): run e2e tests (#18448)
  fix: frontend-shared typo on windi config
  feat: make the select language component (#18443)
  chore: Update Chrome (stable) to 94.0.4606.81 (#18411)
  release 8.6.0
  fix: do not attempt to trim objects when printing to console (#18341)
  fix(driver): `cy.pause()` should not be ignored with `cypress run --headed --no-exit` (#18358)
  chore: release @cypress/vite-dev-server-v2.1.1
  chore: release @cypress/react-v5.10.1
@totomaze
Copy link

totomaze commented Mar 22, 2022

Is this PR is 9.5.2 ?
I can't get it to pause when doing a cypress run --headed --no-exit

I downgraded to 8.6.0 and it worked but with the 9.5.2 it is not. Is it a regression ?

@BlueWinds
Copy link
Contributor

@totomaze - This was released in 9.6.0, and is not in 9.5.2. #4044 (comment)

@totomaze
Copy link

The last version where it s working is 9.1.1, after this version using --headed --no-exit no longer pause during a test run.

I believe it s caused by this update in 9.2.0:
Cypress will throw an error when a user attempts to update a configuration
value at run-time using either the Test Configuration or using
Cypress.config() that is a
readonly option.
Addresses #6407 and
#19001.

Is there any workaround to get the test to pause when running it by cypress run ?

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.

pause() should not be ignored with cypress run --headed --no-exit
4 participants