diff --git a/docs/app/references/changelog.mdx b/docs/app/references/changelog.mdx index d7bd73408d..4106300776 100644 --- a/docs/app/references/changelog.mdx +++ b/docs/app/references/changelog.mdx @@ -8,6 +8,29 @@ sidebar_label: Changelog # Changelog +## 15.5.0 + +_Released 10/17/2025_ + +**Features:** + +- When `cypress run` is used with both `--record` and `--posix-exit-codes` enabled, Cypress will now exit with code `112` when it cannot determine which spec to run next due to network conditions. Addresses [#32485](https://github.com/cypress-io/cypress/issues/32485). Addressed in [#32635](https://github.com/cypress-io/cypress/pull/32635). + +**Bugfixes:** + +- An error is no longer thrown during command execution when the application under test overwrites the `window.$` property with a non-function. Fixes [#1502](https://github.com/cypress-io/cypress/issues/1502). Fixed in [#32682](https://github.com/cypress-io/cypress/pull/32682). +- When running `cypress` in Cypress development environments, or when `ELECTRON_ENABLE_LOGGING` is otherwise set to 1, certain messages written to `stderr` will no longer be bracketed with verbose tags. Addresses [#32569](https://github.com/cypress-io/cypress/issues/32569). Addressed in [#32674](https://github.com/cypress-io/cypress/pull/32674). +- Improve performance of time between specs by not resetting the `file_systems` `StorageType` state when executing the CDP command `Storage.clearDataForOrigin`. Fixed in [#32703](https://github.com/cypress-io/cypress/pull/32703). + +**Misc:** + +- Browser detection in Cypress now always prefers 64-bit browser installs to 32-bit browser installs. Addressed in [#32656](https://github.com/cypress-io/cypress/pull/32656). +- Update code button styles and rename Get Code for Code on cy.prompt. Addressed in [#32745](https://github.com/cypress-io/cypress/pull/32745). + +**Dependency Updates:** + +- Upgraded `tsx` from `4.20.5` to `4.20.6`. Addressed in [#32730](https://github.com/cypress-io/cypress/pull/32730). + ## 15.4.0 _Released 10/7/2025_ diff --git a/docs/app/references/command-line.mdx b/docs/app/references/command-line.mdx index c59a92ed42..68c073654e 100644 --- a/docs/app/references/command-line.mdx +++ b/docs/app/references/command-line.mdx @@ -442,14 +442,12 @@ cypress run --port 8080 #### `cypress run --posix-exit-codes` {#cypress-run-posix-exit-codes} -This changes the default behavior of Cypress regarding exit codes. This flag causes Cypress to exit with POSIX exit code of 1 when there are test failures or if Cypress could not run, rather than the number of tests that failed. +This changes the default behavior of Cypress regarding exit codes. This flag causes Cypress to exit with POSIX exit code of 1 when there are test failures or if Cypress could not run, rather than the number of tests that failed. It can return additional POSIX-compliant exit codes for other scenarios as well. See the [Exit Code section](/app/references/command-line#Exit-code) for a comprehensive reference of Cypress exit codes. ```shell cypress run --posix-exit-codes ``` -For more about Cypress' exit code behavior, see the [Exit Code section](/app/references/command-line#Exit-code). - #### `cypress run --project ` {#cypress-run-project-lt-project-path-gt} To see this in action we've set up an @@ -598,69 +596,20 @@ Cypress Cloud will display any tags sent with the appropriate run. #### Exit code -When Cypress finishes running tests, it exits. If there are no failed tests, the -exit code will be 0. - -```text -## All tests pass -$ cypress run -... - Tests Passing Failing - ✔ All specs passed! 00:16 17 17 0 - -## print exit code on Mac or Linux -$ echo $? -0 -``` - -By default, if there are any test failures, then the exit code will match the number of -tests that failed. - -```text -## Spec with two failing tests -$ cypress run -... - Tests Passing Failing - ✖ 1 of 1 failed (100%) 00:22 17 14 2 - -## print exit code on Mac or Linux -$ echo $? -2 -``` +Cypress supports two different exit code behaviors. The default behavior is similar to that of Mocha, but is not POSIX compliant: reserved exit codes can be returned for certain conditions. As well, the default behavior +can return a false negative when there are a number of tests that fail in multiples of 256: most terminals will apply modulo 256 to any exit code larger than 255. -You can change this behavior by passing the `--posix-exit-codes` flag. When this flag is passed, -the exit code will be 0 if all tests pass. If there are any test failures or if Cypress could not run, -the exit code will be 1. +POSIX compliant exit codes are available via the `--posix-exit-codes` flag. When this flag is passed, additional conditions can be returned that are not possible with the default behavior, including when Cypress fails due to +network errors when connections to Cypress Cloud are required, such as in `--record` or `--parallel` runs. -```text -## Spec with two failing tests -$ cypress run -... - Tests Passing Failing - ✖ 1 of 1 failed (100%) 00:22 17 14 2 +When using POSIX compliant exit codes, the number of failed tests can be determined from the [Module API](/app/references/module-api) or [structured reporter data](/app/tooling/reporters). -## print exit code on Mac or Linux -$ echo $? -1 -``` - -If Cypress could not run for some reason (for example if no spec files were -found) then the exit code will be 1. - -```text -## No spec files found -$ cypress run --spec not-found.js -... -Can't run because no spec files were found. - -We searched for any files matching this glob pattern: - -not-found.js - -## print exit code on Mac or Linux -$ echo $? -1 -``` +| Exit Condition | POSIX Exit Code (with `--posix-exit-codes`) | Default Exit Code (without `--posix-exit-codes`) | +| ------------------------------------------------------------------------------------------- | ------------------------------------------- | ------------------------------------------------ | +| All tests pass | 0 | 0 | +| _n_ tests fail | 1 | _n_ | +| Cypress could not run due to a network error when connections to Cypress Cloud are required | 112 | 1 | +| Cypress could not run for any other reason, including no spec files found | 1 | 1 | ### `cypress open` @@ -1000,10 +949,11 @@ and with Windows CMD and PowerShell terminal windows. ## History -| Version | Changes | -| ------------------------------------------ | ---------------------------------------------------------- | -| [15.4.0](/app/references/changelog#15-4-0) | Added `--posix-exit-codes` flag to `cypress run` | -| [12.6.0](/app/references/changelog#12-6-0) | Added `--auto-cancel-after-failures` flag to `cypress run` | -| [5.4.0](/app/references/changelog) | Added `prune` subcommand to `cypress cache` | -| [5.4.0](/app/references/changelog) | Added `--size` flag to `cypress cache list` subcommand | -| [4.9.0](/app/references/changelog) | Added `--quiet` flag to `cypress run` | +| Version | Changes | +| ------------------------------------------ | --------------------------------------------------------------------- | +| [15.5.0](/app/references/changelog#15-5-0) | Added the 112 exit code scenario when using `--posix-exit-codes` flag | +| [15.4.0](/app/references/changelog#15-4-0) | Added `--posix-exit-codes` flag to `cypress run` | +| [12.6.0](/app/references/changelog#12-6-0) | Added `--auto-cancel-after-failures` flag to `cypress run` | +| [5.4.0](/app/references/changelog) | Added `prune` subcommand to `cypress cache` | +| [5.4.0](/app/references/changelog) | Added `--size` flag to `cypress cache list` subcommand | +| [4.9.0](/app/references/changelog) | Added `--quiet` flag to `cypress run` | diff --git a/docs/app/references/troubleshooting.mdx b/docs/app/references/troubleshooting.mdx index 34e5726575..45cac15a52 100644 --- a/docs/app/references/troubleshooting.mdx +++ b/docs/app/references/troubleshooting.mdx @@ -481,11 +481,11 @@ On Windows, Cypress scans the following locations to try to find each browser: | Browser Name | Expected Executable Path | | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `chrome` | `C:/Program Files (x86)/Google/Chrome/Application/chrome.exe`, `C:/Program Files/Google/Chrome/Application/chrome.exe` | -| `chrome:beta` | `C:/Program Files (x86)/Google/Chrome Beta/Application/chrome.exe`, `C:/Program Files/Google/Chrome Beta/Application/chrome.exe` | +| `chrome` | `C:/Program Files/Google/Chrome/Application/chrome.exe`, `C:/Program Files (x86)/Google/Chrome/Application/chrome.exe` | +| `chrome:beta` | `C:/Program Files/Google/Chrome Beta/Application/chrome.exe`, `C:/Program Files (x86)/Google/Chrome Beta/Application/chrome.exe` | | `chrome:canary` | `%APPDATA%/Local/Google/Chrome SxS/Application/chrome.exe` | | `chrome-for-testing` | `C:/Program Files/Google/Chrome for Testing/chrome.exe`, `C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe` | -| `chromium` | `C:/Program Files (x86)/Google/chrome-win32/chrome.exe`, `C:/Program Files/Google/chrome-win/chrome.exe`, `C:/Program Files/Google/Chromium/chrome.exe`, `C:/Program Files (x86)/Google/Chromium/chrome.exe` | +| `chromium` | `C:/Program Files/Google/chrome-win/chrome.exe`, `C:/Program Files/Google/Chromium/chrome.exe`, `C:/Program Files (x86)/Google/chrome-win32/chrome.exe`, `C:/Program Files (x86)/Google/Chromium/chrome.exe` | | `firefox` | `C:/Program Files/Mozilla Firefox/firefox.exe`, `C:/Program Files (x86)/Mozilla Firefox/firefox.exe`, `%APPDATA%/Local/Mozilla Firefox/firefox.exe` | | `firefox:dev` | `C:/Program Files/Firefox Developer Edition/firefox.exe`, `C:/Program Files (x86)/Firefox Developer Edition/firefox.exe`, `%APPDATA%/Local/Firefox Developer Edition/firefox.exe` | | `firefox:nightly` | `C:/Program Files/Firefox Nightly/firefox.exe`, `C:/Program Files (x86)/Firefox Nightly/firefox.exe`, `%APPDATA%/Local/Firefox Nightly/firefox.exe` |