Cypress v16.0.0

v16.0.0
Added 2
  • A forceHttp1 configuration option now allows routing every browser through the legacy network path during migration
  • A removeSRIAttributes configuration option is now available to address Subresource Integrity errors
Changed 6
  • Chrome, Chromium, and Edge now intercept test traffic on the native browser network rather than routing through Cypress, negotiating HTTP/2 or HTTP/3 with your server instead of being downgraded to HTTP/1.1
  • Bundled Node.js version has been upgraded from 22.19.0 to 24.15.0
  • The experimentalMemoryManagement configuration option has been replaced by manageBrowserMemory, which defaults to true and is now enabled by default in Chromium-based browsers
  • The default keystrokeDelay for cy.type() has been changed from 10 to 0 to improve performance
  • The experimentalFastVisibility flag has been replaced with a visibilityStrategy configuration option that accepts 'legacy' or 'modern', defaulting to 'modern' which uses the browser's native Element.checkVisibility() API
  • cy.intercept() behavior has changed such that req.httpVersion is no longer reported and compression headers are no longer present on intercepted responses when using native network interception
Removed 5
  • Support for Node.js 20 and Node.js 25 has been removed; Cypress now requires Node.js ^22.0.0, ^24.0.0, or >=26.0.0
  • The Cypress.env() method has been removed; use Cypress.expose() for non-sensitive values and cy.env() for sensitive values
  • The cy.exec() command and execTimeout configuration option have been removed; use cy.task() and taskTimeout instead
  • The cy.end() command, which ended a chain by yielding null, has been removed
  • The experimentalSourceRewriting configuration option has been removed

From Cypress

Breaking Changes:

  • Chrome, Chromium, and Edge intercept test traffic on the native browser network rather than routing it through Cypress, so your application negotiates HTTP/2 or HTTP/3 with your server as it does in production instead of being downgraded to HTTP/1.1. A small number of cy.intercept() behaviors differ as a result: most notably, req.httpVersion is no longer reported, and compression headers are no longer present on an intercepted response. Firefox, WebKit, and Electron continue to use the legacy network path, and forceHttp1 routes every browser back through it while you migrate. See Native network interception and the Migration Guide. Addresses #3708.
  • Removed support for Node.js 20 and Node.js 25. Cypress now requires Node.js ^22.0.0, ^24.0.0, or >=26.0.0. Addresses #33705 and #33778. Addressed in #33771.
  • Upgraded bundled Node.js version from 22.19.0 to 24.15.0. Addressed in #33494.
  • Removed Cypress.env(). Use Cypress.expose() for non-sensitive values that need to be readable in the browser, and cy.env() for sensitive values that must remain in the Node process. The env key is no longer supported in per-test or suite config overrides; use expose: { KEY: value } instead if absolutely necessary. The allowCypressEnv configuration option has also been removed. See the Migration Guide. Addresses #33889. Addressed in #33963.
  • Removed the cy.exec() command and the execTimeout configuration option, both deprecated in Cypress 15.21.0. Use cy.task() and taskTimeout instead — a task runs in Node without depending on the operating system, shell, or terminal of the machine running Cypress. Calling cy.exec() now throws, and setting execTimeout prints a warning and is otherwise ignored. See the Migration Guide. Addresses #34694.
  • Removed the cy.end() command, which ended a chain of commands by yielding null. A Cypress chain is already terminated when the next cy.<command>() starts a new chain, so existing .end() calls can simply be removed. See the Migration Guide. Addressed in #33696.
  • The experimentalMemoryManagement configuration option has graduated out of experimental status and been replaced by manageBrowserMemory, which defaults to true. Memory management is now enabled by default in Chromium-based browsers. Setting experimentalMemoryManagement prints a warning and is otherwise ignored — if you previously set experimentalMemoryManagement: false to opt out, you must now set manageBrowserMemory: false. See the Migration Guide. Addresses #34385.
  • Removed the experimentalSourceRewriting configuration option. The default regex-based source rewriting handles every case the AST-based rewriter did, so default behavior is unchanged and the option can be deleted from your config. If you were using it to work around Subresource Integrity errors, enable removeSRIAttributes instead. See the Migration Guide. Addresses #34213.
  • The default keystrokeDelay for cy.type() has been changed from 10 to 0 to improve performance of typing-heavy test runs. Users who relied on the implicit 10ms delay can restore it by setting keystrokeDelay: 10 in their Cypress configuration or via Cypress.Keyboard.defaults(). Addresses #33523.
  • The experimental experimentalFastVisibility flag has been replaced with a new visibilityStrategy configuration option that accepts 'legacy' or 'modern', defaulting to 'modern'. The modern visibility algorithm, based on the browser's native Element.checkVisibility() API, is now the default for all users. visibilityStrategy is deprecated, so set visibilityStrategy: 'legacy' only as a temporary migration path. See the Visibility Strategy guide for migration help. Addressed in #33794.
  • cy.getCookie(), cy.getCookies() and cy.getAllCookies() are now query commands. They re-read the cookie(s) from the browser and retry any attached assertions until they pass or the command times out, so cy.getCookie('token').should('exist') now waits for a cookie that is set asynchronously (for example, after a login request resolves) instead of failing on the first read. As a result, their timeout now follows defaultCommandTimeout (default 4000) rather than responseTimeout (default 30000), and to overwrite these commands you must now use Cypress.Commands.overwriteQuery() instead of Cypress.Commands.overwrite(). See the Migration Guide. Addresses #4802.
  • viewportWidth and viewportHeight can no longer be set via Cypress.config() during test execution. Mutating them this way affected the next test rather than the current one and was not reflected in Test Replay. Use cy.viewport() or set them in the test configuration of a describe/context or it block instead. See the Migration Guide. Addresses #31592. Addressed in #34262.
  • blockHosts can no longer be set via Cypress.config() during test execution. Mutating it this way affected the next test rather than the current one. Set blockHosts in the test configuration of a describe/context or it block instead. See the Migration Guide. Addressed in #34553.
  • cy.getAllLocalStorage() and cy.getAllSessionStorage() are now query commands. They re-read storage from all origins and retry any attached assertions until they pass or the command times out, so cy.getAllLocalStorage().should(...) now waits for storage that is populated asynchronously instead of failing on the first read. To overwrite these commands you must now use Cypress.Commands.overwriteQuery() instead of Cypress.Commands.overwrite(). See the Migration Guide. Addresses #26422. Addressed in #34318.
  • The cypress info command no longer prints proxy environment variables (HTTP_PROXY, HTTPS_PROXY, NO_PROXY) or CYPRESS_* environment variables, so its output is safe to paste into a bug report. The command now reports only Cypress-specific details such as file paths, version, and system information. Addresses #34103. Fixed in #34314.
  • Removed built-in CoffeeScript support. The default @cypress/webpack-batteries-included-preprocessor no longer bundles coffee-loader or coffeescript, and .coffee is no longer resolved for specs, support files, or cy.fixture(). Use JavaScript or TypeScript, or add CoffeeScript to your own webpack config via @cypress/webpack-preprocessor. See the Migration Guide. Addressed in #33654.
  • Cypress Component Testing raises its minimum supported framework versions:
    • Angular versions 18, 19, and 20 are no longer supported. The minimum supported version is now 21.0.0. See the Migration Guide. Addresses #33005, #33655 and #33656.
    • cypress/angular-zoneless has been merged into cypress/angular and is no longer shipped with the Cypress binary, so update those imports to cypress/angular. The @cypress/angular-zoneless npm package is deprecated and no longer supported. The zoneless test harness is now the default in cypress/angular, so zone.js no longer needs to be installed, and the autoSpyOutputs and autoDetectChanges mount options have been removed. Addresses #33007.
    • @angular/platform-browser-dynamic has been replaced with @angular/platform-browser. Addresses #33006.
    • @cypress/schematic now requires cypress ^16.0.0, @angular/cli >=21.0.0 and @angular/core >=21.0.0, and no longer scaffolds the cypress/angular-zoneless mount handler. Addresses #33007.
    • Vite versions 5, 6, and 7 are no longer supported when using the Vite dev server. The minimum supported version is now 8.0.0. Upgrade Vite, and any @vitejs/* plugins that pin older major versions, before upgrading Cypress. Addresses #33724, #33725 and #33726. …
View original

Upgraded? How did it go?

Discussion