Skip to content

Conversation

estrada9166
Copy link
Member

@estrada9166 estrada9166 commented Dec 9, 2021

User facing changelog

Fixed an issue where Chromium-family browsers would stay open after closing cypress open.

Additional details

  • If chrome is open, and electron is closed, the chrome process is not being killed
  • This was broken before because process.on('exit') handlers have to be synchronous, and this was async

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 Dec 9, 2021

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Dec 9, 2021



Test summary

18733 0 202 0Flakiness 3


Run details

Project cypress
Status Passed
Commit 9b2699b
Started Dec 9, 2021 6:51 PM
Ended Dec 9, 2021 7:03 PM
Duration 11:20 💡
OS Linux Debian - 10.10
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/commands/net_stubbing_spec.ts Flakiness
1 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"
2 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"
3 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"

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 requested a review from flotwig December 9, 2021 17:36
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.

@estrada9166 does this close an issue?

Also, could you add/update a test? I think all this needs to be tested is to update the existing test here to expect it to be synchronous:

it('calls cri client close on kill', function () {
// need a reference here since the stub will be monkey-patched
const {
kill,
} = this.launchedBrowser
return chrome.open('chrome', 'http://', {}, this.automation)
.then(() => {
expect(this.launchedBrowser.kill).to.be.a('function')
return this.launchedBrowser.kill()
}).then(() => {
expect(this.criClient.close).to.be.calledOnce
expect(kill).to.be.calledOnce
})
})

@estrada9166 estrada9166 requested a review from flotwig December 9, 2021 19:19
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.

Awesome

@flotwig flotwig requested a review from AtofStryker December 9, 2021 20:32
Copy link
Contributor

@AtofStryker AtofStryker left a comment

Choose a reason for hiding this comment

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

nice!

@flotwig flotwig merged commit f79bdd6 into develop Dec 9, 2021
@flotwig flotwig deleted the alejandro/fix/close-chrome-when-closing-electron branch December 9, 2021 21:12
tgriesser added a commit that referenced this pull request Dec 15, 2021
* develop:
  chore(deps): update dependency ssri to 6.0.2 [security] (#19351)
  chore: Fix server unit tests running on mac by using actual tmp dir (#19350)
  fix: Add more precise types to Cypress.Commands (#19003)
  fix: Do not screenshot or trigger the failed event when tests are skipped (#19331)
  fix (#19262)
  fix: throw when writing to 'read only' properties of `config` (#18896)
  fix: close chrome when closing electron (#19322)
  fix: disable automatic request retries (#19161)
  chore: refactor cy funcs (#19080)
  chore(deps): update dependency @ffmpeg-installer/ffmpeg to v1.1.0 🌟 (#19300)
tgriesser added a commit that referenced this pull request Dec 16, 2021
…cycle

* 10.0-release:
  build: remove syncRemoteGraphQL from codegen
  chore: fix incorrect type from merge
  build: allow work with local dashboard (#19376)
  chore: Test example recipes against chrome (#19362)
  test(unify): Settings e2e tests (#19324)
  chore(deps): update dependency ssri to 6.0.2 [security] (#19351)
  fix: spec from story generation, add deps for install (#19352)
  chore: Fix server unit tests running on mac by using actual tmp dir (#19350)
  fix: Add more precise types to Cypress.Commands (#19003)
  fix: Do not screenshot or trigger the failed event when tests are skipped (#19331)
  fix (#19262)
  fix: throw when writing to 'read only' properties of `config` (#18896)
  fix: close chrome when closing electron (#19322)
  fix: disable automatic request retries (#19161)
  chore: refactor cy funcs (#19080)
  chore(deps): update dependency @ffmpeg-installer/ffmpeg to v1.1.0 🌟 (#19300)
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