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

feat(net-stubbing): automatically parse JSON req/res bodies #9280

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

flotwig
Copy link
Contributor

@flotwig flotwig commented Nov 23, 2020

  • Closes

User facing changelog

  • Breaking Change: Valid JSON request and response bodies will now automatically be parsed in cy.http interceptor functions.

Additional details

How has the user experience changed?

PR Tasks

@flotwig flotwig added the type: breaking change Requires a new major release version label Nov 23, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 23, 2020

Thanks for taking the time to open a PR!

@jennifer-shehane
Copy link
Member

@flotwig The kitchensink needs updating for this

@flotwig
Copy link
Contributor Author

flotwig commented Nov 23, 2020

@jennifer-shehane PR is linked in the issue comment 😎 😎

flotwig added a commit to cypress-io/cypress-documentation that referenced this pull request Nov 23, 2020
@cypress
Copy link

cypress bot commented Nov 23, 2020



Test summary

8740 0 118 3Flakiness 1


Run details

Project cypress
Status Passed
Commit 1d9266f
Started Nov 23, 2020 3:41 PM
Ended Nov 23, 2020 3:53 PM
Duration 11:30 💡
OS Linux Debian - 10.5
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/retries.ui.spec.js Flakiness
1 runner/cypress retries.ui.spec > opens attempt on each attempt failure for the screenshot, and closes after test passes

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

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

Ok, I can see why there was some hesitation on this. I'm anticipating more situations where people would provide 'invalid' JSON, with them expecting it to just work. We've had issues in the past with people putting null, Numbers, and Booleans, etc into fixture json files and expecting that to be supported.

But...this would definitely be in the minority, since these other issues affected a small number of people and I think this PR will be more beneficial for most users.

@flotwig flotwig merged commit 6ee7a9c into develop Nov 23, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 24, 2020

Released in 6.0.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v6.0.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Nov 24, 2020
@flotwig flotwig deleted the cy-http-auto-json-parse branch January 24, 2022 18:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: breaking change Requires a new major release version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants