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

v6.0 Release #3111

Merged
merged 30 commits into from
Nov 24, 2020
Merged

v6.0 Release #3111

merged 30 commits into from
Nov 24, 2020

Conversation

jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented Aug 28, 2020

For cypress-io/cypress#8437 - 6.0 features in develop also

Targeted release date: Nov 23, 2020

@jennifer-shehane jennifer-shehane marked this pull request as draft August 28, 2020 08:52
@jennifer-shehane jennifer-shehane changed the title 6.0 Release v6.0 Release Nov 16, 2020
Comment on lines 6 to 8
- Use [`cy.http()`](/api/commands/http.html) which supports requests using the Fetch API and other types of network requests like page loads. See [`cy.http()`](/api/commands/http.html).
- Polyfill `window.fetch` to spy on and stub requests using `cy.route()` and `cy.server()` by enabling [`experimentalFetchPolyfill`](https://on.cypress.io/experimental). See {% issue 95 %} for more details and temporary workarounds.
{% endnote %}
Copy link
Member

Choose a reason for hiding this comment

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

With cy.http() becoming official, I believe these deprecation methods need to be more prominent. It seems odd to list multiple "workarounds" when there is an officially supported version. I suggest removing the experimentalFetchPolyfill and explain that cy.http() can now achieve this directly.

Copy link
Member Author

Choose a reason for hiding this comment

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

yah, I agree

@@ -0,0 +1,3 @@
{% note warning %}
⚠️ **`cy.server()` and `cy.route()` are deprecated in Cypress 6.0.0**. In a future release, support for `cy.server()` and `cy.route()` will be moved to a plugin. Consider using [`cy.http()`](/api/commands/http.html) instead.
Copy link
Member

Choose a reason for hiding this comment

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

see comment above. not worth calling out cy.route() as a plugin... just straight up suggest using cy.http()

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure I agree - unless we are very unsure about future support in a plugin.. The idea of us removing support forever may be intimidating to some users

@jennifer-shehane jennifer-shehane marked this pull request as ready for review November 23, 2020 17:08
cy.fixture('comment.json').should('deep.eq', xhr.responseBody)
cy.wait('@postComment').then(({ response }) => {
cy.exec(`echo ${JSON.stringify(response.body)} >cypress/fixtures/comment.json`)
cy.fixture('comment.json').should('deep.eq', response.body)
Copy link
Member Author

Choose a reason for hiding this comment

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

Example doesn't work. See #3323 (comment)

{ id: 1, comment: 'hi' },
{ id: 2, comment: 'there' }
])
Copy link
Member Author

Choose a reason for hiding this comment

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

Example doesn't work. See #3323 (comment)

cy.wait('@getUser').then((xhr) => {
expect(xhr.requestBody.firstName).to.eq('Jane')
cy.wait('@getUser').then(({ request }) => {
expect(request.body.firstName).to.eq('Jane')
Copy link
Member Author

Choose a reason for hiding this comment

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

Example doesn't work. See #3323 (comment)


cy.get('form').submit()

cy.wait('@postUser').its('requestBody').should('have.property', 'name', 'Brian')
cy.wait('@postUser').then(({ request }) => {
expect(JSON.parse(request.body)).to.have.property('name', 'Brian')
Copy link
Member Author

Choose a reason for hiding this comment

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

Exampled doesn't work. See #3323 (comment)

id: '101',
firstName: 'Joe',
lastName: 'Black'
})
Copy link
Member Author

Choose a reason for hiding this comment

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

Example doesn't work. See #3323 (comment)

// it is a good practice to add assertion messages
// as the 2nd argument to expect()
expect(xhr.response.headers, 'response headers').to.include({
expect(response.headers, 'response headers').to.include({
Copy link
Member Author

Choose a reason for hiding this comment

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

Example doesn't work. See #3323 (comment)

@flotwig flotwig merged commit a053670 into develop Nov 24, 2020
@matthamil matthamil deleted the 6.0.0-release branch April 14, 2021 20:08
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.

6 participants