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

9.5.4 Release #4433

Merged
merged 13 commits into from
Apr 11, 2022
70 changes: 70 additions & 0 deletions content/_changelogs/9.5.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
## 9.5.4

_Released 4/11/2022_

**Bugfixes:**

- Updates were made to silence Electron warnings related to being unable to
connect to dbus. These errors are normal and expected, and do not result in
test failures. Because they are always present when running Electron inside
docker containers, it has incorrectly led people to believe it is the
root-cause of an error within their test run. By silencing these errors, it
will improve the debug experience to allow users to focus on meaningful
warning and error messages. Fixed
[#19299](https://github.com/cypress-io/cypress/issues/19299).
- Updates were made to ensure that all `*.enable` events are sent if Cypress
becomes disconnected from the Chrome DevTools Protocol and must re-establish a
connection to ensure all command logs are displayed to the user. This fixes an
issue where some command logs, like download or network events, are missing
once Cypress has disconnected and then reconnected to the Chrome DevTools
Protocol. Fixed [#20618](https://github.com/cypress-io/cypress/issues/20618).
- Fixed an issue where `cy.type('{enter}')` was not sending the Enter key for
Firefox `v98+`. This was not an issue with Firefox `v97` and below. Fixed
[#20562](https://github.com/cypress-io/cypress/issues/20562).
- Fixed a regression in [9.3.0](/guides/references/changelog#9-3-0) where glob
patterns provided to the `--spec` CLI parameter was incorrectly splitting the
patterns in unexpected places when it should have split on commas. Fixes
[#20794](https://github.com/cypress-io/cypress/issues/20794).
- Fixed an issue with `cy.root()` to respect the
[`timeout`](/api/commands/root#Arguments) option passed to the command.
Previously, when the `timeout` option was provided, it was ignored and the
default timeout was used. Fixed
[#19985](https://github.com/cypress-io/cypress/issues/19985).
- Updates were made to decrease the length of the Cypress cache path for Windows
to ensure
[installing pre-release versions](/guides/getting-started/installing-cypress#Install-pre-release-version)
of the Cypress binary are within the maximum path length of 260 characters.
Fixed in [#20961](https://github.com/cypress-io/cypress/pulls/20961).
- Fixed a regression in [8.6.0](/guides/references/changelog#8-6-0) which
prevented `.pause()` from correctly executing when passing the
`--headed --no-exit` CLI flags to `cypress run`. Fixed
[#20745](https://github.com/cypress-io/cypress/issues/20745).
- Fixed a regression in [9.2.0](/guides/references/changelog#9-2-0) which would
sometimes throw an expected error on navigation with `cy.back()` and
`cy.go()`. Fixed [#19749](https://github.com/cypress-io/cypress/issues/19749)
and [#20539](https://github.com/cypress-io/cypress/issues/20539).
- Corrected the Typescript type for a cookie which was incorrectly typed as
`any` when the correct type is `Cookie`. Fixed in
[#20513](https://github.com/cypress-io/cypress/pull/20513).
- Added the missing `Cypress.Command.addAll()` Typescript types. Fixed
[#18886](https://github.com/cypress-io/cypress/issue/18886).
- Fixed an uncommon error observed in `cy.session()` where an error was thrown
when no cookies had been set for the session and the user clicks the session
command log to view additional details in the DevTools console. Fixed in
[#20946](https://github.com/cypress-io/cypress/pull/20946).

**Misc:**

- A minor visual update was made to the `cy.session()` command log visuals.
Fixed [#20433](https://github.com/cypress-io/cypress/issues/20433).

**Dependency Updates:**

- Upgraded `ansi-regex` dependency from `4.1.0` to `4.1.1` to address the
[CVE-2021-3807](https://nvd.nist.gov/vuln/detail/CVE-2021-3807) NVD security
vulnerability. Addressed in
[#20807](https://github.com/cypress-io/cypress/pull/20807).
- Upgraded `plist` dependency from `3.0.4` to `3.0.5` to address the
[CVE-2022-22912](https://nvd.nist.gov/vuln/detail/CVE-2022-22912) NVD security
vulnerability. Addressed in
[#20808](https://github.com/cypress-io/cypress/pull/20808).
10 changes: 10 additions & 0 deletions content/api/cypress-api/custom-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ evaluated via an import statement in your
```javascript
Cypress.Commands.add(name, callbackFn)
Cypress.Commands.add(name, options, callbackFn)
Cypress.Commands.addAll(callbackObj)
Cypress.Commands.addAll(options, callbackObj)
Cypress.Commands.overwrite(name, callbackFn)
```

Expand All @@ -30,6 +32,10 @@ Cypress.Commands.overwrite(name, callbackFn)

```javascript
Cypress.Commands.add('login', (email, pw) => {})
Cypress.Commands.addAll({
login(email, pw) {},
visit(orig, url, options) {},
})
Cypress.Commands.overwrite('visit', (orig, url, options) => {})
```

Expand All @@ -43,6 +49,10 @@ The name of the command you're either adding or overwriting.

Pass a function that receives the arguments passed to the command.

**<Icon name="angle-right"></Icon> callbackObj** **_(Object)_**

An object with `callbackFn`s as properties.

**<Icon name="angle-right"></Icon> options** **_(Object)_**

Pass in an options object to define the implicit behavior of the custom command.
Expand Down