-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
v6.0 Release #3111
Changes from 21 commits
cb1a1a5
bd3277a
bf114b3
af7da38
1e466a2
9762363
5b138e7
95e9eae
d89e680
ab9102e
41d0a42
e4f5c12
7b84697
7f9148d
497124b
75a10d9
4c82237
ae0f076
cd3be8f
ef99542
58156d0
06767aa
70f5fcd
72f6c8b
9b666e9
ea6df73
5dd34d2
ab608ba
aad7206
f3d14fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# 6.0.0 | ||
|
||
*Released 11/23/2020* | ||
|
||
**Summary:** | ||
|
||
|
||
|
||
**Breaking Changes:** | ||
|
||
**{% fa fa-exclamation-triangle red %} Please read our {% url "Migration Guide" migration-guide %} which explains the changes in more detail and how to change your code to migrate to Cypress 6.0.** | ||
|
||
- Cypress now always throws an error when asserting on an element that doesn't exist in the DOM (unless you're asserting that the element should `not.exist`). Assertions such as `not.visible`, `not.contains`, `not.have.class`, etc will now fail when used on non-existent DOM elements. Addresses {% issue 205 %}. | ||
- DOM elements where the CSS style (or ancestors) are `opacity: 0` are no longer considered visible. However these are still considered {% url "actionable" interacting-with-elements %} and {% url "any action commands" interacting-with-elements#Actionability %} used to interact with the element will perform the action. This matches browser's implementation on how they regard elements with `opacity: 0`. Addresses {% issue 4474 %}. | ||
- The `experimentalNetworkStubbing` option has been removed and made the default behavior. You can safely removed this configuration option. Addressed in {% issue 9185 %}. | ||
- We removed several deprecation errors around APIs that were removed in versions of Cypress prior to 4.0.0. This will not cause any changes for anyone upgrading from a 4.0+ version of Cypress. For a full list of all APIs affected see {% issue 8946 %}. | ||
- We updated our HTTP status codes and reason phrases to match Node.js `http.STATUS_CODES`. If you have code that relies on a reason phrase, then this could affect you. Addressed in {% issue 8969 %}. | ||
- When using {% url "`.type()`" type %} and {% url "`.click()`" click %} on elements inside a `contenteditable` element, the events are now properly triggered on the inside elements. This may cause unintended consequences if you were relying on the previous behavior. Addressed in {% issue 9066 %}. | ||
|
||
**Deprecations:** | ||
|
||
Deprecations still work as before but will be removed from Cypress in a future release. We encourage you to update your code now to remove uses of deprecations. | ||
|
||
- `cy.server()` and `cy.route()` have been deprecated. In a future release, support for `cy.server()` and `cy.route()` will be moved to a plugin. We encourage you to use {% url "`cy.http()`" http %} instead. Addressed in {% issue 9185 %}. | ||
- `experimentalFetchPolyfill` has been deprecated. We encourage you to use {% url "`cy.http()`" http %} to intercept requests using the Fetch API instead. | ||
- `cy.route2()` was renamed to {% url "`cy.http()`" http %}. We encourage you to update usages of `cy.route2()` to use {% url "`cy.http()`" http %}. Addressed in {% issue 9182 %}. | ||
|
||
**Features:** | ||
|
||
- The new {% url "`cy.http()`" http %} command can be used to manage the behavior of HTTP requests at the network layer. Addressed in {% issue 9182 %}. | ||
- We now pass `—disable-dev-shm-usage` to the Chrome browser flags by default. This will write shared memory files into `/tmp` instead of `/dev/shm`. If you're passing this flag in your `plugins` file, you can now remove this code. Addresses {% issue 5336 %}. | ||
- A warning is now displayed when passing invalid configuration keys through the CLI. Addresses {% issue 428 %}. | ||
- The `cypress version` command now also displays the current Electron and bundled Node versions. Addresses {% issue 9180 %}. | ||
- Cypress Doesn't Finish Typing Strings Before Continuing to Next Field https://github.com/cypress-io/cypress/issues/5480 | ||
|
||
**Bugfixes:** | ||
|
||
- We fixed a regression introduced in {% url "3.5.0" changelog#3-5-0 %} that would cause {% url "`.type`" type %} to not type the entire string when focus was called away from the target element. Fixes {% issue 9254 %}. | ||
- {% url "`.type()`" type %} and {% url "`.click()`" click %} now properly work on elements inside a `contenteditable` element. Fixes {% issue 2717 %} and {% issue 7721 %}. | ||
- We fixed a regression introduced in {% url "5.6.0" changelog#5-6-0 %} that would cause the Test Runner to crashes and display a white page when switching tabs while tests are running. Fixes {% issue 9151 %}. | ||
|
||
**Documentation Changes:** | ||
|
||
- Our {% url "Migration Guide" migration-guide %} has a new section for 6.0 migration. | ||
- Many of our docs examples have been updated to use {% url "`cy.http()`" http %} in place of `cy.route()` including our {% url "Network Requests" network-requests %} doc. | ||
|
||
**Misc:** | ||
|
||
**Dependency Updates** | ||
|
||
- Upgraded Chrome browser version used during `cypress run` and when selecting Electron browser in `cypress open` from `85` to `87`. Addressed in {% PR 9222 %}. | ||
- Upgraded bundled Node.js version from `12.16.3` to `12.18.3`. Addressed in {% PR 9222 %}. | ||
- Upgraded `electron` from `10.1.5` to `11.0.2`. Addressed in {% PR 9222 %}. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{% note danger %} | ||
🚨 Please be aware that Cypress only currently supports intercepting XMLHttpRequests. **Requests using the Fetch API and other types of network requests like page loads and `<script>` tags will not be intercepted or visible in the Command Log.** You can automatically polyfill `window.fetch` to spy on and stub requests by enabling an [experimental](https://on.cypress.io/experimental) feature `experimentalFetchPolyfill`. See {% issue 95 %} for more details and temporary workarounds. | ||
{% note warning %} | ||
⚠️ `cy.route()` and `cy.server()` only support intercepting XMLHttpRequests. Requests using the Fetch API and other types of network requests like page loads and `<script>` tags will not be intercepted by `cy.route()` and `cy.server()`. | ||
|
||
Cypress also has a new experimental [route2](/api/commands/route2.html) feature that supports requests using the Fetch API and other types of network requests like page loads. For more information, check out the [cy.route2() documentation](/api/commands/route2.html).{% endnote %} | ||
**To support requests using the Fetch API you can use one of the solutions below:** | ||
|
||
- 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 %} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see comment above. not worth calling out There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
{% endnote %} |
There was a problem hiding this comment.
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 theexperimentalFetchPolyfill
and explain thatcy.http()
can now achieve this directly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yah, I agree