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: custom reporter and experimentalSessionAndOrigin crashes #24630

Merged
merged 14 commits into from Nov 10, 2022

Conversation

ryanthemanuel
Copy link
Collaborator

@ryanthemanuel ryanthemanuel commented Nov 9, 2022

User facing changelog

Cypress will no longer crash when using a third party reporter like mochawesome.

Cypress will no longer crash when using the experimentalSessionAndOrigin flag.

Cypress will now refresh and rerun CT tests when they are modified and saved.

Additional details

When cleaning up the binary due to the v8 snapshot work, there were a couple of dependencies that were removed that shouldn't have been.

In the case of third party mocha reporters, we do some swizzling at runtime with a hard coded version of mocha (mocha-7.0.1). In order to allow this to work properly, we need to leave mocha-7.0.1 in the binary.

In the case of the experimentalSessionAndOrigin flag, we have a dynamically loaded loader whose dependencies were not being flagged as something that shouldn't be removed. We will ensure that these dependencies are kept by wrapping this dependency in a require.resolve.

For the CT test issue, we needed to flag a dependency as norewrite manually.

Steps to test

Run the binary with a third party reporter like mochaawesome

Run the binary with experimentalSessionAndOrigin turned on

How has the user experience changed?

The app no longer crashes in the above scenarios.

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)
  • [na] Has a PR for user-facing changes been opened in cypress-documentation?
  • [na] Have API changes been updated in the type definitions?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 9, 2022

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Nov 9, 2022



Test summary

601 1 45 0Flakiness 6


Run details

Project cypress
Status Failed
Commit ad08d19
Started Nov 10, 2022 2:14 AM
Ended Nov 10, 2022 2:29 AM
Duration 15:41 💡
OS Windows 10.0.17763
Browser Chrome 107

View run in Cypress Dashboard ➡️


Failures

cypress\e2e\top-nav-launchpad.cy.ts Failed
1 ... > global mode > shows "continue" button after login if project selected

Flakiness

cypress\e2e\scaffold-component-testing.cy.ts Flakiness
1 scaffolding component testing > create-react-app > scaffolds component testing for Create React App v5 project
cypress\e2e\specs.cy.ts Flakiness
1 ... > shows create first spec page with scaffold and create empty spec options
cypress\e2e\runs.cy.ts Flakiness
1 App: Runs > no internet connection > shows correct message on connect project modal
cypress\e2e\create-from-component.cy.ts Flakiness
1 Create from component card > project with default spec pattern > runs generated spec
cypress\e2e\specs_list_latest_runs.cy.ts Flakiness
1 App/Cloud Integration - Latest runs and Average duration > when no runs are recorded > shows placeholders for all visible specs
This comment includes only the first 5 flaky tests. See all 6 flaky tests in the 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

@ryanthemanuel ryanthemanuel changed the title fix: improve binary cleanup to look at binary rather than monorepo fix: custom reporter and experimentalSessionAndOrigin crashes Nov 10, 2022
@ryanthemanuel ryanthemanuel merged commit e9e8cad into develop Nov 10, 2022
@ryanthemanuel ryanthemanuel deleted the ryanm/fix/improve-binary-cleanup branch November 10, 2022 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants