Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions source/_changelogs/4.9.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 4.9.0

*Released 6/23/2020*

**Features:**

- An animated progress bar now displays on every command in the {% url "Command Log" test-runner#Command-Log %} indicating how long the command has left to run before reaching its command timeout. Addresses {% issue 7642 %}.
- There is now an {% url "`experimentalFetchPolyfill`" experiments %} configuration option. When this option is `true`, Cypress will automatically replace `window.fetch` with a polyfill that Cypress can spy on and stub. Addresses {% issue 7710 %}.
- You can now pass a `--quiet` flag to {% url "`cypress run`" command-line#cypress-run %} to silence any Cypress specific output from stdout. Addresses {% issue 7714 %}.

**Bugfixes:**

- {% url "`cy.wait()`" wait %} now correctly resolves when waiting for XHR requests that contain resource-like text in the XHR's query params or hash (like `.js`, .`html`, `.css`). {% issue 7280 %}.
- We fixed a regression in {% url "4.6.0" changelog-4-6-0 %} where errors thrown from the application under test as strings would not be correctly handled. Fixes {% issue 7590 %}.
- We fixed a regression in {% url "4.8.0" changelog-4-8-0 %} where {% url "`.click()`" click %} would hang if the subject had a shadow root and {% url "`experimentalShadowDomSupport`" experiments#Shadow-DOM %} was not enabled. Fixes {% issue 7679 %}.
- We fixed a regression in {% url "4.6.0" changelog-4-6-0 %} so that {% url "`.should('have.value')`" should %} now properly asserts against `<progress>`, `<meter>` or `<li>` element's values. Fixes {% issue 7603 %}.
- Cypress no longer responds with 413 responses during a recorded `cypress run` when the stdout is too large. Fixes {% issue 7548 %}.
- We fixed an issue where Cypress could exit successfully even with failing tests when launched in global mode. Fixes {% issue 7755 %}.
- Assertion logs now properly display as parent commands in the {% url "Command Log" test-runner#Command-Log %} regardless of what is in the `beforeEach` hook. Fixes {% issue 7731 %}.
- When {% url "`experimentalShadowDomSupport`" experiments#Shadow-DOM %} is enabled, querying shadow dom in certain situations will no longer cause the error `Cannot read property 'length' of undefined` during `cypress run`. Fixes {% issue 7676 %}.
- Highlighting of elements upon hover of a command in the {% url "Command Log" test-runner#Command-Log %} are now visible when targeting absolute positioned elements. Fixes {% issue 7762 %}.
- {% url "`cypress run`" command-line#cypress-run %} will no longer crash when provided an empty string to the `--project` flag. Fixes {% issue 7743 %}.

**Misc:**

- There is now a loading state to indicated when tests are loading in the {% url "Command Log" test-runner#Command-Log %}. Addresses {% issue 7700 %}.
- The type definitions for `fixturesFolder`, `pluginsFile`, `screenshotsFolders` and `videoCompression` have been updated to allow `false` TypeScript types. Addresses {% issue 7654 %}.
- The type definitions for `cy.wait(ms)` now correctly yield the type of the previous subject. Addresses {% issue 7682 %}.
- The type definitions now allow for the 'key' keyword when chaining off 'any' or 'all' assertion chainers. Addresses {% issue 7665 %}.

**Dependency Updates:**

- Upgraded `arch` from `2.1.1` to `2.1.2`. Addressed in {% PR 7672 %}.
- Upgraded `eventemitter2` from `4.1.2` to `6.4.2`. Addressed in {% PR 7705 %} and {% PR 7707 %}.
- Upgraded `getos` from `3.1.1` to `3.2.1`. Addressed in {% PR 7685 %}.
- Upgraded `is-installed-globally` from `0.1.0` to `0.3.2`. Addressed in {% PR 7703 %}.
- Upgraded `jimp` from `0.12.0` to `0.13.0`. Addressed in {% PR 7618 %}.
- Upgraded `moment` from `2.24.0` to `2.26.0`. Addressed in {% PR 7718 %}.
- Upgraded `signal-exit` from `3.0.2` to `3.0.3`. Addressed in {% PR 7738 %}.
4 changes: 2 additions & 2 deletions source/_partial/network_stubbing_warning.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{% 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.** See {% issue 95 %} for more details and temporary workarounds.
{% endnote %}
🚨 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.
{% endnote %}
6 changes: 5 additions & 1 deletion source/guides/guides/command-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Option | Description
`--parallel` | {% urlHash "Run recorded specs in parallel across multiple machines" cypress-run-parallel %}
`--port`,`-p` | {% urlHash "Override default port" cypress-run-port-lt-port-gt %}
`--project`, `-P` | {% urlHash "Path to a specific project" cypress-run-project-lt-project-path-gt %}
`--quiet`, `-q` | If passed, Cypress output will not be printed to `stdout`. Only output from the configured {% url "Mocha reporter" reporters %} will print.
`--record` | {% urlHash "Whether to record the test run" cypress-run-record-key-lt-record-key-gt %}
`--reporter`, `-r` | {% urlHash "Specify a Mocha reporter" cypress-run-reporter-lt-reporter-gt %}
`--reporter-options`, `-o` | {% urlHash "Specify Mocha reporter options" cypress-run-reporter-lt-reporter-gt %}
Expand Down Expand Up @@ -542,7 +543,6 @@ Clear the contents of the Cypress cache. This is useful when you want Cypress to
cypress cache clear
```


# Debugging commands

Cypress is built using the {% url 'debug' https://github.com/visionmedia/debug %} module. That means you can receive helpful debugging output by running Cypress with this turned on prior to running `cypress open` or `cypress run`.
Expand Down Expand Up @@ -584,3 +584,7 @@ DEBUG=cypress:launcher cypress run
```shell
DEBUG=cypress:server:project cypress run
```

{% history %}
{% url "4.9.0" changelog %} | Added `--quiet` flag to `cypress run`
{% endhistory %}
5 changes: 5 additions & 0 deletions source/guides/guides/module-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Option | Type | Description
`parallel` | *boolean* | Run recorded specs in {% url "parallel" parallelization %} across multiple machines
`port` | *number* | Override default port
`project` | *string* | Path to a specific project
`quiet`| *boolean* | If passed, Cypress output will not be printed to `stdout`. Only output from the configured {% url "Mocha reporter" reporters %} will print.
`record` | *boolean* | Whether to record the test run
`reporter` | *string* | Specify a {% url "Mocha reporter" reporters %}
`reporterOptions` | *object* | Specify {% url "Mocha reporter" reporters %} options
Expand Down Expand Up @@ -136,3 +137,7 @@ const cypress = require('cypress')

cypress.open()
```

{% history %}
{% url "4.9.0" changelog %} | Added `quiet` option to `cypress.run()`
{% endhistory %}
2 changes: 2 additions & 0 deletions source/guides/references/experiments.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Option | Default | Description
----- | ---- | ----
`experimentalGetCookiesSameSite` | `false` | Adds `sameSite` values to the objects yielded from {% url "`cy.setCookie()`" setcookie %}, {% url "`cy.getCookie()`" getcookie %}, and {% url "`cy.getCookies()`" getcookies %}. This will become the default behavior in a later Cypress version.
`experimentalComponentTesting` | `false` | Enables component testing using framework-specific adaptors. See {% urlHash "Component Testing" Component-Testing %} for more detail.
`experimentalFetchPolyfill` | `false` | Automatically replaces `window.fetch` with a polyfill that Cypress can spy on and stub.
`experimentalSourceRewriting` | `false` | Enables AST-based JS/HTML rewriting. This may fix issues caused by the existing regex-based JS/HTML replacement algorithm. See {% issue 5273 %} for details.
`experimentalShadowDomSupport` | `false` | Enables shadow DOM support. Adds the `cy.shadow()` command and the `includeShadowDom` option to some DOM commands. See {% urlHash "Shadow DOM" Shadow-DOM %} for more detail.

Expand Down Expand Up @@ -125,6 +126,7 @@ cy.get('.container .my-button', { includeShadowDom: true })
In the selector `.container .my-button`, the first part (`.container`) exists in the light DOM and the second part (`.my-button`) exists in the shadow DOM. This will not find the button element. Instead, you can use one of the methods in the above examples.

{% history %}
{% url "4.9.0" changelog#4-9-0 %} | Added support for `experimentalFetchPolyfill`.
{% url "4.8.0" changelog#4-8-0 %} | Added support for `experimentalShadowDomSupport`.
{% url "4.6.0" changelog#4-6-0 %} | Added support for `experimentalSourceRewriting`.
{% url "4.5.0" changelog#4-5-0 %} | Added support for `experimentalComponentTesting`.
Expand Down
2 changes: 1 addition & 1 deletion source/guides/references/trade-offs.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Many of these issues are currently being worked on or are on our {% url "Roadmap
- {% issue 170#issuecomment-340012621 "Testing file uploads is application specific." %}
- {% issue 433#issuecomment-280465552 "Testing file downloads is application specific." %}
- {% issue 685 "iframe support is somewhat limited, but does work." %}
- {% issue 95#issuecomment-281273126 "You cannot use `cy.route()` on `window.fetch` but there is a workaround." %} See the implementation in {% url "this recipe." https://github.com/cypress-io/cypress-example-recipes/tree/master/examples/stubbing-spying__window-fetch/cypress/integration %}
- {% issue 95#issuecomment-281273126 "You cannot use `cy.route()` on `window.fetch` but there is a workaround." %} You can enable an automatic `window.fetch` polyfill from Cypress to spy and stub those requests, see {% url experimental experiments %}
- {% issue 144 "There is no shadow DOM support, but there are workarounds." %} See {% url "this comment." https://github.com/cypress-io/cypress/issues/830#issuecomment-449411701 %}

# Permanent trade-offs
Expand Down
1 change: 1 addition & 0 deletions tmp/cypress
Submodule cypress added at dc251c