Changelog
14.2.0​
Released 3/12/2025
Features:
Cypress.stop()
is now available to stop the Cypress App on the current machine while tests are running. This can be useful for stopping test execution upon failures or other predefined conditions. Addresses #518. Addressed in #31225.
Misc:
- The browser dropdown now has a more minimal design - showing only the icon of the browser selected to the left of the URL. The currently selected browser also now shows at the top of the browser dropdown. Browsers with longer names will now have their names correctly left aligned in the browser dropdown. Addresses #21755 and #30998. Addressed in #31216.
- Additional CLI options will be displayed in the terminal for some Cloud error messages. Addressed in #31211.
- Updated Cypress Studio with url routing to support maintaining state when reloading. Addresses #31000 and #30996.
Dependency Updates:
- Upgraded
cli-table3
from0.5.1
to0.6.5
. Addressed in #31166. - Upgraded
simple-git
from3.25.0
to3.27.0
. Addressed in #31198.
14.1.0​
Released 2/25/2025
Features:
- Firefox versions 135 and above are now automated with WebDriver BiDi instead of Chrome Devtools Protocol. Addresses #30220.
Bugfixes:
- Fixed the calculation of upload throughput units when displaying the 'stream stalled' error message during Test Replay archive uploads. Fixes #31075. Addressed in #31160.
Misc:
- Viewport width, height, and scale now display in a badge above the application under test. The dropdown describing how to set viewport height and width has been removed from the UI. Additionally, component tests now show a notice about URL navigation being disabled in component tests. Addresses #30999. Addressed in #31119.
- Updated types around
.readFile()
and.scrollTo()
arguments andCypress.dom
methods. Addressed in #31055. - Updated types around
.shadow()
and.root()
options. Addressed in #31154.
Dependency Updates:
- Upgraded
chrome-remote-interface
from0.33.2
to0.33.3
. Addressed in #31128. - Upgraded
ci-info
from4.0.0
to4.1.0
. Addressed in #31132. - Upgraded
compression
from1.7.5
to1.8.0
. Addressed in #31151.
14.0.3​
Released 2/11/2025
Bugfixes:
- Fixed an issue in Cypress
14.0.2
where privileged commands did not run correctly when a spec file or support file contained certain encoded characters. Fixes #31034 and #31060.
Dependency Updates:
- Upgraded
@cypress/request
from3.0.6
to3.0.7
. Addressed in #31063. - Upgraded
compression
from1.7.4
to1.7.5
. Addressed in #31004.
14.0.2​
Released 2/05/2025
Bugfixes:
- Fixed a regression introduced in
14.0.0
where error codeframes in the runner UI were not populated with the correct data in failed retry attempts. Fixes #30927. - All commands performed in
after
andafterEach
hooks will now correctly retry when a test fails. Commands that are actions like.click()
and.type()
will now perform the action in this situation also. Fixes #2831. - Fixed an issue in Cypress
14.0.0
where privileged commands did not run correctly when a spec file or support file contained characters that required encoding. Fixes #30933. - Re-enabled retrying Cloud instance creation for runs that are parallel or recorded. Fixes #31002.
Misc:
- Updated the mismatched dependencies warning message to be neutral, avoiding assumptions about upgrading or downgrading. Fixes #30990.
Dependency Updates:
- Upgraded
mime
from2.6.0
to3.0.0
. Addressed in #30966.
14.0.1​
Released 1/28/2025
Bugfixes:
- Fixed an issue where Cypress would incorrectly navigate to
about:blank
when test isolation was disabled and the last test would fail and then retry. Fixes #28527. - Fixed a regression introduced in
14.0.0
where an element would not return the correct visibility if its offset parent was within the clipping element. Fixes #30922. - Fixed a regression introduced in
14.0.0
where the incorrect visiblity would be returned when eitheroverflow-x
oroverflow-y
was visible but the other one was clipping. Fixed in #30934. - Fixed an issue where an
option
element would not return the correct visibility if its parent element has a clipping overflow. Fixed in #30934. - Fixed an issue where non-HTMLElement(s) may fail during assertions. Fixes #30944.
Misc:
- Corrected the broken documentation links displayed in Cypress 14.0.0. Addresses #30951. Addressed in #30953.
- Benign Mesa/GLX related warnings are now hidden in the terminal output when running Cypress in certain Linux environments or containers. Addresses #29521 and #29554.
14.0.0​
Released 1/16/2025
Summary:
Cypress v14.0.0 improves performance of component testing and adds support for new framework and dev server versions.
v14.0.0 also includes breaking changes to cy.origin
that are necessary to handle
Chrome's deprecation of document.domain
injection, which should fix issues for some users in recent Chrome versions. Support for older versions of Node.js, Linux distributions, browsers and component testing frameworks and dev servers is removed.
Overall, we don't anticipate this release to be too disruptive for most users. We recommend bumping your version to see if your tests still run as expected. As always, open any issues you find here.
Breaking Changes:
Refer to the v14 Migration Guide for help migrating your code.
- Removed support for Node.js 16 and Node.js 21. Addresses #29930.
- Upgraded bundled Node.js version from
18.17.0
to20.18.1
. Addresses #29547. - Prebuilt binaries for Linux are no longer compatible with Linux distributions based on glibc
<2.28
, for example: Ubuntu 14-18, RHEL 7, CentOS 7, Amazon Linux 2. Addresses #29601. - Cypress now only officially supports the latest 3 major versions of Chrome, Firefox, and Edge - older browser versions may still work, but we recommend keeping your browsers up to date to ensure compatibility with Cypress. A warning will no longer be displayed on browser selection in the Launchpad for any 'unsupported' browser versions. Additionally, the undocumented
minSupportedVersion
property has been removed fromCypress.browser
. Addressed in #30462. - The
cy.origin()
command must now be used when navigating between subdomains. Because this is a fairly disruptive change for users who frequently navigate between subdomains, a new configuration option is being introduced.injectDocumentDomain
can be set totrue
in order to re-enable the injection ofdocument.domain
setters in Cypress. This configuration option is marked as deprecated and you'll receive a warning when Cypress is launched with this option set totrue
. It will be removed in Cypress 15. Addressed in #30770. - The
experimentalSkipDomainInjection
configuration has been removed and replaced with aninjectDocumentDomain
configuration. Addressed in #30770. - It is no longer possible to make a
fetch
orXMLHttpRequest
request from theabout:blank
page in Electron (i.e.cy.window().then((win) => win.fetch('<some-url>'))
). You must usecy.request
instead or perform some form of initial navigation viacy.visit()
. Addressed in #30394. - The
experimentalJustInTimeCompile
configuration option for component testing has been replaced with ajustInTimeCompile
option that istrue
by default. This option will only compile resources directly related to your spec, compiling them 'just-in-time' before spec execution. This should result in improved memory management and performance for component tests incypress open
andcypress run
modes, in particular for large component testing suites.justInTimeCompile
is now only supported forwebpack
. Addresses #30234. Addressed in #30641. - Cypress Component Testing no longer supports:
create-react-app
. Addresses #30028.@vue/cli-service
. Addresses #30481.Angular
versions 13, 14, 15, and 16. The minimum supported version is now17.2.0
in order to fully support Angular signals. Addresses #29582. Addressed in #30539.Next.js
versions 10, 11, 12, and 13. Addresses #29583.Nuxt.js
version 2. Addresses #30468.React
versions 16 and 17. Addresses #29607.Svelte
versions 3 and 4. Addresses #30492 and #30692.Vue
version 2. Addresses #30295.
- The
cypress/react18
test harness is no longer included in the Cypress binary. Instead, React 18 support is now shipped withcypress/react
! Addresses #29607. - The
cypress/angular-signals
test harness is no longer included in the Cypress binary. Instead, signals support is now shipped withcypress/angular
! This requiresrxjs
to be installed as apeerDependency
. Addresses #29606. - The Cypress configuration wizard for Component Testing supports TypeScript 4.0 or greater. Addresses #30493.
@cypress/webpack-dev-server
no longer supportswebpack-dev-server
version 3. Additionally,@cypress/webpack-dev-server
now ships withwebpack-dev-server
version 5 by default.webpack-dev-server
version 4 will need to be installed alongside Cypress if you are still usingwebpack
version 4. Addresses #29308, #30347, and #30141.@cypress/vite-dev-server
no longer supportsvite
versions 2 and 3. Addresses #29377 and #29378.- The
delayMs
option ofcy.intercept()
has been removed. This option was deprecated in Cypress 6.4.0. Please use thedelay
option instead. Addressed in #30463. - The
experimentalFetchPolyfill
configuration option was removed. This option was deprecated in Cypress 6.0.0. We recommend usingcy.intercept()
for handling fetch requests. Addressed in #30466. - We removed yielding the second argument of
before:browser:launch
as an array of browser arguments. This behavior has been deprecated since Cypress 4.0.0. Addressed in #30460. - The
cypress open-ct
andcypress run-ct
CLI commands were removed. Please usecypress open --component
orcypress run --component
respectively instead. Addressed in #30456 - The undocumented methods
Cypress.backend('firefox:force:gc')
andCypress.backend('log:memory:pressure')
were removed. Addresses #30222.
Deprecations:
- The
resourceType
option oncy.intercept
has been deprecated. We anticipate the resource types to change or be completely removed in the future. Our intention is to replace essential functionality dependent on theresourceType
within Cypress in a future version (like hiding network logs that are not fetch/xhr). Please leave feedback on any essential uses ofresourceType
in this GitHub issue. Addresses #30433. - The new
injectDocumentDomain
configuration option is released as deprecated. It will be removed in Cypress 15. Addressed in #30770.
Features:
injectDocumentDomain
, a new configuration option, can be set totrue
in order to re-enable the injection ofdocument.domain
setters in Cypress. Addressed in #30770.- Cypress Component Testing now supports:
React
version 19. Addresses #29470.Angular
version 19. Addresses #30175.Next.js
version >=15.0.4. Versions 15.0.0 - 15.0.3 depend on the React 19 Release Candidate and are not officially supported by Cypress, but should still work. Addresses #30445.Svelte
version 5. Addresses #29641.Vite
version 6. Addresses #30591.
Bugfixes:
- Elements with
display: contents
will no longer use box model calculations for visibility, and correctly show as visible when they are visible. Fixed in #29680. Fixes #29605. - Fixed a visibility issue when the element is positioned
static
orrelative
and the element's offset parent is positionedabsolute
, a descendent of the ancestor, and has no clippable overflow. Fixed in #29689. Fixes #28638. - Fixed a visibility issue for elements with
textContent
but without a width or height. Fixed in #29688. Fixes #29687. - Elements whose parent elements has
overflow: clip
and no height/width will now correctly show as hidden. Fixed in #29778. Fixes #23852. - The CSS pseudo-class
:dir()
is now supported when testing in Electron. Addresses #29766. - Fixed an issue where the spec filename was not updating correctly when changing specs in
open
mode. Fixes #30852. cy.origin()
now correctly errors when thecy.window()
,cy.document()
,cy.title()
,cy.url()
,cy.location()
,cy.hash()
,cy.go()
,cy.reload()
, andcy.scrollTo()
commands are used outside of thecy.origin()
command after the AUT has navigated away from the primary origin. Fixes #30848. Fixed in #30858.
Misc:
- Removed some component testing API stubs that were removed in Cypress v11.0.0. Addressed in #30696. Addresses #30623.
Dependency Updates:
- Upgraded
electron
from27.3.10
to33.2.1
. Addresses #29547 and #30561. - Upgraded
@electron/rebuild
from3.2.10
to3.7.1
. Addresses #28766 and #30632. - Upgraded bundled Chromium version from
118.0.5993.159
to130.0.6723.137
. Addresses #29547 and #30561. - Updated
jQuery
from3.4.1
to3.7.1
. Addressed in #30345. - Updated
react
from17.0.2
to18.3.1
andreact-dom
from17.0.2
to18.3.1
. Addresses #30511. - Upgraded
@vue/test-utils
from2.3.2
to2.4.6
. Addresses #26628.
13.17.0​
Released 12/17/2024
Features:
- Added official support for the Google Chrome for Testing browser. Assuming the browser is in a location where it can be auto-detected, it can be launched by providing the
--browser chrome-for-testing
option. If it can't be auto-detected, the path to the browser can also be provided. Previously customizing the available browsers was required. Addresses #28123 and #28554.
Bugfixes:
- Fixed an issue where targets may hang if
Network.enable
is not implemented for the target. Addresses #29876. - Updated Firefox
userChrome.css
to correctly hide the toolbox during headless mode. Addresses #30721. - Fixed an issue loading the
cypress.config.ts
file with Node.js version22.12.0
if it is loaded as an ESM. Addresses #30715.
Misc:
- Removed a comment from the scaffolded
supportFile
for component tests around CommonJS syntax. Addresses #23287.
Dependency Updates:
- Updated
chai
from4.2.0
to4.5.0
. Addressed in #30737.
13.16.1​
Released 12/04/2024
Bugfixes:
- During recorded or parallel runs, execution will fail if Cypress is unable to confirm the creation of an instance instead of skipping the spec. Addresses #30628.
13.16.0​
Released 11/19/2024
Features:
- Added new
defaultBrowser
configuration option to specify the default browser to launch. This option only affects the first browser launch; changing this option after the browser is already launched will have no effect. Addresses #6646.
Bugfixes:
- Fixed an issue where some JS assets were not properly getting sourcemaps included with the vite dev server if they had a cache busting query parameter in the URL. Fixed some scenarios to ensure that the sourcemaps that were included by the vite dev server were inlined. Addressed in #30606.
Misc:
- Updated the protocol to be able to flex logic based on project config. Addresses #30560.
13.15.2​
13.15.2​
Released 11/5/2024
Bugfixes:
- Fixed an issue where the Cypress runner could hang in
after
orafterEach
hooks that run Cypress commands after a page load timeout error occurs. Addresses #30238.
Misc:
- Fixed a typo in CLI
global
option help text. Addresses #30531.
Dependency Updates:
- Updated
mobx
from5.15.4
to6.13.5
andmobx-react
from6.1.8
to9.1.1
. Addresses #30509. - Updated
@cypress/request
from3.0.4
to3.0.6
. Addressed in #30488.
13.15.1​
Released 10/24/2024
Bugfixes:
- Patched find-process to fix an issue where trying to clean up browser profiles can throw an error on Windows. Addresses #30378.
- Fixed an issue where requests to the same resource in rapid succession may not have the appropriate static response intercept applied if there are multiple intercepts that apply for that resource. Addresses #30375.
Misc:
- Cypress now consumes geckodriver to help automate the Firefox browser instead of marionette-client. Addresses #30217.
- Cypress now consumes webdriver to help automate the Firefox browser and firefox-profile to create a firefox profile and convert it to Base64 to save user screen preferences via
xulstore.json
. Addresses #30300 and #30301. - Spec information is now passed to protocol's
beforeSpec
to improve troubleshooting when reporting on errors. Addressed in #30316.
Dependency Updates:
- Updated
simple-git
from3.16.0
to3.25.0
. Addressed in #30076.
13.15.0​
Released 9/25/2024
Features:
- Cypress now displays more actionable errors when a Test Replay upload takes too long, and more verbose messages when uncategorized errors occur during the upload process. Addressed in #30235.
Bugfixes:
- Fixed an issue where Firefox was incorrectly mutating the state of click events on checkboxes after Firefox version
129
and up. Addressed in #30245. - Fixed a regression introduced in 13.13.0 where 'Open in IDE' would not work for filepaths containing spaces and various other characters on Windows. Addresses #29820.
Misc:
- Pass along the related log to the
createSnapshot
function for protocol usage. Addressed in #30244.
Dependency Updates:
- Update
@cypress/request
from3.0.1
to3.0.4
. Addressed in #30194. - Updated
express
from4.19.2
to4.21.0
. This removes the CVE-2024-43796, CVE-2024-45590, and CVE-2024-43800 vulnerabilities being reported in security scans. Addresses #30241. - Update
launch-editor
from2.8.0
to2.9.1
. Addressed in #30247. - Updated
loader-utils
from1.4.0
to1.4.2
. This removes the CVE-2022-37601 vulnerability being reported in security scans. Addresses #28208. - Updated
send
from0.17.1
to0.19.0
. This removes the CVE-2024-43799 vulnerability being reported in security scans. Addressed in #30241.
13.14.2​
Released 9/4/2024
Bugfixes:
- Fixed an issue where Cypress could crash with a
WebSocket Connection Closed
error. Fixes #30100. - Fixed an issue where
cy.screenshot()
was timing out and Cypress was failing to start due toGLib-GIO-ERROR
error. Reverts #30109, the change to allow HiDPI screen for Wayland users. Fixes #30172 and #30160.
13.14.1​
Released 8/29/2024
Bugfixes:
- Fixed an issue where no description was available for the
experimentalJustInTimeCompile
feature inside the Cypress application settings page. Addresses #30126.
13.14.0​
Released 8/27/2024
Performance:
- Fixed a potential memory leak in the Cypress server when re-connecting to an unintentionally disconnected CDP connection. Fixes #29744. Addressed in #29988.
Features:
- Added new
experimentalJustInTimeCompile
configuration option for component testing. This option will only compile resources directly related to your spec, compiling them 'just-in-time' before spec execution. This should result in improved memory management and performance for component tests incypress open
andcypress run
modes, in particular for large component testing suites.experimentalJustInTimeCompile
is currently supported forwebpack
andvite
. Addresses #29244. .type({upArrow})
and.type({downArrow})
now also works for date, month, week, time, datetime-local and range input types. Addresses #29665.- Added a
CYPRESS_SKIP_VERIFY
flag to enable suppressing Cypress verification checks. Addresses #22243. - Updated the protocol to allow making Cloud API requests. Addressed in #30066.
- Passing
--browser
flag alone will automatically launch browser after being guided through project and/or testing type selection. Addressed in #28538.
Bugfixes:
- Fixed an issue where files outside the Cypress project directory were not calculating the bundle output path correctly for the
file:preprocessor
. Addresses #8599. - Fixed an issue where Cypress would not run if Node.js version
22.7.0
was being used with TypeScript and ES Modules. Fixes #30084. - Correctly determines current browser family when choosing between
unload
andpagehide
options in App Runner. Fixes #29880.
Misc:
- Allow HiDPI screen running Wayland to use Cypress window/browser by adding
--ozone-platform-hint=auto
flag to Electron's runtime argument. Addresses #20891.
Dependency Updates:
- Updated
detect-port
from1.3.0
to1.6.1
. Addressed in #30038.
13.13.3​
Released 8/14/2024
Bugfixes:
- A console error will no longer display in Chrome about a deprecated unload call originating from jQuery. Addressed in #29944.
- Fixed an issue where certain Test Replay upload error messages were too vague. Connection failures now report the precise system error, and the stall error message is reported rather than the vague, "The user aborted a request." Addressed in #29959.
Misc:
- Updated
cypress open
hints displayed after Cypress binary install. Addresses #29935.
Dependency Updates:
- Updated
image-size
from0.8.3
to1.1.1
. Addressed in #30023.
13.13.2​
Released 7/31/2024
Performance:
- Fixed a memory leak with command logs with Test Replay enabled. Addressed in #29939.
- Improved performance of
reduce
in a method within our proxy. Addressed in #29887.
Bugfixes:
- Fixed an issue where Yarn PnP was not working correctly with Cypress and
@cypress/webpack-batteries-included-preprocessor
. Fixes #27947.
Dependency Updates:
- Updated
@cypress/request
from3.0.0
to3.0.1
. Addresses #29863. - Updated
chrome-remote-interface
from0.33.0
to0.33.2
. Addressed in #29932. - Updated
mime
from2.4.4
to2.6.0
. Addressed in #29870. - Updated
strip-ansi
from6.0.0
to6.0.1
. Addressed in #29931.
13.13.1​
Released 7/16/2024
Bugfixes:
- Fixed an issue where unhandled
WebSocket connection closed
exceptions would be thrown when CDP connections rapidly connect, disconnect, and connect again while there are pending commands. Fixes #29572. - CLI output properly displays non-JSON response bodies when a Test Replay upload attempt returns a non-JSON response body for a non-200 status code. Addressed in #29801.
- Fixed an issue where the ReadStream used to upload a Test Replay recording could erroneously be re-used when retrying in cases of retryable upload failures. Fixes #29227.
- Fixed an issue where command snapshots were not being captured within the
cy.origin()
command within Test Replay. Addressed in #29828.
Dependency Updates:
- Updated
jquery
from3.1.1
to3.4.1
. Addresses #29822. Addressed in #29837. - Replaced
json-lint
withjson-parse-even-better-errors
. This removes the CVE-2021-23358 vulnerability being reported in security scans. Addresses #28207. - Updated
minimatch
from3.0.4
to3.1.2
. Addressed in #29821.
13.13.0​
Released 7/02/2024
Performance:
- Improved performance of
experimentalSourceRewriting
option. Fixed in #29540.
Features:
- Adds Signal support for Angular Component Testing versions 17.2 and up. Addresses #29264.
Bugfixes:
- Fixed an issue where Chrome launch instances would not recreate the browser CRI client correctly after recovering from an unexpected browser closure. Fixes #27657. Fixed in #29663.
- Fixed an issue where Firefox 129 (Firefox Nightly) would not launch with Cypress. Fixes #29713. Fixed in #29720.
Dependency Updates:
- Updated
launch-editor
from2.3.0
to2.8.0
. Addressed in #29770. - Updated
memfs
from3.4.12
to3.5.3
. Addressed in #29746. - Updated
tmp
from0.2.1
to0.2.3
. Addresses #29693. - Updated
ws
from5.2.3
to5.2.4
. Addressed in #29698.
13.12.0​
Released 6/18/2024
Features:
- Added Component Testing support for Angular version 18. Addresses #29309.
Bugfixes:
- We now trigger
input
andchange
events when typing{upArrow}
and{downArrow}
via.type()
oninput[type=number]
elements. Fixes #29611. - Fixed an issue where auto scrolling the reporter would sometimes be disabled without the user's intent. Fixes #25084.
- Fixed an issue where
inlineSourceMaps
was still being used whensourceMaps
was provided in a user's TypeScript config for TypeScript version 5. Fixes #26203. - When capture protocol script fails verification, an appropriate error is now displayed. Previously, an error regarding Test Replay archive location was shown. Addressed in #29603.
- Fixed an issue where receiving HTTP responses with invalid headers raised an error. Now Cypress removes the invalid headers and gives a warning in the console with debug mode on. Fixes #28865.
Misc:
- Report afterSpec durations to Cloud API when running in record mode with Test Replay enabled. Addressed in #29500.
Dependency Updates:
- Updated firefox-profile from
4.3.1
to4.6.0
. Addressed in #29662. - Updated typescript from
4.7.4
to5.3.3
. Addressed in #29568. - Updated url-parse from
1.5.9
to1.5.10
. Addressed in #29650.
13.11.0​
Released 6/4/2024
Performance:
- Improved performance when setting console props within
Cypress.log
. Addressed in #29501.
Features:
- Added support for Next.js 14 for component testing. Addresses #28185.
- Added an
IGNORE_CHROME_PREFERENCES
environment variable to ignore Chrome preferences when launching Chrome. Addresses #29330.
Bugfixes:
- Fixed a situation where the Launchpad would hang if the project config had not been loaded when the Launchpad first queries the current project. Fixes #29486.
- Pre-emptively fix behavior with Chrome for when
unload
events are forcefully deprecated by usingpagehide
as a proxy. Fixes #29241.
Misc:
- Enhanced the type definitions available to
cy.intercept()
andcy.wait()
. Thebody
property of both the request and response in an interception can optionally be specified with user-defined types. Addresses #29507.
13.10.0​
Released 5/21/2024
Features:
Bugfixes:
- Fixed an issue where orphaned Electron processes were inadvertently terminating the browser's CRI client. Fixes #28397. Fixed in #29515.
- Fixed an issue where Cypress would use the wrong URL to upload Test Replay recordings when it wasn't able to determine the upload URL. It now displays an error when the upload URL cannot be determined, rather than a "Request Entity Too Large" error. Addressed in #29512.
- Fixed an issue where Cypress was unable to search in the Specs list for files or folders containing numbers. Fixes #29034.
- Fixed an issue setting the
x-cypress-file-path
header when there are invalid header characters in the file path. Fixes #25839. - Fixed the display of some command assertions. Fixed in #29517.
Dependency Updates:
- Updated js-cookie from
2.2.1
to3.0.5
. Addressed in #29497. - Updated randomstring from
1.1.5
to1.3.0
. Addressed in #29503.
13.9.0​
Released 5/7/2024
Features:
- Added more descriptive error messages when Test Replay fails to record or upload. Addresses #29022.
Bugfixes:
- Fixed a bug where promises rejected with
undefined
were failing insidecy.origin()
. Addresses #23937. - We now pass the same default Chromium flags to Electron as we do to Chrome. As a result of this change, the application under test's
navigator.webdriver
property will now correctly betrue
when testing in Electron. Fixes #27939. - Fixed network issues in requests using fetch for users where Cypress is run behind a proxy that performs HTTPS decryption (common among corporate proxies). Fixes #29171.
- Fixed an issue where extra windows weren't being closed between specs in Firefox causing potential issues in subsequent specs. Fixes #29473.
Misc:
- Improved accessibility of the Cypress App in some areas. Addressed in #29322.
Dependency Updates:
- Updated electron from
27.1.3
to27.3.10
to address CVE-2024-3156. Addressed in #29431.
13.8.1​
Released 4/23/2024
Performance:
- Fixed a performance issue with activated service workers that aren't controlling clients which could lead to correlation timeouts. Fixes #29333 and #29126.
Bugfixes:
- Fixed a regression introduced in 13.6.0 where Cypress would occasionally exit with status code 1, even when a test run was successful, due to an unhandled WebSocket exception (
Error: WebSocket connection closed
). Addresses #28523. - Fixed an issue where Cypress would hang on some commands when an invalid
timeout
option was provided. Fixes #29323.
Misc:
.its()
type now excludes null and undefined. Fixes #28872.
Dependency Updates:
- Updated zod from
3.20.3
to3.22.5
. Addressed in #29367.
13.8.0​
Released 4/18/2024
Features:
- Added support for
webpack-dev-server
v5
to@cypress/webpack-dev-server
. Addresses #29305.
Bugfixes:
- Fixed a regression introduced in 13.7.3 where Cypress could hang handling long assertion messages. Fixes #29350.
Misc:
- The
SEMAPHORE_GIT_PR_NUMBER
environment variable from Semaphore CI is now captured to display the linked PR number in the Cloud. Addressed in #29314.
13.7.3​
Released 4/11/2024
Bugfixes:
- Fixed an issue where asserts with custom messages weren't displaying properly. Fixes #29167.
- Fixed an issue where Cypress launch arguments were not being escaped correctly with multiple values inside quotes. Fixes #27454.
Misc:
- Updated the Chrome flags to not show the "Enhanced Ad Privacy" dialog. Addresses #29199.
- Suppresses benign warnings that reference Vulkan on GPU-less hosts. Addresses #29085. Addressed in #29278.
13.7.2​
Released 4/2/2024
Performance:
Bugfixes:
- Fixed an issue where Cypress was not executing beyond the first spec in
cypress run
for versions of Firefox 124 and up when a custom user agent was provided. Fixes #29190. - Fixed a bug where fields using arrays in
cypress.config
are not correctly processed. Fixes #27103. Fixed in #27312. - Fixed a hang where Cypress would run indefinitely while recording to the cloud when CDP disconnects during the middle of a test. Fixes #29209.
- Fixed a bug where option values containing quotation marks could not be selected. Fixes #29213.
Dependency Updates:
- Updated express from
4.17.3
to4.19.2
. Addressed in #29211.
13.7.1​
Released 3/21/2024
Bugfixes:
- Fixed an issue where Cypress was not executing beyond the first spec in
cypress run
for versions of Firefox 124 and up. Fixes #29172. - Fixed an issue blurring shadow dom elements. Fixed in #29125.
Dependency Updates:
- Updated jose from
4.11.2
to4.15.5
. Addressed in #29086.
13.7.0​
Released 3/13/2024
Features:
- Added shadow DOM snapshot support within Test Replay in order to highlight elements correctly within the Cypress reporter. Addressed in #28823.
- Added TypeScript support for Vue 2.7+. Addresses #28591.
- Adds additional context to error messages displayed when Test Replay artifacts fail to upload. Addressed in #28986.
Performance:
- Fixed a performance regression from 13.6.3 where unhandled service worker requests may not correlate correctly. Fixes #28868.
- Reduces the number of attempts to retry failed Test Replay artifact uploads from 8 to 3, to reduce time spent on artifact upload attempts that will not succeed. Addressed in #28986.
Bugfixes:
- Changed screenshot capture behavior in Chromium to activate the main Cypress tab before capturing. This prevents screenshot capture from timing out in certain situations. Fixed in #29038. Fixes #5016
- Fixed an issue where
.click()
commands on children of disabled elements would still produce "click" events -- even without{ force: true }
. Fixes #28788. - Changed RequestBody type to allow for boolean and null literals to be passed as body values. #28789.
Misc:
- Changed Component Testing scaffolding instruction to
pnpm add
to add framework dependencies when a project usespnpm
as package manager. Addresses #29052. - Command messages in the Cypress command logs will now truncate display at 100 lines instead of 50. Fixes #29023.
- Capture the
beforeTest
timestamp inside the browser for the purposes of accurately determining test start for Test Replay. Addressed in #29061.
Dependency Updates:
- Updated
jimp
from0.14.0
to0.22.12
. Addressed in #29055. - Updated
http-proxy-middleware
from2.0.4
to2.0.6
. Addressed in #28902. - Updated
signal-exit
from3.0.3
to3.0.7
. Addressed in #28979.
13.6.6​
Released 2/22/2024
Bugfixes:
13.6.5​
Released 2/20/2024
Bugfixes:
- Fixed tests hanging when the Chrome browser extension is disabled. Fixes #28392.
- Fixed an issue which caused the browser to relaunch after closing the browser from the Launchpad. Fixes #28852.
- Fixed an issue with the unzip promise never being rejected when an empty error happens. Fixed in #28850.
- Fixed a regression introduced in 13.6.3 where Cypress could crash when processing service worker requests through our proxy. Fixes #28950.
- Fixed incorrect type definition of
dom.getContainsSelector
. Fixed in #28339.
Misc:
- Improved accessibility of the Cypress App in some areas. Addressed in #28774.
- Changed references of LayerCI to webapp.io. Addressed in #28874.
Dependency Updates:
- Upgraded
electron
from25.8.4
to27.1.3
. - Upgraded bundled Node.js version from
18.15.0
to18.17.0
. - Upgraded bundled Chromium version from
114.0.5735.289
to118.0.5993.117
. - Updated buffer from
5.6.0
to5.7.1
. Addressed in #28934. - Updated
duplexify
from4.1.1
to4.1.2
. Addressed in #28941. - Updated
is-ci
from3.0.0
to3.0.1
. Addressed in #28933.
13.6.4​
Released 1/30/2024
Performance:
- Fixed a performance regression from 13.3.2 where aborted requests may not correlate correctly. Fixes #28734.
Bugfixes:
- Fixed an issue with capturing assets for Test Replay when service workers are registered in Cypress support files. This issue would cause styles to not render properly in Test Replay. Fixes #28747.
Misc:
- Added missing properties to the
Cypress.spec
interface for TypeScript users. Addresses #27835.
13.6.3​
Released 1/16/2024
Bugfixes:
- Force
moduleResolution
tonode
when TypeScript projects are detected to correctly run Cypress. This change should not have a large impact ascommonjs
is already forced whents-node
is registered. This fix does not impact the ESM TypeScript configuration loader. Fixes #27731. - No longer wait for additional frames when recording a video for a spec that was skipped by the Cloud due to Auto Cancellation. Fixes #27898.
- Now
node_modules
will not be ignored if a project path or a provided path to spec files contains it. Fixes #23616. - Updated display of assertions and commands with a URL argument to escape markdown formatting so that values are displayed as is and assertion values display as bold. Fixes #24960 and #28100.
- When generating assertions via Cypress Studio, the preview of the generated assertions now correctly displays the past tense of 'expected' instead of 'expect'. Fixed in #28593.
- Fixed a regression in 13.6.2 where the
body
element was not highlighted correctly in Test Replay. Fixed in #28627. - Correctly sync
Cypress.currentRetry
with secondary origin so test retries that leveragecy.origin()
render logs as expected. Fixes #28574. - Fixed an issue where some cross-origin logs, like assertions or cy.clock(), were getting too many dom snapshots. Fixes #28609.
- Fixed asset capture for Test Replay for requests that are routed through service workers. This addresses an issue where styles were not being applied properly in Test Replay and
cy.intercept()
was not working properly for requests in this scenario. Fixes #28516. - Fixed an issue where visiting an
http://
site would result in an infinite reload/redirect loop in Chrome 114+. Fixes #25891. - Fixed an issue where requests made from extra tabs do not include their original headers. Fixes #28641.
- Fixed an issue where
cy.wait()
would sometimes throw an error reading a property of undefined when returning responses. Fixes #28233.
Performance:
- Fixed a performance regression from 13.3.2 where requests may not correlate correctly when test isolation is off. Fixes #28545.
Dependency Updates:
- Remove dependency on
@types/node
package. Addresses #28473. - Updated
@cypress/unique-selector
to include a performance optimization. It's possible this could improve performance of the selector playground. Addressed in #28571. - Replace
CircularJSON
with its successorflatted
version3.2.9
. This resolves decoding issues observed in complex objects sent from the browser. Addressed in #28683. - Updated
better-sqlite3
from8.7.0
to9.2.2
to fix macOS Catalina issues. Addresses #28697.
Misc:
- Improved accessibility of some areas of the Cypress App. Addressed in #28628.
- Updated some documentation links to go through on.cypress.io. Addressed in #28623.
13.6.2​
Released 12/26/2023
Bugfixes:
- Fixed a regression in 13.6.1 where a malformed URI would crash Cypress. Fixes #28521.
- Fixed a regression in 12.4.0 where erroneous
<br>
tags were displaying in error messages in the Command Log making them less readable. Fixes #28452.
Performance:
- Improved performance when finding unique selectors for command log snapshots for Test Replay. Addressed in #28536.
Dependency Updates:
- Updated ts-node from
10.9.1
to10.9.2
. Cypress will longer error duringcypress run
orcypress open
when using typescript 5.3.2+ withextends
intsconfig.json
. Addresses #28385.
13.6.1​
Released 12/5/2023
Bugfixes:
- Fixed an issue where pages or downloads opened in a new tab were missing basic auth headers. Fixes #28350.
- Fixed an issue where request logging would default the
message
to theargs
of the currently running command even though thoseargs
would not apply to the request log and are not displayed. If theargs
are sufficiently large (e.g. when running thecy.task
from the code-coverage plugin) there could be performance/memory implications. Addressed in #28411. - Fixed an issue where commands would fail with the error
must only be invoked from the spec file or support file
if the project'sbaseUrl
included basic auth credentials. Fixes #27457 and #28336. - Fixed an issue where some URLs would timeout in pre-request correlation. Addressed in #28427.
- Cypress will now correctly log errors and debug logs on Linux machines. Fixes #5051 and #24713.
Misc:
13.6.0​
Released 11/21/2023
Features:
- Added an activity indicator to CLI output when artifacts (screenshots, videos, or Test Replay) are being uploaded to the cloud. Addresses #28239. Addressed in #28277.
- When artifacts are uploaded to the Cypress Cloud, the duration of each upload will be displayed in the terminal. Addresses #28237.
Bugfixes:
- We now allow absolute paths when setting
component.indexHtmlFile
in the Cypress config. Fixes #27750. - Fixed an issue where dynamic intercept aliases now show with alias name instead of "no alias" in driver. Addresses #24653
- Fixed an issue where aliasing individual requests with
cy.intercept()
led to an error when retrieving all of the aliases withcy.get(@alias.all)
. Addresses #25448 - The URL of the application under test and command error "Learn more" links now open externally instead of in the Cypress-launched browser. Fixes #24572.
- Fixed issue where some URLs would timeout in pre-request correlation. Addressed in #28354.
Misc:
- Browser tabs and windows other than the Cypress tab are now closed between tests in Chromium-based browsers. Addressed in #28204.
- Cypress now ensures the main browser tab is active before running each command in Chromium-based browsers. Addressed in #28334.
Dependency Updates:
- Upgraded
chrome-remote-interface
from0.31.3
to0.33.0
to increase the max payload from 100MB to 256MB. Addressed in #27998.
13.5.1​
Released 11/14/2023
Bugfixes:
- Fixed a regression in 13.5.0 where requests cached within a given spec may take longer to load than they did previously. Addresses #28295.
- Fixed an issue where pages opened in a new tab were missing response headers, causing them not to load properly. Fixes #28293 and #28303.
- We now pass a flag to Chromium browsers to disable default component extensions. This is a common flag passed during browser automation. Fixed in #28294.
13.5.0​
Released 11/8/2023
Features:
Bugfixes:
- Fixed an issue in chromium based browsers, where global style updates can trigger flooding of font face requests in DevTools and Test Replay. This can affect performance due to the flooding of messages in CDP. Fixes #28150 and #28215.
- Fixed a regression in 13.3.3 where Cypress would hang on loading shared workers when using
cy.reload
to reload the page. Fixes #28248. - Fixed an issue where network requests made from tabs, or windows other than the main Cypress tab, would be delayed. Fixes #28113.
- Fixed an issue with 'other' targets (e.g. pdf documents embedded in an object tag) not fully loading. Fixes #28228 and #28162.
- Fixed an issue where clicking a link to download a file could cause a page load timeout when the download attribute was missing. Note: download behaviors in experimental WebKit are still an issue. Fixes #14857.
- Fixed an issue to account for canceled and failed downloads to correctly reflect these status in Command log as a download failure where previously it would be pending. Fixed in #28222.
- Fixed an issue determining visibility when an element is hidden by an ancestor with a shared edge. Fixes #27514.
- We now pass a flag to Chromium browsers to disable Chrome translation, both the manual option and the popup prompt, when a page with a differing language is detected. Fixes #28225.
- Stopped processing CDP events at the end of a spec when Test Isolation is off and Test Replay is enabled. Addressed in #28213.
13.4.0​
Released 10/30/2023
Features:
- Introduced experimental configuration options for advanced retry logic: adds
experimentalStrategy
andexperimentalOptions
keys to theretry
configuration key. See Experimental Flake Detection Features for more information. Addressed in #27930.
Bugfixes:
- Fixed a regression in 13.3.2 where Cypress would crash with 'Inspected target navigated or closed' or 'Session with given id not found'. Fixes #28141 and #28148.
13.3.3​
Released 10/24/2023
Bugfixes:
- Fixed a performance regression in 13.3.1 with proxy correlation timeouts and requests issued from web and shared workers. Fixes #28104.
- Fixed a performance problem with proxy correlation when requests get aborted and then get miscorrelated with follow up requests. Addressed in #28094.
- Fixed a regression in 10.0.0, where search would not find a spec if the file name contains "-" or "_", but search prompt contains " " instead (e.g. search file "spec-file.cy.ts" with prompt "spec file"). Fixes #25303.
13.3.2​
Released 10/18/2023
Bugfixes:
- Fixed a performance regression in 13.3.1 with proxy correlation timeouts and requests issued from service workers. Fixes #28054 and #28056.
- Fixed an issue where proxy correlation would leak over from a previous spec causing performance problems,
cy.intercept
problems, and Test Replay asset capturing issues. Addressed in #28060. - Fixed an issue where redirects of requests that knowingly don't have CDP traffic should also be assumed to not have CDP traffic. Addressed in #28060.
- Fixed an issue with Accept Encoding headers by forcing gzip when no accept encoding header is sent and using identity if gzip is not sent. Fixes #28025.
Dependency Updates:
- Upgraded
@babel/core
from7.22.9
to7.23.2
to address the SNYK-JS-SEMVER-3247795 security vulnerability. Addressed in #28063. - Upgraded
@babel/traverse
from7.22.8
to7.23.2
to address the SNYK-JS-BABELTRAVERSE-5962462 security vulnerability. Addressed in #28063. - Upgraded
react-docgen
from6.0.0-alpha.3
to6.0.4
to address the SNYK-JS-BABELTRAVERSE-5962462 security vulnerability. Addressed in #28063.
13.3.1​
Released 10/11/2023
Bugfixes:
- Fixed an issue where requests were correlated in the wrong order in the proxy. This could cause an issue where the wrong request is used for
cy.intercept
or assets (e.g. stylesheets or images) may not properly be available in Test Replay. Addressed in #27892. - Fixed an issue where a crashed Chrome renderer can cause the Test Replay recorder to hang. Addressed in #27909.
- Fixed an issue where multiple responses yielded from calls to
cy.wait()
would sometimes be out of order. Fixes #27337. - Fixed an issue where requests were timing out in the proxy. This could cause an issue where the wrong request is used for
cy.intercept
or assets (e.g. stylesheets or images) may not properly be available in Test Replay. Addressed in #27976. - Fixed an issue where Test Replay couldn't record tests due to issues involving
GLIBC
. Fixed deprecation warnings during the rebuild of better-sqlite3. Fixes #27891 and #27902. - Enables test replay for executed specs in runs that have a spec that causes a browser crash. Addressed in #27786.
13.3.0​
Released 09/27/2023
Features:
- Introduces new layout for Runs page providing additional run information. Addresses #27203.
Bugfixes:
- Fixed an issue where actionability checks trigger a flood of font requests. Removing the font requests has the potential to improve performance and removes clutter from Test Replay. Addressed in #27860.
- Fixed network stubbing not permitting status code 999. Fixes #27567. Addressed in #27853.
13.2.0​
Released 09/12/2023
Features:
- Adds support for Nx users who want to run Angular Component Testing in parallel. Addressed in #27723.
Bugfixes:
- Edge cases where
cy.intercept()
would not properly intercept and asset response bodies would not properly be captured for Test Replay have been addressed. Addressed in #27771. - Fixed an issue where
enter
,keyup
, andspace
events were not triggeringclick
events properly in some versions of Firefox. Addressed in #27715. - Fixed a regression in
13.0.0
where tests using Basic Authorization can potentially hang indefinitely on chromium browsers. Addressed in #27781.
Dependency Updates:
- Upgraded Electron from
21.0.0
to25.8.0
, which updates bundled Chromium from106.0.5249.51
to114.0.5735.289
. Additionally, the Node version binary has been upgraded from16.16.0
to18.15.0
. This does NOT have an impact on the node version you are using with Cypress and is merely an internal update to the repository & shipped binary. Addressed in #27715. Addresses #27595.
13.1.0​
Released 08/31/2023
Features:
- Introduces a status icon representing the
latest
test run in the Sidebar for the Runs Page. Addresses #27206.
Bugfixes:
- Fixed a regression introduced in Cypress 13.0.0 where the Module API,
after:run
, andafter:spec
results did not include thestats.skipped
field for each run result. Fixes #27694. Addressed in #27695. - Individual CDP errors that occur while capturing data for Test Replay will no longer prevent the entire run from being available. Addressed in #27709.
- Fixed an issue where the release date on the
v13
landing page was a day behind. Fixed in #27711. - Fixed an issue where fatal protocol errors would leak between specs causing all subsequent specs to fail to upload protocol information. Fixed in #27720
- Updated
plist
from3.0.6
to3.1.0
to address CVE-2022-37616 and CVE-2022-39353. Fixed in #27710.
13.0.0​
Released 08/29/2023
Summary:
When recording to Cypress Cloud, users now receive our newest feature: Test Replay. Test Replay brings the debugging experience you know and love from the Cypress app directly into your recorded tests in Cypress Cloud.
Previously, trying to debug failures and flake in CI was painful and time consuming with only videos & screenshots. Test Replay provides a way to inspect the DOM, network events, and console logs of your application from your tests exactly as they ran in CI.
Test Replay is available in all Cypress Cloud plans. To start using Test Replay, simply record a run to Cypress Cloud. Learn more in the Test Replay documentation.
Test Replay now serves as the primary replacement for debugging via video. Video capture and videoCompression
of captured video are now set to false
by default and videoUploadOnPasses
is removed.
Read more about v13.0.0 in our blog post.
Breaking Changes:
Refer to the v13 Migration Guide for help migrating your code.
- The
video
configuration option now defaults tofalse
. Addresses #26157. - The
videoCompression
configuration option now defaults tofalse
. Addresses #26160. - The
videoUploadOnPasses
configuration option has been removed. Please see our screenshots & videos guide on how to accomplish similar functionality. Addresses #26899. - Requests for assets at relative paths for component testing are now correctly forwarded to the dev server. Fixes #26725.
- The
cy.readFile()
command is now retry-able as a query command. This should not affect any tests using it; the functionality is unchanged. However, it can no longer be overwritten usingCypress.Commands.overwrite()
. Addressed in #25595. - The deprecated configuration option
nodeVersion
has been removed. Addresses #27016. - The properties and values returned by the Module API and included in the arguments of handlers for the
after:run
andafter:spec
have been changed to be more consistent. Addresses #23805. - For Cypress Cloud runs with Test Replay enabled, the Cypress Runner UI is now hidden during the run. This change was made to improve performance in situations where the Runner no longer needs to be rendered. If video is recorded during the run, the Runner will not be visible. In addition, if a screenshot with
capture: runner
is taken, the screenshot will be taken as if thecapture: viewport
option was passed. You can turn off this behavior by passing--runner-ui
. Addressed in #27482. - The browser and browser page unexpectedly closing in the middle of a test run are now gracefully handled. Addressed in #27592.
- Automation performance is now improved by switching away from websockets to direct CDP calls for Chrome and Electron browsers. Addressed in #27592.
- Edge cases where
cy.intercept
would not properly intercept have been addressed. Addressed in #27592. - Node 14 support has been removed and Node 16 support has been deprecated. Node 16 may continue to work with Cypress
v13
, but will not be supported moving forward to closer coincide with Node 16's end-of-life schedule. It is recommended that users update to at least Node 18. - The minimum supported TypeScript version is
4.x
.
Features:
- Added
--runner-ui
and--no-runner-ui
CLI flags to control whether the Cypress Runner UI is visible during a run. Addressed in #27582. - Consolidates and improves terminal output when uploading test artifacts to Cypress Cloud. Addressed in #27402
Bugfixes:
- Fixed an issue where Cypress's internal
tsconfig
would conflict with properties set in the user'stsconfig.json
such asmodule
andmoduleResolution
. Fixes #26308 and #27448. - Clarified Svelte 4 works correctly with Component Testing and updated dependencies checks to reflect this. It was incorrectly flagged as not supported. Fixes #27465.
- Resolve the
process/browser
global inside@cypress/webpack-batteries-included-preprocessor
to resolve toprocess/browser.js
in order to explicitly provide the file extension. File resolution must include the extension for.mjs
and.js
files inside ESM packages in order to resolve correctly. Fixes#27599. - Fixed an issue where the correct
pnp
process was not being discovered. Fixes #27562. - Fixed incorrect type declarations for Cypress and Chai globals that asserted them to be local variables of the global scope rather than properties on the global object. Fixes #27539. Fixed in #27540.
- Dev Servers will now respect and use the
port
configuration option if present. Fixes #27675.
Dependency Updates:
- Upgraded
@cypress/request
from^2.88.11
to^3.0.0
to address the CVE-2023-28155 security vulnerability. Addresses #27535. Addressed in #27495.
12.17.4​
Released 08/15/2023
Bugfixes:
- Fixed an issue where having
cypress.config
in a nested directory would cause problems with locating thecomponent-index.html
file when using component testing. Fixes #26400.
Dependency Updates:
- Upgraded
webpack
fromv4
tov5
. This means that we are now bundling youre2e
tests with webpack 5. We don't anticipate this causing any noticeable changes. However, if you'd like to keep bundling youre2e
tests with webpack 4 you can use the same process as before by pinning @cypress/webpack-batteries-included-preprocessor tov2.x.x
and hooking into the file:preprocessor plugin event. This will restore the previous bundling process. Additionally, if you're using @cypress/webpack-batteries-included-preprocessor already, a new version has been published to support webpackv5
. - Upgraded
tough-cookie
from4.0
to4.1.3
,@cypress/request
from2.88.11
to2.88.12
and@cypress/request-promise
from4.2.6
to4.2.7
to address a security vulnerability. Fixes #27261.
12.17.3​
Released 08/01/2023
Bugfixes:
- Fixed an issue where unexpected branch names were being recorded for cypress runs when executed by GitHub Actions. The
HEAD
branch name will now be recorded by default for pull request workflows if a branch name cannot otherwise be detected from user overrides or from local git data. Fixes #27389.
Performance:
- Fixed an issue where unnecessary requests were being paused. No longer sends
X-Cypress-Is-XHR-Or-Fetch
header and infers resource type off of the server pre-request object. Fixes #26620 and #26622.
12.17.2​
Released 07/20/2023
Bugfixes:
- Fixed an issue where commands would fail with the error
must only be invoked from the spec file or support file
if their arguments were mutated. Fixes #27200. - Fixed an issue where
cy.writeFile()
would erroneously fail with the errorcy.writeFile() must only be invoked from the spec file or support file
. Fixes #27097. - Fixed an issue where web workers could not be created within a spec. Fixes #27298.
12.17.1​
Released 07/10/2023
Bugfixes:
- Fixed invalid stored preference when enabling in-app notifications that could cause the application to crash. Fixes #27228.
- Fixed an issue with the TypeScript types of
cy.screenshot()
. Fixed in #27130.
Dependency Updates:
- Upgraded
@cypress/request
from2.88.10
to2.88.11
to address CVE-2022-24999 security vulnerability. Addressed in #27005.
12.17.0​
Released 07/06/2023
Features:
- Cypress Cloud users can now receive desktop notifications about their runs, including when one starts, finishes, or fails. Addresses #26686.
Bugfixes:
- Fixed issues where commands would fail with the error
must only be invoked from the spec file or support file
. Fixes #27149 and #27163. - Fixed a regression introduced in Cypress 12.12.0 where Cypress may fail to reconnect to the Chrome DevTools Protocol in Electron. Fixes #26900.
- Fixed an issue where chrome was not recovering from browser crashes properly. Fixes #24650.
- Fixed a race condition that was causing a GraphQL error to appear on the Debug page when viewing a running Cypress Cloud build. Fixed in #27134.
- Fixed a race condition in electron where the test window exiting prematurely during the browser launch process was causing the whole test run to fail. Addressed in #27167.
- Fixed minor issues with TypeScript types in the CLI. Fixes #24110.
- Fixed an issue where a value for the Electron debug port would not be respected if defined using the
ELECTRON_EXTRA_LAUNCH_ARGS
environment variable. Fixes #26711.
Dependency Updates:
- Update dependency semver to ^7.5.3. Addressed in #27151.
12.16.0​
Released 06/26/2023
Features:
- Added support for Angular 16.1.0 in Cypress Component Testing. Addresses #27049.
Bugfixes:
- Fixed an issue where certain commands would fail with the error
must only be invoked from the spec file or support file
when invoked with a large argument. Fixes #27099.
12.15.0​
Released 06/20/2023
Features:
- Added support for running Cypress tests with
Chrome's new
--headless=new
flag. Chrome versions 112 and above will now be run in theheadless
mode that matches theheaded
browser implementation. Addresses #25972. - Cypress can now test pages with targeted
Content-Security-Policy
andContent-Security-Policy-Report-Only
header directives by specifying the allow list via theexperimentalCspAllowList
configuration option. Addresses #1030. Addressed in #26483 - The
videoCompression
configuration option now accepts both a boolean or a Constant Rate Factor (CRF) number between1
and51
. ThevideoCompression
default value is still32
CRF and whenvideoCompression
is set totrue
the default of32
CRF will be used. Addresses #26658. - The Cypress Cloud data shown on the Specs page and Runs page will now reflect Cloud Runs that match the current Git tree if Git is being used. Addresses #26693.
Bugfixes:
- Fixed an issue where video output was not being logged to the console when
videoCompression
was turned off. Videos will now log to the terminal regardless of the compression value. Addresses #25945.
Dependency Updates:
- Removed
@cypress/mocha-teamcity-reporter
as this package was no longer being referenced. Addressed in #26938.
12.14.0​
Released 06/07/2023
Features:
- A new testing type switcher has been added to the Spec Explorer to make it easier to move between E2E and Component Testing. An informational overview of each type is displayed if it hasn't already been configured to help educate and onboard new users to each testing type. Addresses #26448, #26836 and #26837.
Bugfixes:
- Fixed an issue to now correctly detect Angular 16 dependencies (@angular/cli, @angular-devkit/build-angular, @angular/core, @angular/common, @angular/platform-browser-dynamic) during Component Testing onboarding. Addresses #26852.
- Ensures Git-related messages on the Runs page remain dismissed. Addresses #26808.
Dependency Updates:
- Upgraded
find-process
from1.4.1
to1.4.7
to address this Synk security vulnerability. Addressed in #26906. - Upgraded
firefox-profile
from4.0.0
to4.3.2
to address security vulnerabilities within sub-dependencies. Addressed in #26912.
12.13.0​
Released 05/23/2023
Features:
- Adds Git-related messages for the Runs page and Debug page when users aren't using Git or there are no recorded runs for the current branch. Addresses #26680.
Bugfixes:
- Reverted #26452 which introduced a bug that prevents users from using End to End with Yarn 3. Fixed in #26735. Fixes #26676.
- Moved
types
condition to the front ofpackage.json#exports
since keys there are meant to be order-sensitive. Fixed in #26630. - Fixed an issue where newly-installed dependencies would not be detected during Component Testing setup. Addresses #26685.
- Fixed a UI regression that was flashing an "empty" state inappropriately when loading the Debug page. Fixed in #26761.
- Fixed an issue in Component Testing setup where TypeScript version 5 was not properly detected. Fixes #26204.
Misc:
- Updated styling & content of Cypress Cloud slideshows when not logged in or no runs have been recorded. Addresses #26181.
- Changed the nomenclature of 'processing' to 'compressing' when terminal video output is printed during a run. Addresses #26657.
- Changed the nomenclature of 'Upload Results' to 'Uploading Screenshots & Videos' when terminal output is printed during a run. Addresses #26759.
12.12.0​
Released 05/09/2023
Features:
- Added a new informational banner to help get started with component testing from an existing end-to-end test suite. Addresses #26511.
Bugfixes:
- Fixed an issue in Electron where devtools gets out of sync with the DOM occasionally. Addresses #15932.
- Updated the Chromium renderer process crash message to be more terse. Addressed in #26597.
- Fixed an issue with
CYPRESS_DOWNLOAD_PATH_TEMPLATE
regex to allow multiple replacements. Addresses #23670.
Dependency Updates:
- Upgraded
plist
from3.0.5
to3.0.6
to address CVE-2022-26260 NVD security vulnerability. Addressed in #26631. - Upgraded
engine.io
from6.2.1
to6.4.2
to address CVE-2023-31125 NVD security vulnerability. Addressed in #26664. - Upgraded
@vue/test-utils
from2.0.2
to2.3.2
. Addresses #26575.
12.11.0​
Released 04/26/2023
Features:
- Added Component Testing support for Angular 16. Addresses #26044.
- The run navigation component on the Debug page will now display a warning message if there are more relevant runs than can be displayed in the list. Addresses #26288.
Bugfixes:
- Fixed an issue where setting
videoCompression
to0
would cause the video output to be broken.0
is now treated as false. Addresses #5191 and #24595. - Fixed an issue on the Debug page where the passing run status would appear even if the Cypress Cloud organization was over its monthly test result limit. Addresses #26528.
Misc:
- Cleaned up our open telemetry dependencies, reducing the size of the open telemetry modules. Addressed in #26522.
Dependency Updates:
12.10.0​
Released 04/17/2023
Features:
- The Component Testing setup wizard will now show a warning message if an issue is encountered with an installed third party framework definition. Addresses #25838.
Bugfixes:
- Capture the Azure CI provider's environment
variable
SYSTEM_PULLREQUEST_PULLREQUESTNUMBER
to display the linked PR number in the Cloud. Addressed in #26215. - Fixed an issue in the onboarding wizard where project framework & bundler
would not be auto-detected when opening directly into component testing mode
using the
--component
CLI flag. Fixes #22777 and #26388. - Updated to use the
SEMAPHORE_GIT_WORKING_BRANCH
Semaphore CI environment variable to correctly associate a Cloud run to the current branch. Previously this was incorrectly associating a run to the target branch. Fixes #26309. - Fix an edge case in Component Testing where a custom
baseUrl
intsconfig.json
for Next.js 13.2.0+ is not respected. This was partially fixed in #26005, but an edge case was missed. Fixes #25951. - Correctly detect and resolve dependencies when configuring Component Testing in projects using Yarn's Plug'n'Play feature. Fixes #25960.
- Fixed an issue where
click
events fired on.type('{enter}')
did not propagate through shadow roots. Fixes #26392.
Misc:
- Removed unintentional debug logs. Addressed in #26411.
- Improved styling on the Runs Page. Addresses #26180.
Dependency Updates:
- Upgraded
commander
from^5.1.0
to^6.2.1
. Addressed in #26226. - Upgraded
minimist
from1.2.6
to1.2.8
to address this CVE-2021-44906 NVD security vulnerability. Addressed in #26254.
12.9.0​
Released 03/28/2023
Features:
- The Debug page now allows for navigating between all runs recorded for a commit. Addresses #25899 and #26018.
Bugfixes:
- Fixed a compatibility issue so that component test projects can use Vite version 4.2.0 and greater. Fixes #26138.
- Fixed an issue where
cy.intercept()
added an additionalcontent-length
header to spied requests that did not set acontent-length
header on the original request. Fixes #24407. - Changed the way that Git hashes are loaded so that non-relevant runs are excluded from the Debug page. Fixes #26058.
- Corrected the
.type()
command to account for shadow root elements when determining whether or not focus needs to be simulated before typing. Fixes #26198. - Fixed an issue where an incorrect working directory could be used for Git operations on Windows. Fixes #23317.
Misc:
- Made some minor styling updates to the Debug page. Addresses #26041.
12.8.1​
Released 03/15/2023
Bugfixes:
- Fixed a regression in Cypress 10 where the reporter auto-scroll configuration inside user preferences was unintentionally being toggled off. Users must now explicitly enable/disable auto-scroll under user preferences, which is enabled by default. Fixes #24171 and #26113.
Dependency Updates:
- Upgraded
ejs
from3.1.6
to3.1.8
to address this CVE-2022-29078 NVD security vulnerability. Addressed in #25279.
12.8.0​
Released 03/14/2023
Features:
- The Debug page is now able to show real-time results from in-progress runs. Addresses #25759.
- Added the ability to control whether a request is logged to the command log
via
cy.intercept()
by passinglog: false
orlog: true
. Addresses #7362.- This can be used to override Cypress's default behavior of logging all XHRs and fetches, see the example.
- It is now possible to control the number of connection attempts to the browser
using the
CYPRESS_CONNECT_RETRY_THRESHOLD
Environment Variable. Learn more here. Addressed in #25848.
Bugfixes:
- Fixed an issue where using
Cypress.require()
would throw the errorCannot find module 'typescript'
. Fixes #25885. - The
before:spec
API was updated to correctly support async event handlers inrun
mode. Fixes #24403. - Updated the Component Testing community framework definition detection logic to take into account monorepo structures that hoist dependencies. Fixes #25993.
- The onboarding wizard for Component Testing will now detect installed dependencies more reliably. Fixes #25782.
- Fixed an issue where Angular components would sometimes be mounted in unexpected DOM locations in component tests. Fixes #25956.
- Fixed an issue where Cypress component testing would fail to work with
Next.js
13.2.1
. Fixes #25951. - Fixed an issue where migrating a project from a version of Cypress earlier
than 10.0.0 could fail if the project's
testFiles
configuration was an array of globs. Fixes #25947.
Misc:
- Removed "New" badge in the navigation bar for the debug page icon. Addresses #25925.
- Removed inline "Connect" buttons within the Specs Explorer. Addresses #25926.
- Added an icon for "beta" versions of the Chrome browser. Addresses #25968.
Dependency Updates:
- Upgraded
mocha-junit-reporter
from2.1.0
to2.2.0
to be able to use new placeholders such as[suiteFilename]
or[suiteName]
when defining the test report name. Addressed in #25922.
12.7.0​
Released 02/24/2023
Features:
- It is now possible to set
hostOnly
cookies withcy.setCookie()
for a given domain. Addresses #16856 and #17527. - Added a Public API for third party component libraries to define a Framework Definition, embedding their library into the Cypress onboarding workflow. Learn more here. Implemented in #25780 and closes #25638.
- Added a Debug Page tutorial slideshow for projects that are not connected to Cypress Cloud. Addresses #25768.
- Updated the "new" status badge for the Debug page navigation link to be less noticeable when the navigation is collapsed. Addresses #25739.
- Improved various error message around interactions with the Cypress cloud. Implemented in #25837.
Bugfixes:
- Fixed an issue where cookies were being duplicated with the same hostname, but a prepended dot. Fixed an issue where cookies may not be expiring correctly. Fixes #25174, #25205 and #25495.
- Fixed an issue where cookies weren't being synced when the application was stable. Fixed in #25855. Fixes #25835.
- Added missing TypeScript type definitions for the
cy.reload()
command. Addressed in #25779. - Ensure Angular components are mounted inside the correct element. Fixes #24385.
- Fix a bug where files outside the project root in a monorepo are not correctly served when using Vite. Addressed in #25801.
- Fixed an issue where using
cy.intercept
'sreq.continue()
with a non-function parameter would not provide an appropriate error message. Fixed in #25884. - Fixed an issue where Cypress would erroneously launch and connect to multiple browser instances. Fixes #24377.
- Fixed various bugs when recording to the cloud. Fixed in #25837.
Misc:
- Made updates to the way that the Debug Page header displays information. Addresses #25796 and #25798.
12.6.0​
Released 02/15/2023
Features:
- Added a new CLI flag, called
--auto-cancel-after-failures
, that overrides the project-level "Auto Cancellation" value when recording to the Cloud. This gives Cloud users on Business and Enterprise plans the flexibility to alter the auto-cancellation value per run. Addressed in #25237. - It is now possible to overwrite query commands using
Cypress.Commands.overwriteQuery
. Addressed in #25078. - Added
Cypress.require()
for including dependencies within thecy.origin()
callback. This change removed support for usingrequire()
andimport()
directly within the callback because we found that it impacted performance not only for spec files using them within thecy.origin()
callback, but even for spec files that did not use them. Addresses #24976. - Added the ability to open the failing test in the IDE from the Debug page before needing to re-run the test. Addressed in #24850.
Bugfixes:
- When a Cloud user is a part of multiple Cloud organizations, the Connect to Cloud setup now shows the correct organizational prompts when connecting a new project. Fixes #25520.
- Fixed an issue where Cypress would fail to load any specs if the project
specPattern
included a resource that could not be accessed due to filesystem permissions. Fixes #24109. - Fixed an issue where the Debug page would display a different number of specs for in-progress runs than the in-progress specs reported in Cypress Cloud. Fixes #25647.
- Fixed an issue in middleware where error-handling code could itself generate an error and fail to report the original issue. Fixes #22825.
- Fixed an regression introduced in Cypress 12.3.0 where custom browsers that relied on process environment variables were not found on macOS arm64 architectures. Fixed in #25753.
Misc:
- Improved the UI of the Debug page. Addresses #25664, #25669, #25665, #25666, and #25667.
- Updated the Debug page sidebar badge to to show 0 to 99+ failing tests, increased from showing 0 to 9+ failing tests, to provide better test failure insights. Addresses #25662.
Dependency Updates:
12.5.1​
Released 02/2/2023
Bugfixes:
- Fixed a regression introduced in Cypress 12.5.0 where the
runnable
was not included in thetest:after:run
event. Fixes #25663.
Dependency Updates:
- Upgraded
simple-git
from3.15.0
to3.16.0
to address this security vulnerability where Remote Code Execution (RCE) via the clone(), pull(), push() and listRemote() methods due to improper input sanitization was possible. Addressed in #25603.
12.5.0​
Released 01/31/2023
Features:
- Easily debug failed CI test runs recorded to the Cypress Cloud from your local Cypress app with the new Debug page. Please leave any feedback here. Your feedback will help us make decisions to improve the Debug experience. For more details, see our blog post. Addressed in #25488.
Performance:
- Improved memory consumption in
run
mode by removing reporter logs for successful tests. Fixes #25230.
Bugfixes:
- Fixed an issue where alternative Microsoft Edge Beta, Canary, and Dev binary versions were not being discovered by Cypress. Fixes #25455.
Dependency Updates:
- Upgraded
underscore.string
from3.3.5
to3.3.6
to reference rebuilt assets after security patch to fix regular expression DDOS exploit. Addressed in #25574.
12.4.1​
Released 01/27/2023
Bugfixes:
- Fixed a regression from Cypress 12.4.0 where Cypress was not
exiting properly when running multiple Component Testing specs in
electron
inrun
mode. Fixes #25568.
Dependency Updates:
- Upgraded
ua-parser-js
from0.7.24
to0.7.33
to address this security vulnerability where crafting a very-very-long user-agent string with specific pattern, an attacker can turn the script to get stuck processing for a very long time which results in a denial of service (DoS) condition. Addressed in #25561.
12.4.0​
Released 1/24/2023
Features:
- Added official support for Vite 4 in component testing. Addresses #24969.
- Added new
experimentalMemoryManagement
configuration option to improve memory management in Chromium-based browsers. Enable this option withexperimentalMemoryManagement=true
if you have experienced "Out of Memory" issues. Please leave any feedback aroundexperimentalMemoryManagement
here. Your feedback will help us make decisions to improve memory issues. Addresses #23391. - Added new
experimentalSkipDomainInjection
configuration option to disable Cypress from settingdocument.domain
on injection, allowing users to test Salesforce domains. If you believe you are havingdocument.domain
issues, please see theexperimentalSkipDomainInjection
guide. This config option is end-to-end only. Addresses #2367, #23958, #24290, and #24418. - The
.as
command now accepts an options argument, allowing an alias to be stored as type "query" or "static" value. This is stored as "query" by default. Addresses #25173. - The
cy.log()
command will now display a line break where the\n
character is used. Addresses #24964. component.specPattern
now utilizes a JSX/TSX file extension when generating a new empty spec file if project contains at least one file with those extensions. This applies only to component testing and is skipped ifcomponent.specPattern
has been configured to exclude files with those extensions. Addresses #24495.- Added support for the
data-qa
selector in the Selector Playground in addition todata-cy
,data-test
anddata-testid
. Addresses #25305.
Bugfixes:
- Fixed an issue where component tests could incorrectly treat new major versions of certain dependencies as supported. Fixes #25379.
- Fixed an issue where new lines or spaces on new lines in the Command Log were not maintained. Fixes #23679 and #24964.
- Fixed an issue where Angular component testing projects would fail to initialize if an unsupported browserslist entry was specified in the project configuration. Fixes #25312.
Misc
- Video output link in
cypress run
mode has been added to its own line to make the video output link more easily clickable in the terminal. Addresses #23913.
12.3.0​
Released 1/03/2023
Features:
- Added support for mapping the
CYPRESS_PULL_REQUEST_ID
,CYPRESS_PULL_REQUEST_URL
, and/orCYPRESS_CI_BUILD_URL
environment variables to the corresponding Cloud run. This provides workarounds when supported CI provider mappings are incorrect or unsupported CI providers are used. Addressed in #25036. - Added new Cypress API,
Cypress.currentRetry
, to easily access the current test retry count. Addresses #25239.
Performance:
- Increased the pre-request proxy cleanup interval. The previous cleanup interval was too aggressive for projects loading a large number of JS modules, causing applications to load very slowly and in chunks. Fixed in #25209.
- Fixed an issue where browsers distributed as universal binaries (Chrome, Firefox) on M1 Macs could be launched in the wrong architecture, resulting in poor performance in-browser. Fixed in #25014.
- Resolved a delay that could occur on startup when using a custom Cypress
configuration file location in projects with a transitive
typescript
dependency. Fixes #24781.
Bugfixes:
- Fixes an issue where component test files that contained characters, such as
brackets (
[]
), would be ignored when running tests. This is a common pattern in Next.js and Gatsby.js projects. Fixes #24588. - Updated the Jenkins environment variable mappings so pull request data is correctly linked to the corresponding Cloud run. Fixed in #25036.
- Fixed a regression in 10.11.0 where the mocha test results no
longer sent the pending boolean to reporters. This caused the
mochaawesome
reporter to incorrectly report pending tests as pending and skipped. Fixes #24477. - Fix for regression introduced in 12.1.0, where
.contains()
could return multiple elements instead of one element when it was matching directly on the subject, rather than on the subject's children. Fixes #25225. - Fixed a small visual bug in the Test Runner such that Chrome users will no longer see a white border on the nav bar at the specific zoom levels. Fixes #25284.
Misc
- Remove the redundant
Need help
link from the migration information modal because the modal provides in-depth details for users already. Addresses #21923. - Minor UI updates were make to truncate the browser's name when it exceeds the allocated space and to only show the browsers's major version in the UI. Addresses #21730 and #21755.
- Removed the line break that was displayed on the Settings page when a configuration value was an empty object. Addresses #21790.
Dependency Updates:
- Upgraded
engine.io
from5.2.1
to6.2.1
to address this security vulnerability where a specially crafted HTTP request can trigger an uncaught exception on the Engine.IO server, thus killing the Node.js process. Addressed in #23843. - Upgraded
express
from4.17.1
to4.17.3
to address this NVD security vulnerability. Addressed in #23843. - Upgraded
simple-git
from3.4.0
to3.15.0
to address this NVD security vulnerability. Addressed in #23843.
12.2.0​
Released 12/20/2022
Features:
- Added the ability to match on
resourceType
withcy.intercept()
, and to see the resource type of an intercepted request asreq.resourceType
. Addresses #14525. - Users working in React Component Testing projects can now generate a basic spec file from the components that exist in their project. Addresses #24008.
Performance:
- Fixed a regression introduced in the Electron browser in
Cypress 10.8.0 where the
CYPRESS_EVERY_NTH_FRAME
environment variable was not being set appropriately causing all frames to be captured which slowed down tests. Fixes #23830.
Bugfixes:
- Fixed an issue where the
query
object was not available on requests fromcy.intercept()
once they were yielded. Fixes #25088. - Fixed an issue with Angular Component Testing where urls within SASS/SCSS files were not being correctly resolved which could result in incomplete styling. Fixes #24272.
- Fixed a regression introduced in Cypress 12 where
cy.get()
would ignore anull
value for thewithinSubject
option. Fixes #25104. - Fixed an issue where an unhandled promise rejection would display an incomplete error message in the command log. Fixes #24915.
- Fixed an issue where the incorrect Cypress version could be shown in the migration wizard. Fixes #25138.
- Fixed an issue where the Cypress migration wizard would fail to run in global mode on newer versions of Cypress. Addressed in #25138.
- Fixed an issue with Angular Component Testing where a custom
sourceRoot
configuration would not be respected. Fixes #24827. - Fixed TypeScript typings for
cy.nextUntil()
to include thefilter
parameter. Fixes #24772.
12.1.0​
Released 12/12/2022
Features:
- Added
cy.getAllCookies()
andcy.clearAllCookies()
, which get and clear cookies for all browser cookies across any domains. Addresses #24265, #8956, and #408. - Updated the error messaging to provide more context when parallel group parameters are mismatched when sent to the Cypress Cloud. Fixes #24734.
Bugfixes:
- Fixed an issue with the
cy.session
command where it now recollects the session data after validation is successful to correctly store the full browser context before the command ends. Addressed with #25112. - Fixed an issue where recent versions of Firefox in headless mode would behave inconsistently with headed. Fixes #24900.
- Fixed an issue where
.select(index)
would fail when multiple<option>
elements have the same value property. Fixes #24739. - Cleaned up temp files generated by
cypress run
. Addressed by #24957 - The Chrome web security configuration tooltip will now be shown only if
chromeWebSecurity
is set to false when using a non-chromium browser. Fixes #23846. - Fixed an issue where updating a component would not trigger the
supportFile
to reload imported stylesheets. This is fixed by doing a full reload for Vite, to ensure the spec re-runs correctly with the latest styles. Fixes #24874. - The Run All Specs experiment will now open in a new tab rather than close and reopen the browser. This will make the run faster and help mitigate #21743. Fixes #24919.
12.0.2​
Released 12/08/2022
Bugfixes:
- Fixed a regression in 12.0.0 where
.contains()
received multiple elements as a subject, it only searched inside the first one. Fixes #25025 - Fixed a regression in 12.0.0 around
.contains()
where if the subject was a<form>
element, it would only consider the first<input>
element in the form, rather than every child. Fixes #25019
12.0.1​
Released 12/06/2022
Bugfixes:
- Fixed a regression in 11.2.0 where a stale spec search pattern was shown in the spec search bar after re-launching Cypress. Fixes #24936
- Fixed a regression in 12.0.0 where tests scaffolded into new projects were using a removed api. Fixed in #25006
- Fixed regression in 12.0.0 where setting
e2e.testIsolation=false
caused invalid configuration validation when runningcypress run --component
. Fixes #25007 - Fixed a regression introduced in 12.0.0 that sometimes does not allow cy.origin() to communicate correctly with the navigated to domain. Fixes #25010
12.0.0​
Released 12/06/2022
Summary:
The Session and Origin Experiment is now generally available for end-to-end testing. This means Cypress now fully supports:
- Testing multiple origins in a single test with the new
cy.origin()
command. - Caching and restoring cookies,
localStorage
, andsessionStorage
between tests - Configuring
testIsolation
in suites to define whether or not the browser context is cleaned or persisted between tests
Additionally in this release, enhancements were made to how Cypress manages DOM element resolution to reduce the likelihood of hitting detached DOM errors due to maintaining stale DOM references. We've updated our Retry-ability Guide with all the details if you'd like to learn more.
Read more about 12.0 in our blog post.
Breaking Changes:
- Cypress dropped support for Node.js 12, 15 and 17. Those versions have reached end-of-life. Installing Cypress on your system now requires Node.js 14, 16 or 18+. Addressed in #24885.
- Cypress has always recommended writing tests in a clean context. In Cypress
12, we enforce running tests in a clean browser context through
test isolation.
This option is configurable, but is enabled by default. Whether enabled or
disabled, this changes how Cypress cleans up the browser context before each
test and you may experience test errors with this upgrade. To better
understand the full impact of this change, please review the
migration guide.
- In Cypress v12, the
testIsolation
configuration values have changed fromon
oroff
totrue
orfalse
. Addressed in #24935.
- In Cypress v12, the
- The
experimentalSessionAndOrigin
configuration option has been removed and all functionality associated with this experiment is now enabled by default, with the exception of usingrequire
andimport
with callback supplied to thecy.origin()
command. To leverage external dependencies incy.origin()
callbacks, set the newe2e.experimentalOriginDependencies
configuration option totrue
. Addresses #21471. - The
Cookies.defaults
andCookies.preserveOnce
APIs have been removed. Use the newcy.session()
command to preserve cookies between tests. Addresses #21472. - The
cy.server()
andcy.route()
commands have been removed. Additionally, the correspondingCypress.Server.defaults
API has also been removed. Use the [cy.intercept()
(/api/commands/intercept) command to stub network responses and requests. Addresses #22126. - The Cookie commands now uses the
hostname
as the domain by default instead of thesuperdomain
. This change aligns Cypress' cookie rules with the browser cookie rules. This may affect what cookies are returned bycy.getCookie()
, what cookies are set withcy.setCookie()
, and the cookies cleared withcy.clearCookies()
. Addresses #363, #5723 and #24526. - The
.within()
command now requires a single subject and throws an error if given more than one subject. This change adds consistency around how.within()
behaves across commands. Previously some commands inside a.within()
callback would silently select the first element, while others would use all of the previously yielded subjects, and others would throw an error. Addressed in #24975. - Cypress now throws an error if any Cypress commands are invoked from inside a
.should()
callback. This previously resulted in unusual and undefined behavior. Addresses #5963, #14656 and #22587. - The
.invoke()
command now throws an error if the invoked function returns a promise. If you wish to call a method that returns a promise and wait for it to resolve, use.then()
instead of.invoke()
. Addressed in #24417. - The
cy.request()
command now usesquerystringify
to stringify & parse theqs
options. This change aligns with how thecy.visit()
command generates urls with query parameters. Addressed in #20302.
Features:
- Added a new configuration option called
testIsolation
, which defaults totrue
. This option can be set at thee2e
or suite-level to determine whether or not test isolation is enabled to ensure a clean browser context between tests. Addressed in #22230. - The previously experimental Cypress command,
cy.origin()
, is now generally available in end-to-end testing. This command allows testing multiple origins in a single test. Addresses #17336. - The previously experimental Cypress command,
cy.session()
, is now generally available. This command caches and restorescookies
,localStorage
, andsessionStorage
in order to recreate a consistent browser context between tests. Addresses #20977. - Added a new Cypress command,
cy.getAllLocalStorage()
, to getlocalStorage
data for all origins with which the test has interacted. Addresses #24276. - Added a new Cypress command,
cy.clearAllLocalStorage()
, to clearlocalStorage
data for all origins with which the test has interacted. Addresses #24276. - Added a new Cypress command,
cy.getAllSessionStorage()
, to getsessionStorage
data for all origins with which the test has interacted. Addresses #24276. - Added a new Cypress command,
cy.clearAllSessionStorage()
, to clearsessionStorage
data for all origins with which the test has interacted. Addresses #24276. - Added a new configuration option called
experimentalOriginDependencies
, which defaults tofalse
. This option enables support forrequire
andimport
within the callback supplied to thecy.origin()
command in end-to-end testing. Previously this feature was enabled through theexperimentalSessionAndOrigin
configuration option.experimentalOriginDependencies
was added as a configuration option in Cypress 12, instead of being enabled by default, due to increased Node.js memory usage associated with this option that needs to be addressed before making this behavior generally available. See issue #24976 for more information. Addressed in #24931. - Added a new
Cypress.ensure
API which provides several methods that can be helpful when writing customs commands. Addressed in #24697. - Added a new "Run All" button to the
experimentalRunAllSpecs
experiment which enables running all spec files returned from thespecPattern
glob or an array of globs, regardless of the specs sharing a root folder. Addresses #24759. - Further improved bundling in the binary to reduce startup and unzip time. Addressed in #24909
Bugfixes:
- Fixed a regression in 10.11.0 where the Launchpad no longer showed a loading spinner on startup to indicate that it had successfully started and was in a loading state. Fixed #24950.
- Fixed the "Create Spec from Component" capability to correctly scaffold the component spec from a component which contains special characters in its name. Before this change, a spec was scaffolded with either the wrong spec name or the incorrect component import which led to invalid JS errors. Fixes #23492.
- Corrected Cypress environment variable resolution to correctly resolve
environment variables set with
npm config set
. Fixes #24556. - When
experimentalRunAllSpecs=true
, the "Run N specs" directory-level buttons in the Inline Specs List now function correctly when activated by the keyboard. Fixes #24762. - Fixed unexpected behaviors when verifying a cookie was not returned from
cy.getCookie()
. Now it's possible to explicitly assert the cookie did not exist withcy.getCookie('foo1').should('not.exist')
. Previously users had to verify cookies properties did not exist with.its('value').should('equal', null)
. Addressed in #24203. - Fixed the console output returned from clicking on an aliased intercept in the Command Log. It now logs the yielded request/response object associated to the intercepted call when clicked, where previously it did not log these details. Fixed in #24623.
11.2.0​
Released 11/22/2022
Features:
- Re-implemented the 'Run All Specs' for End to End Testing for running multiple
tests sequentially in open mode. This feature had been previously removed in
Cypress 10.0. Enable 'Run All Specs' with the new experimental flag,
experimentalRunAllSpecs
. Please leave any feedback around 'Run All Specs' here. Your feedback will help us make product decisions around the future of this feature. Addresses #24168 - Added messaging after failures in CI to direct people to set up recording to the Cypress Cloud if they are not already set up to do so. Addresses #24000.
- Visually warn in the Command Log when the
cy.session()
command fails to restore a session to surface to users potential issues with their setup and validation. Addresses #24207.
Bugfixes:
- The
cy.session()
command no longer clears the page between setup and validation and will now always clear the page at the end of the command when test isolation is on. Fixes #21397.
11.1.0​
Released 11/14/2022
Features:
- Next.js v13 is now supported. #24396
mount()
now accepts an extensions.directives option, which will be registered globally for Vue2 component testing. #24488
Bugfixes:
- Fixed an 11.0.0 regression where the migration workflow would error and hang for TypeScript projects. Fixes #24643
- Fixed an 11.0.0 regression where
cypress run
crashed when using the junit reporter and an assertion failed. Fixes #24652 - Fixed TypeScript types for
testIsolation
. Fixes #23911 - Sessions will no longer be stored if validation fails which will prevent a previously failed session from being restored in the next test. Fixes #24208
Experimental Breaking Changes:
- Updates were made to enhance the cy.session() recovered error experience. With this change, cy.session() will no longer fail validation when false is returned from the validate callback. Fixes #21398, #24205, and #24593.
11.0.1​
Released 11/09/2022
Bugfixes:
- Fixed an 11.0.0 regression that caused enabling
experimentalSessionAndOrigin
to throw a webpack error. Fixes #24611 - Fixed an 11.0.0 regression where using custom reporters would cause Cypress to throw a 'Cannot find module' error. Fixes #24607
- Fixed
testIsolation
configuration validation to allow configuration updates without restarting Cypress. Fixes #24497. - Fixed an issue where
cy.origin()
would not prevent users from setting upsame-superdomain-origin
cy.origin()
blocks. In these casescy.origin()
is not required and users would be better served by not using the command. Fixes #24169 - Fixed an 11.0.0 regression where modifying the currently loaded component testing spec in open mode does not trigger a rerun of the spec. Fixed by #24630
11.0.0​
Released 11/08/2022
Summary:
Component Testing is now generally available for projects using React, Next.js, Angular, and Vue!
Component tests allow you to see and test your application's components in a real browser as you work. You can use your favorite Cypress commands and features to develop your components without running your whole app. Learn more in our blog post.
We have also massively improved our startup performance by shipping a snapshot
of our binary instead of the source files. The performance boost applies to the
time it takes from running a cypress command (e.g. cypress open
) to when the
Cypress app is opened. Results will vary based on your situation, but we saw up
to 84% faster startup times!
Breaking Changes:
Read our Migration Guide which explains the breaking changes in more detail.
Component Testing:
- Removed
cssFile
,cssFiles
,style
,styles
,stylesheet
, andstylesheets
from theoptions
argument to thecy.mount()
function. We recommend writing test-specific styles in a separatecss
file you import in your test, or in yoursupportFile
. See migration guide. Addresses #24328. - Subsequent
cy.mount
calls within the same test will remove the last mounted component from the DOM. Addresses #24329. mountHook
fromcypress/react
has been removed. We recommend replacing it withmount
and a component. See migration guide. Addresses #24328.unmount
fromcypress/react
has been removed. We recommend using the API React provides for unmounting components, unmountComponentAtNode. See migration guide. Addresses #24328.mountCallback
fromcypress/vue
has been removed. We recommend usingmount
. See migration guide. Addresses #24328.mount
fromcypress/vue
now returns an object with both the VueWrapper (wrapper) and the component instance (component). Addresses #24342.- When providing an inline
viteConfig
inside ofcypress.config
, anyvite.config.js
file is not automatically merged. See migration guide. Addresses #24133. - Angular providers passed as part of the mounting options will be assigned at
the module level using the
TestBed.configureTestingModule
API. This means that module-level providers (resolved from imports or@Injectable({ providedIn: 'root' })
can be overridden, but providers specified in@Component({ providers: [...] })
will not be overridden when usingcy.mount(MyComponent, { providers: [...] })
. To override component-level providers, use theTestBed.overrideComponent
API. See migration guide. Addresses #24047 and #23427.
General:
- Communication with the Cypress Dashboard will now verify CAs and reject any
unauthorized calls. If you use a self-signed CA you will need to set
npm_config_ca
,npm_config_cafile
, orNODE_EXTRA_CA_CERTS
. Addresses #23980.
Experimental:
cy.session()
now requires a setup command to use the command. Addresses #24311.
Features:
- Incorporated V8 snapshots into the build process of the Electron binary to improve startup time and reduce the time to download and unzip the binary during installation. Startup time is the time from running a command to when Cypress's window is first opened. Addresses #18480.
cy.getCookie()
,cy.getCookies()
,cy.setCookie()
,cy.clearCookie()
, andcy.clearCookies()
now accept a domain option. Addresses #24264.
Bugfixes:
- Fix types associated with
cy.mount()
that were incorrectly typed asany
. Fixes #24330. - The
cy.mount()
snapshot now shows the mounted component instead of a blank page. Fixes #24138. - "Open in IDE" is no longer displayed in the command log for component tests. Fixes #24366.
- Cypress now correctly handles CSVs and other non-html MIME types. Fixes #24297.
- Cypress now supports project directories mounted on read-only file systems. Fixes #2064.
- Snapshots now capture the AUT correctly when it has navigated away. Fixes #24506.
cy.pause()
now functions correctly when called within thecy.origin()
callback. Fixes #21495.- When utilizing dependencies within the
cy.origin()
callback, errors now show the correct code frame. Fixes #23365. - The select dropdown (in Front-end Framework, Bundler, Organization, Project, Preferred Editor) now highlights and adds a checkmark to the selected option. Fixes #21768.
- The failure icon in the reporter header now displays correctly when there are a large number of successful tests. Fixes #21838.
- Cypress now allows more than twenty sessions to be created in a single test. Fixed in #24379.
10.11.0​
Released 10/25/2022
Features:
cy.session()
is now supported when using WebKit (Experimental) andexperimentalSessionAndOrigin
is enabled. Addresses #24116, #23832.- Improves user experience when connecting a project to the Dashboard. Addresses
#23379,
#23766,
#23767.
- Users will be prompted to connect a project to the Dashboard when logging in from the Cypress Launchpad after a testing type has been selected.
- Users will be prompted to record runs to the Dashboard from both the Cypress App and Cypress Launchpad if a project is connected to the Dashboard and has no recorded runs.
Bugfixes:
- When a chromium based browser tab or process crashes, Cypress will no longer hang indefinitely but will fail the current test and move on to the next. #6170.
- Fixed as issue where browser-skipped tests were incorrectly recorded to the Dashboard which resulted in the Dashboard marking the test as "new" or "modified" when it already existed. Fixes #23517.
- Fixed issue connecting to the cloud when a self-signed cert was in the cert chain. Fixes #24298.
cy.origin()
now supports more than 30 unique origin spec bridges per test. Fixes #22874, #23967.- Fixed an issue where
document.cookie
would not reflect the correct value in cross-origin tests. Fixes #23531. - Cypress will now restart on changes to the
blockHosts
configuration entry. Fixes #22634. - When shown the command to record runs to the cloud, the user can select and copy parts of the command (like the record key), instead of only being able to use the "Copy" button to copy the entire command. Fixes #22091.
- Cleaned up inconsistencies in the UI between sentence case and title case. Fixes #21854.
- Fixed an issue where there is a visible "Project ID" section (with no
projectId
) when user has not connected to the Dashboard. #21806.
Experimental Breaking Changes:
cy.origin()
now supports usingrequire()
and dynamicimport()
to include dependencies.Cypress.require()
has been removed. Addresses #24293.- The way that Cypress handles
test isolation
has changed. The previous modes of
legacy
andstrict
have been replaced withon
andoff
. Fixes #24206.- The default mode is
on
whenexperimentalSessionAndOrigin
is enabled. - The cy.session() command now inherits the test isolation behavior for the suite it runs in.
- The default mode is
10.10.0​
Released 10/11/2022
Features:
cy.origin()
's URL argument must be an exact origin match to the origin of the AUT. Addresses #23999, #23814, #24085, #22882, and #17166.- More accurately send/set cookies in
cy.origin()
whenexperimentalSessionAndOrigin
is enabled. Addresses #23551, #22670, and #23603. - Cypress will no longer watch files when executing component tests in "run" mode. Addresses #22959.
Bugfixes:
- Cypress is now able to connect to Firefox v105. Fixes #23897.
- Cypress component tests now correctly load assets with Angular. Fixes #23797.
- Imports in component testing support files are no longer tree-shaken by Webpack. Fixes #24117.
cy.session()
commands will correctly fail when the setup function has a failing command or assertion. Fixes #21399.ngOnChanges
is now called after mounting an Angular component in component testing. Fixes #23591.- Code frames for Vite project stack traces now point to the correct lines of source code. Fixes #23919.
- Uncaught exceptions are now only handled once in component testing. Fixes #23920.
- Nuxt and Angular component tests now fail on uncaught exceptions. Fixes #24122.
- Command log messages are once again being truncated to 50 lines. Fixes #23995.
Dependency Updates:
- Upgraded Electron from v19 to v21. Addressed in #23843.
10.9.0​
Released 9/27/2022
Features:
- Added support for requiring dependencies within the
cy.origin()
callback. See thecy.origin()
docs for more information. - Added support for visiting cross-origin pages outside of a
cy.origin()
callback. See thecy.origin()
andcy.visit()
docs for more information and caveats. Addresses #21485, #22282, #21300, and #23236. - Added support for re-using session data cached by
cy.session()
across specs via thecacheAcrossSpecs
option. Addresses #17710. - Added support for advanced dev server configuration via an async function that can optionally modify the dev server config. Addresses #23302.
- Launch options returned from the
before:browser:launch
event can now include anenv
key that can be used to pass environment variables to the browser when it is launched. Addressed by #23624. - Component tests that fail now display a code frame of the source location of the error within the Cypress reporter. Addresses #21720.
Bugfixes:
- The spec results printed stdout after a test run now show the path to the spec and not just the file name. Fixes #22304.
- The viewport dropdown in the Cypress App now displays the correct text. Fixes #23789.
- Compile errors are now surfaced in the command log during tests for Angular and Next projects. Fixes #23219.
- The error "Automatic publicPath is not supported in this browser" will no longer be displayed when using Webpack 5 and dynamic imports. Fixes #18435.
- The correct source control link is now sent to the Cypress Dashboard for failed specs when the cypress config file is not the project root. Fixes #22971.
- The error "Invalid left-hand-side in assignment" will no longer be thrown when
the
experimentalModifyObstructiveThirdPartyCode
flag is enabled. Fixes #23647. it.skip
now functions correctly in Angular component tests. Fixes #23409.- The
tsConfig
build option is now respected for Angular component tests. Fixes #23673. - Configuring a custom browser no longer logs a warning when trying to use that browser. Addressed in #23446.
Misc:
- Improved the accessibility of a few components within the Cypress Launchpad and App. Addressed in #23745.
- Improved the UI of the Sessions instrument panel in the Cypress reporter. Addresses #21400.
10.8.0​
Released 9/13/2022
Features:
- You can now run tests in WebKit, Safari's browser engine, by enabling the
experimentalWebKitSupport
experiment and installingplaywright-webkit
. For more details, read our blog post. Addresses #6422.
Performance:
- Several minor changes were made to reduce Cypress's memory footprint in the browser in an attempt to improve test times and reduce the likelihood of crashing the launched browser under test. Addressed in #23708, #23729, #23737, and #23738.
Bugfixes:
- The Dashboard will now correctly show whether a video of the spec was uploaded
to review. Before this change, the Dashboard would shows the error message
The media could not be loaded
when a passing test's video was not uploaded becausevideoUploadOnPasses
wasfalse
. Fixes #2939. - Fixed an issue where the stack traces in
run
mode did not match the stack traces shown inopen
mode. Now, in the terminal, users will see the source map line and column number in the error stack trace. Fixes #7715. - Fixed a bug where projects using Node.js 16.17+ and 18.6+ with ES Modules and TypeScript were not working with Cypress. Fixes #22795, #23393, and #23552.
- When searching for specs we now normalize OS-specific path separators so that Windows users can use back- and forward-slashes. Fixes #23426.
- Fixed an regression introduced in Cypress 10.3.0, and further
exposed in 10.4.0, that omitted
same-site
cookies when the URL Scheme, Domain, and Top Level Domain matched, but the ports are different (i.e. same-site). Fixes #23132. - Autoscrolling of the command log can no longer become disabled in
run
mode. This fixes an issue observed where the reporter randomly stops scrolling during a video recording and the Command log details are not visible. Fixes #16098 and #22199. - The
cypress/react18
cy.mount()
command's yielded rerender function has been updated to only create oneReactDom.Root
element. This fixes the issue where state did not persist between rerenders, and all lifecycle hooks were reran when executed. Fixes #23357. - Fixed a regression introduced in Cypress 10.0.0 where Cypress was incompatible with Chrome v64 - v70. Fixes #23509.
- Fixes an issue where outdated organization and project information could be shown in dialogs when connecting a project to the Cypress Dashboard. Fixes #23538.
- The
Sec-Fetch-Dest
metadata request header is now set todocument
when the request is sent from the Application Under Test when theexperimentalModifyObstructiveThirdPartyCode
experiment is enabled. This was updated to prevent Google Authentication from returning403 forbidden
in Edge and Electron. Fixes #23720. - Correctly override the Electron
userAgent
when theuserAgent
configuration option is provided orexperimentalModifyObstructiveThirdPartyCode
experiment is enabled. Fixes #23597. - Fix regression introduced by Cypress 10.0.0 where the
before:spec
plugin event was not triggered inopen
mode when theexperimentalInteractiveRunEvents
experiment was enabled. Fixed #22360. - Fixed a regression introduced in 10.4.0 where referencing an aliased custom command would return undefined. Fixes #23652.
- Users can now log into the Dashboard from the "Choose a browser" page of the Launchpad even if a browser is not open. Fixes #23779.
- Fixed a bug where the
cypress/svelte
cy.mount()
command was not logging by default. Fixed in #23771. - Fixed an issue where setting the
testIsolation
configuration at the suite-level would throw on the second test. Fixes #23644. - Removed misleading dependency warning in Launchpad for Next.js applications using component testing. Fixes #23598.
- Added
modifyObstructiveCode
TypeScript types. Fixes #22146. - Assertions will no longer 'vibrate' in the command log when asserting on the text of elements with trailing whitespace. Fixed in #23727.
Misc:
- There were some minor improvements made to the UI when configuration files are created for a project when using the Project Setup workflow. Addressed in #21847, #23260 and #23710.
10.7.0​
Released 8/30/2022
Features:
- Re-introduces the experimental
Cypress Studio feature. Cypress Studio
provides a visual way to generate tests within Cypress by recording
interactions against the application under test. Cypress Studio is available
only in end-to-end tests, and must be enabled via the
e2e.experimentalStudio
flag. For more details, read our blog post. Addresses #23461. - Adds Svelte component testing support. This feature is being released as an Alpha, meaning there may be breaking changes in future Cypress releases. Addresses #23037.
- The "Latest Runs" and "Average Duration" columns in the specs list now provide actions when hovered over to assist with the process of connecting the project to the Cypress Dashboard. Addresses #22932.
- Informational banners were added to display instructions to assist with connecting projects to the Cypress Dashboard and recording a first test run. Users who don't plan to use the Cypress Dashboard can dismiss the banners to prevent seeing them in the future. Addresses #22933, #22934, #22798, and #22935.
- Vue.js projects with a custom spec pattern configuration can now use the "Create Spec from Component" capability introduced in v10.5.0. Addresses #23071.
- Angular component testing projects can provide a custom configuration to the
Webpack dev server using the
projectConfig
key. This enables support for projects that don't adhere to Angular CLI conventions. Addresses #23161. - The Cypress
clock
can now be set to a new time using thesetSystemTime
function. Addresses #15424.
Performance:
- The
cy.session()
command's behavior has been enhanced to no longer clear the dom after a validation function runs. This means acy.visit()
command is no longer required after runningcy.session()
when a validation function is used. Addresses #22368.
Bugfixes:
- Fixed an issue where Cypress could crash if a websocket upgrade request was made over HTTPS. Fixes #22217.
- Fixed an issue where filtering with the
--spec
CLI flag in run mode option would not find any specs if the project was located at the root directory of a file system. Fixes #23380. - Fixed an issue where projects using Angular
v14.2.0
and above would be unable to run component tests. Fixes #23585. - Fixed an issue where snapshots performed in XHR requests could reflect the primary domain instead of current domain. Fixes #21496.
- An update was made to correctly track Github Actions retries in the Cypress Dashboard. Previously retries data was not being recorded. Addressed in #23445.
- Fixed an issue where an internal TypeScript type was exposed globally. Fixes #23333.
- Fixed an issue where an incomplete
component.devServer
configuration would cause the specs list to not display in the Cypress App when running Component Tests in open mode. Fixes #23486.
Miscellaneous:
- Display a default icon in the browser selection menu for browsers without bundled icons. Fixes #21766.
10.6.0​
Released 8/16/2022
Features:
- Introduced a new Cypress experiment,
experimentalSingleTabRunMode
, for Component Testing. When enabled, all specs will execute in a single tab, similar to the execution behavior observed in Component Testing alpha in Cypress 9, which can improverun
mode performance, but can impact spec isolation and reliability on large test suites. Addresses #22353. - Enhanced the
CYPRESS_DOWNLOAD_PATH_TEMPLATE
environment variable interpolation to accept and replace${version}
to allow version-specific download paths to be honored. Addresses #5141, #16976, and #22864.
Bugfixes:
- Fixed an issue where the Firefox browser was not downloading files to the expected directory in Windows. Fixes #17896.
- Fixed an issue in
cy.session()
where the unique session id logic was not persisting registered session ids, which incorrectly allowed session ids to override previously used session ids with different setups. Fixes #22381. - Fixed an issue where absolute path glob manipulation was incorrectly breaking
supportFile
andspecPattern
glob patterns that contained deep instances of the working directory. Fixes #23361. - Fixed an issue with the Specs list search that prevented full path matching. Fixes #22463 and #21879.
- Fixed an issue where Specs list popovers would not display a spec's full filename. Fixes #23064.
10.5.0​
Released 8/15/2022
Features:
- Display a 'flaky test' indicator in the Specs Explorer for specs that are known to be flaky in the Dashboard. Addresses #22656 & #22657.
- The project drop down is now populated when connecting a project with an organization that only has one project. Addresses #22936.
- Added new
testIsolation
configuration option to allow users to revert tolegacy
mode whenexperimentalSessionAndOrigin
is set to true. Read more about test isolation in Cypress to learn more. Addresses #22279. - React 18 projects will now be scaffolded with the
cypress/react18
mount registration during component setup. Addresses #23033. - A list of Vue components in the project are now available for selection when generating a new spec for component testing in projects that are using the default spec pattern. Addresses #22836.
- If the user logs in to the Dashboard from the app, but the current project does not have a project ID, the user will now be able to enter the connect project workflow directly. Addresses #23022
- Adds Angular component testing support, including Angular template support and support for Angular standalone components. Addresses #22819.
Bugfixes:
- Fixes an issue where usage of the
--spec
option would result in no specs found if the absolute project path included glob pattern characters. Fixes #22272. - Webpack entry points are no longer preserved for CT Webpack projects. Fixes #23224
- Fixes an issue where session state was not being reset when changing between specs in open mode. Fixes #23146
- Add delay to header tooltips so they don't pop open unless hovered on. Fixes #23115
- Fixed an edge-case bug where Cypress would hang in run-mode if an error was
thrown from a
test:before:run
event handler. Fixes #23039. - Fixes an issue introduced in
10.3.0
where network logs could be missing certain information or cause certain requests to be delayed by 500ms. Fixes #23227. - In the 'Create Blank Spec' dialog, pressing enter or return when the focus is on the spec path input field will create the blank spec. Fixes #21815.
- Fixes React 18 unmount component handling to resolve the
lastMountedReactDom.unmountComponentAtNode is not a function
error. Fixes #23081. - Fixes a regression introduced in Cypress 10.0 where Cypress no longer persisted the spec filter in the 'Search Specs' field during a session and when a project is reopened. The same filter will be used in the main specs list as well as the inline specs list present in the Test Runner. Fixes #21837.
- Fixed an issue that could lead to infinite recursion and thus a crash when
running tests that make use of
cy.intercept()
. Fixes #22693. - In the Launchpad, the project's name will no longer link to the 'Choose Testing Type' step of the launchpad. Fixes #21911.
- CT projects using Vite
v3
work with Node versions>=17
. Fixes #23042 & #23114.
Miscellaneous:
- Updated UI styling for Cypress
about:blank
pages. Addresses #20978. - Stable Firefox versions 101 and 102 are now explicitly rendered as unsupported in Windows due to an unpatched browser incompatibility in those versions. Addresses #23164.
- Add a warning for users on the old React API,
cypress/react
, who are using React 18. Users can now take advantage of the React 18 integration,cypress/react18
. Addresses #23032. cy.state('subject')
is deprecated and reading from it will log a warning to the console. Prefercy.currentSubject()
instead. Addresses #23092.
10.4.0​
Released 8/2/2022
Features:
- Cypress Component testing now supports React 18 via the cypress/react18 package. Addresses #21381 & #21946.
- Cypress Component testing now supports Vite 3. Addresses #22784.
- Cypress introduces a new experimental flag, called
experimentalModifyObstructiveThirdPartyCode
. When enabled,experimentalModifyObstructiveThirdPartyCode
will turn on additionalmodifyObstructiveCode
options to prevent frame busting, as well as striping integrity tags out of<link>
and<script>
elements and remove the electron user agent. In the current state of this experimental flag, SRI is not supported. Addresses #21476, #21307, #22953, & #21474. - Cypress will now display a banner with a corrective action when your project uses a projectId that cannot be found in the Cypress Dashboard and when you do not have access to the current project in the Cypress Dashboard. Addresses #22637.
Bugfixes:
- Fixes issue where cookies were not handled within cy.origin for requests other than the AUT page request. Fixes #22952 & #21474.
- Tooltips are now correctly displayed behind modals. Fixes #22595.
- Fixed a hang when sending video to the dashboard from the electron browser. Fixes #17627.
- Cypress will now throw an error when we receive an unexpected return value from a custom config file. Fixes #21948.
- Cypress will now warn when detecting unsupported dependencies for component testing. Fixes #22025.
- cy.type() can now be used to enter datetime values with seconds, to an input of type datetime-local, for example 1959-09-13T10:12:13. Fixes #22884.
- Next.js in Cypress is now allowed to import global styles. Fixes #22525
- Fixed an issue where 'additionalIgnorePattern' was not allowed to be an array of strings. #22551.
- Prevented timer size from changing while counting up. Fixes #22846.
- Added icons to help indicate that column headers provide more information on hover. Fixes #22638.
- Fixed an issue where long "run urls" are cut off in the console. Fixes #22619.
Dependency Updates:
- Upgraded electron from 18.3.0 to 19.0.8. Addressed in #22775.
- Upgraded bundled Node.js version from 16.13.2 to 16.14.2. Addressed in #22775.
- Upgraded bundled Chromium version from 100.0.4896.75 to 102.0.5005.148. Addressed in #22775.
10.3.1​
Released 7/19/2022
Bugfixes:
- Fixed an issue where file watchers were not completely closed prior to the Cypress App quitting, causing crashes on exit in some macOS environments. Fixes #22026.
- Fixed issues with reloading user configuration after it is updated. Fixes #21785 and #22389.
- Fixed issues with
document.cookie
when testing multiple origins. Fixes #22479 and #22674. - Fixed an issue retrieving git information for non-bash Unix shells. Fixes #22454.
- Fixed an issue that prevented displayed "Last Updated" information on Windows for git repositories without a commit history. Addressed in #22741.
- Fixed styling of the Latest Runs tooltip to keep it centered over the latest run entry. Fixes #22629 and #22598.
- Fixed styling issues with the Specs Explorer at narrow viewport widths. Fixes #22626.
- Fixed a visual issue in the reporter where special characters would be incorrectly formatted with markdown. Fixes #5679.
- Fixed an issue where the Proxy-Authorization header included capitalization that would fail with certain proxies. Fixes #22383.
- Added
react-dom
as a required dependency when setting up a React project for Component Testing. Fixes #22371. - The Spec Runner will no longer overflow unexpectedly in Firefox in certain situations. Fixes #21881 and #22610.
- Fixed a regression where the
CYPRESS_NO_COMMAND_LOG
environment variable was not honored. Fixes #21721 and #21271. - Using
cy.contains()
with a regular expression now matches submit-type input labels correctly. Fixes #21166. - Prevent printing "Class WebSwapCGLLayer is implemented in both" warning in stdout. Fixes #21615.
- Fixed the pluralization of Match(es) under Project Settings. Fixes #21728.
- Fixed a regression where absolute elements were not properly blacked out in screenshots. Fixes #22173.
Miscellaneous:
- Improved keyboard navigation for Latest Runs data in the Specs Explorer. Addresses #22628.
- Improved accessibility and styling around Specs Explorer tooltips. Addresses #22597.
- Improved the styling and behavior of the Copy button seen in the Migration workflows. Addresses #21860 and #21862.
- Improved the layout of the Launchpad Docs dropdown when the viewport is narrow. Addresses #21842.
- Removed autocomplete from certain inputs in the Cypress App. Addresses #22102.
- Removed the Projects breadcrumb from the Launchpad when not in global mode. Addresses #21771.
- Added padding to the bottom of the projects list in the Launchpad. Addresses #21724.
- Improved the display of the "Record your first run" banner at smaller widths. Addresses #21856.
- The Cypress App's sidebar will now automatically collapse at narrow widths. Addressed in #22393.
- Improved punctuation consistency and reduced the need to scroll in the Key Differences modal. Addresses #21852.
10.3.0​
Released 6/28/2022
Features:
- Cypress Dashboard test data is now available real-time within Cypress. For more details, read our blog post. Addressed in #21250 and #22497.
- Added a new clear button to easily clear the search text when filtering specs in the Cypress runner. Fixes #21686.
Bugfixes:
- Fixed a memory leak in Chromium-based browsers caused by storing
data:
urls containing base64 encoded files unnecessarily. Fixed #17853 and #22462. - Updated cross-origin cookie handling to align with browser behavior. This fixed various issues with cookies when testing across multiple origins. Fixed #21363 and #20685.
- Updated Cypress to use posix paths to fix an issue on Windows when a project
required
node-ts
. Fixes #22544 and #22297. - Fixed a 9.x to 10.x migration bug where the migration tool would hang without
a response when it attempted to read the
pluginsFile
contents when thepluginsFile
value was a directory path instead of a relative file path. Fixed #22461. - Fixed the process profiler to output Cypress's summarized CPU and memory
metrics when the
cypress:server:util:process_profiler
debug stream is enabled. Fixed #22022. - Fix styling issue observed when long text was entered in the search when filtering specs in the Cypress runner. Fixes #21686.
- Corrected the TypeScript types to include
baseUrl
as a valid test config override option. Fixes #22374 and #22072.
10.2.0​
Released 6/21/2022
Features:
- Cypress is now available natively on Apple silicon, including the M1 and M2 processor families. For more details, read our blog post. Addresses #19908.
- Cypress is now available natively on ARM64 and AArch64 systems running Linux. Addresses #4478.
- The file name input field within the Create Spec modal is now automatically focused when the modal is opened. Addresses #21865.
Bugfixes:
- Suppressed a misleading Chromium warning about CertVerifyProcBuiltin that would appear when visiting HTTPS sites in Cypress. Fixed #22128.
- Users will be able to see the custom reason-phrase in the HTTP response if the custom reason-phrase is set. Otherwise, a default status message is returned based on the corresponding status code as earlier. Fixed #16973.
- Fixed an issue where Cypress would crash with an EMFILE error if the process ran into the file descriptor limit. Fixed #22023.
- Fixed an issue causing a "nohoist config is ignored" warning when installing cypress with yarn. Fixed #22147.
- Spec directories and file names on the Specs page are now truncated if they exceed their column width. Fixed #21895.
- Updated the file links in error views to wrap appropriately and no longer overflow their containers. Fixed #22103.
- The Cypress v10 introduction video will now be skipped if loading the video takes longer than 3 seconds. Fixed #21955.
- Updated the warning banner to use language consistent with the rest of the Cypress application. Addressed in #21551.
Dependency Updates:
- Upgraded the bundled electron version shipped with Cypress from
18.0.4
to18.3.0
. Addressed in #22252.
10.1.0​
Released 6/10/2022
Features:
- Cypress will show an improved error message when running
cypress run --ct
when component testing has not been configured. Fixed#21909
Bugfixes:
- Added support for TypeScript projects using
"type": "module"
using ts-node/esm. Fixed #22096, #21939, and #22074 - Users can now run multiple specs with
cypress run
in headed mode on linux and windows in chrome. Fixed #22155 - The baseUrl config option will now restart the Cypress server automatically when it is updated in a Cypress config file. Fixed #22056
- The supportFile can now be detected within projects that contain glob syntax characters in their absolute paths. Fixed #22040
- Selector Playground "copy to clipboard" now copies full command rather than just the selector. Fixed #22043
- The clickable area for the specs list has been expanded to include the entire row. Fixed #22105
- Removed the trailing period from the "Learn More" button. Fixed #21807
- Clicking the application under test url will now open the application in another tab. Fixed #21823
10.0.3​
Released 6/3/2022
Bugfixes:
- Cypress will only watch files that match the provided
specPattern
. Fixed #22054 - Cypress will no longer crash when run behind a proxy that blocks Cypress's CDN. Fixed #22081
- Contrast increased on inline spec list header items for improved accessibility. Fixed #21870
- Updated UI to not show the spec list as selected when in the runner. Fixed #21873
- "Cypress" is now capitalized step 3 of migration text. Fixed #21798
- The browser list in the cypress apps top nav is now scrollable with a large number of browsers. #22032
- Newly scaffolded spec files will no longer be generated with as a failing test. Fixed #21921
- Cypress will not crash if it fails to access the machine-id on windows. Fixed #22110
10.0.2​
Released 6/2/2022
Bugfixes:
- Cypress will no longer watch files when in run mode. Fixed #22054
- Improved support for esm in windows. Fixed #22038
- Improved TypeScript detection in project:
- Ensures TypeScript actually exists (via
require.resolve
) and is specified in dependencies or devDependencies before migrating a project to use it. - When creating a new project include
*tsconfig.json
glob in algorithm to detect TypeScript. - When migrating the existing files in the
cypress
folder should be enough info to make the determination. - No longer includes
.d.ts
files when detecting TypeScript - Fixed #22034, #22108, and #21997
- Ensures TypeScript actually exists (via
- Vite dev-server for component testing will not crash if user has vite plugins that rely on non-empty plugins list. Fixed #22021
- Post processing ffmpeg is now run at a lower priority. Fixed #21585
10.0.1​
Released 6/1/2022
Bugfixes:
- The inline spec list is now scrollable. Fixed #21995
.check()
and.uncheck()
will now properly remove the indeterminate state from checkboxes. Fixed #21665- An error will no longer throw warning that
cypress
isn't a module after migrating a project's configuration file when using the direct download of Cypress. Fixed #2199 - Cypress will now throw a more description error when TypeScript errors are
encountered when reading a
cypress.config.ts
file. Addressed in #22009, Related to #21997 & #22004 - We now more correctly handle EPERM errors related to chokidar watching files when there are permission issues. Fixed #22002
- The migration step for support file is no longer shown when the user had a custom support file path. Fixed #22012
- Styles are now applied correctly after a user views the runs page and returns to the specs list. Fixed #21931
Misc:
- Updated messaging displayed when the
experimentalStudio
configuration is found. Addresses #22008
10.0.0​
Released 6/1/2022
Summary:
Component testing is now beta! We've also reworked the Cypress app from the ground up to modernize the interface, streamline workflows and integrate better into your overall development experience. Read more about 10.0 in our blog post.
Breaking Changes:
Please run cypress open
to go
through our interactive migration which will guide you in updating your files and
configuration options. Read our Migration Guide
which explains some breaking changes in more detail.**
-
We introduced several breaking changes to the Cypress configuration file detailed below:
- Using a
cypress.json
configuration file is no longer supported. Replace this configuration file with acypress.config.js
,cypress.config.ts
,cypress.config.cjs
orcypress.config.mjs
file. This change provides better flexibility and extensibility of configuration. An error will be thrown if both acypress.json
file andcypress.config.{cjs,js,mjs,ts}
file are found. Addressed in #18221, #18300, #20554, and #20643. - A Cypress configuration file is now required and passing the CLI flag
--config-file=false
will throw an error. Addressed in #20643. - A default configuration file will no longer be auto-generated by Cypress
when a configuration file doesn't exist. Instead, you can run
cypress open
and set up your project with a specific testing type to have this file generated. This allows you to customize the configuration setup by testing-type for the language and dependencies leveraged in your project. - The configuration file's JSON schema is no longer supported since the configuration can no longer be provided via a JSON format.
- Using a
-
Cypress has made several configuration option changes including renaming options, removing options, and only allowing some options within a specific testing type. Please run
cypress open
to have our automated migration update these options for you.- Many configuration options are now specific to either end-to-end or component testing. The types have also been updated to match the new structure. Addressed in #20677.
- The
baseUrl
andexperimentalSessionAndOrigin
configuration options are no longer valid as top-level configuration options and can only be defined within thee2e
configuration. Addressed in #20589 and #21588. - The
supportFile
andslowTestThreshold
options are no longer valid as top-level configuration options and must now be defined within thee2e
and/orcomponent
configurations. - Previously the
supportFile
option defaulted tocypress/support/index.js
. Now thee2e.supportFile
option defaults tocypress/support/e2e.{js,jsx,ts,tsx}
and thecomponent.supportFile
option defaults tocypress/support/component.{js,jsx,ts,tsx}
. Addressed in #19776 and #19364. - The
pluginsFile
option was removed. This option should be replaced with the newsetupNodeEvents()
anddevServer()
configuration options. Addressed in #18798 and #20560. - The
testFiles
option was removed. This option was replaced with the newspecPattern
option. Addressed in #19319 and #20565. - The
integrationFolder
andcomponentFolder
options were removed. These options were made obsolete by the newspecPattern
option. Addressed in #19319. - The
ignoreTestFiles
option was removed. This option was replaced with the newexcludeSpecPattern
option. Addressed in #19319. - The
experimentalStudio
option was removed with the removal of the experimental Cypress Studio feature. If this option is configured in your project, a warning message will be displayed. Please leave any feedback around Cypress Studio here. Addressed in #20515.
-
During
cypress open
, the ability to "Run all specs" and "Run filtered specs" has been removed. Please leave feedback around the removal of this feature here. Your feedback will help us make product decisions around the future of this feature. -
The experimental Cypress Studio feature has been removed. Please leave feedback around the removal of this feature here. Your feedback will help us make product decisions around the future of this feature. Addressed in #20515.
-
You will no longer be able to run your tests during
cypress run
orcypress open
in browser versions that are not supported by Cypress. -
Generated screenshots and videos will still be created inside their respective folders (
screenshotsFolder
,videosFolder
). However, the paths of generated files inside those folders will be stripped of any common ancestor paths shared between spec files found by thespecPattern
option and may no longer be deterministic. Addressed in #19319.
Deprecations:
- The
cypress open-ct
andcypress run-ct
commands have been deprecated. Usecypress open --component
andcypress run --component
instead. Addresses #18418.
Features:
-
Cypress 10 now includes beta support for component testing. More features around component testing are detailed below:
- Component testing is now integrated directly into the main app, allowing you to choose which testing experience you want upon launching Cypress. See our current support for frameworks and bundlers. Addressed in #21111.
- Cypress will now guide you through installing the component testing dependencies and project setup necessary to begin component testing in Cypress. Previously this required manual setup and referencing the documentation.
- When you use the Cypress app during
cypress open
to configure your project for CT testing, acy.mount()
command will be automatically scaffolded for you in act.supportFile
. - You can now create an empty component testing spec file from within the Cypress app directly and preview the specfile upon creation.
- The following component testing plugins are now shipped with Cypress to
enable easy
cy.mount()
implementation. Your local framework dependencies found innode_modules
will be referenced to prevent adding additional dependencies or peer-dependencies to yourpackage.json
. From now on, the latest plugin version will be shipped with each Cypress release. See our current support for frameworks and bundlers. Addressed in #20930.@cypress/mount-utils@2.0.0
@cypress/react@6.0.0
@cypress/vue@4.0.0
@cypress/vue2@1.0.0
-
We've enhanced how you can set and refresh configuration detailed below:
-
We've added several new configuration options detailed below:
-
The
setupNodeEvents()
option is a new testing type specific configuration option. It must be defined within thee2e
and/orcomponent
configurations. This option allows you to modify your loaded configuration, listen to events and register plugins. This option replaces thepluginsFile
option. Addressed in #18798 and #20560. -
The
devServer
option is a new component testing specific option that must be defined within thecomponent
configuration. This option provides a mechanism for starting a component testing dev-server when tests are running. -
The
specPattern
option is a new testing-type specific configuration option that must be defined within thee2e
and/orcomponent
configurations. This option accepts a glob or an array of globs of the spec files to load. This option simplifies the spec discovery by replacing thecomponentFolder
,integrationFolder
andtestFiles
options. Addressed in #19319, #20565 and #20853.- The
e2e.specPattern
default value for new projects iscypress/e2e/**.cy.{js,jsx,ts,tsx}
. For existing projects, please runcypress open
to have your spec files automatically migrated to match thisspecPattern
. Addressed in #21193. - The
component.specPattern
default value is**/*.cy.{js,jsx,ts,tsx}
.
- The
-
The
excludeSpecPattern
option is a new testing type specific configuration option that must be defined within thee2e
and/orcomponent
configurations. This option accepts a glob or an array of globs which allows you to ignore spec files that would otherwise be shown in your list of specs. This option replaces theignoreTestFiles
option. Addressed in #19319, #19980, #20763, #20853.- The
e2e.excludeSpecPattern
default value is the same as the replacedignoreTestFiles
glob pattern of*.hot-update.js
. - The
component.excludeSpecPattern
default value is['**/__snapshots__/*','**/__image_snapshots__/*']
plus thee2e.specPattern
glob patterns. - The
**/node_modules/**
pattern is automatically added to bothe2e.excludeSpecPattern
andcomponent.excludeSpecPattern
and can't be overridden. This is consistent with <10.0 behavior.
- The
-
Intelligent Code Completion was added with the
defineConfig()
helper function. This enables configuration auto-completion and in-line documentation in the configuration file in your IDE. While it's not strictly necessary for Cypress to parse your configuration, we recommend wrapping your config object withdefineConfig()
. Addressed in #18302.
-
-
We've made some updates to Cypress API commands detailed below:
-
Enhancements were made to provide visual indication of nested commands and logs. With this change, users are now able to click on log groups to print additional log details to the dev tools console.
-
The
.within()
command was updated to provide visual indication of logs and commands executed in the.within
command context. Addresses #20433. -
The redundant
cy.session()
log is now removed. Address #7673 in #21457. -
Users can now add custom
cy.hover()
andcy.mount()
implementation usingCypress.Commands.add()
since we don't provide a default implementation. Previously users had to useCypress.Command.override()
to provide the custom implementation. Addresses #18941.
-
-
We've made some updates to the Cypress CLI detailed below:
-
You can now pass in testing type specific configuration options via the
--config
CLI flag without nesting JSON. Addressed in #20127. -
New
--e2e
and--component
CLI flags were added tocypress run
andcypress open
to allow a user to run or launch Cypress for a specific testing-type. If a testing-type specific CLI flag is not provided when runningcypress run
, Cypress will run end-to-end tests by default. -
A warning message is now displayed when
cypress open
is ran with the--browser
CLI flag for a browser that does not exist on the system. Addressed in #18473. -
If a testing type and browser flag are passed to
cypress open
when launching a specific project, the browser will automatically launch. Addressed in #21538.
-
-
The
cypress open
experience has been updated to take you through our Launchpad with many features detailed below:-
When you launch Cypress via
cypress open
you'll be asked whether you want to do end-to-end or component testing and taken through the configuration necessary to set up your project. Addressed in #18924. -
Having files scaffolded on new projects during end-to-end testing is now opt in and not automatic. Addressed in #18924.
-
When Cypress detects you have a
cypress.json
duringcypress run
, it will error and ask you to runcypress open
to migrate. When Cypress detects you have acypress.json
duringcypress open
, it will guide you through project migration to ensure your project continues to work as expected. Addressed in #18924.
-
-
After launching the browser, there are several new features in our App detailed below:
- The Cypress app has been redesigned so that the Command Log and all associated navigation display with a dark background.
- You can now change specs or the browser within the same window as running your tests.
- Many git details are now shown within your current project in Cypress including the current branch and the last commit details of each spec in the spec explorer. Addressed in #20648, #21139, #21436 and #20744
- When creating a new spec within Cypress, your project's language is detected
to provide the correct file extension and the
specPattern
is checked to ensure the spec is found by Cypress. After creating the spec, you can preview the spec that was generated with the option to immediately run the spec or create another spec. Addressed in #21225, #20567, #20657, #20962. - The Settings page has been redesigned to more clearly distinguish between settings that are specific to the project, your device, and the Dashboard.
Bugfixes:
- An error message is displayed when you add a command using
Cypress.Commands.add()
that has the same name as an internal reserved Cypress command. Addresses #6146. - A one pixel, left, vertical border was removed that was incorrectly included
on screenshot artifacts generated from the
cy.screenshot()
command in component tests. Addressed in #21019. - A memory leak was fixed during
cypress run
for end-to-end tests launched in Chromium and Firefox browsers that reduces the overall time it takes to run a set of specs and aligns with how the browser is launched once for all specs in component testing. With this change, thebefore:browser:launch
node event will now properly only fire once per run, instead of firing before each spec. Addressed in #19915. - The default webpack configuration's host value was changed from
localhost
to127.0.0.1
to support the Node 17+ changes with how DNS names are resolved. Addressed in #21430. - Cypress will throw a detailed error when some plugin versions are no longer supported in Cypress 10. Addressed in #21169
Dependencies:
- Added
@cypress/mount-utils@2.0.0
dependency. - Added
@cypress/react@6.0.0
dependency. - Added
@cypress/vue@4.0.0
dependency. - Added
@cypress/vue2@1.0.0
dependency.
Misc:
- The Plugins concept in Cypress still exists with the intent to tap into,
modify or extend the internal behavior(s) of Cypress. It however is expected
to be used in conjunction with our new
setupNodesEvents
configuration option, which was named to reflect that Plugins leverage Cypress's node events.
9.7.0​
Released 5/23/2022
Features:
- The Electron version and shipped Chromium browser version has been updated. Addressed in #21418.
Deprecations:
- The
Cypress.Cookies.preserveOnce()
andCypress.Cookies.defaults()
Cypress APIs have been deprecated. In a future release, support forCypress.Cookies.preserveOnce()
andCypress.Cookies.defaults()
will be removed. Consider using the experimentalcy.session()
command instead to cache and restore cookies and other sessions details between tests. Fixed #21333.
Bugfixes:
- Updated the
cy.contains()
command to correctly error and retry if the provided regex pattern begins with an equal sign and a match was not initially found. Previously the command would incorrectly fail with a syntax error. Fixed #21108. - Corrected the
cy.session()
command log grouping and validation verbiage. This change provides better insights to logs associated with the command. Fixed #21377. - Removed
eventemitter2
third-party type definitions fromcy
andCypress
that were unintentionally exposed. Fixed #20556.
Dependency Updates:
- Upgraded the bundled node version shipped with Cypress from
16.5.0
to16.13.2
. Addressed in #21418. - Upgraded the Chromium browser version used during
cypress run
and when selecting Electron browser incypress open
from94.0.4606.81
to100.0.4896.75
. Addressed in #21418. - Upgraded
electron
dependency from15.5.1
to18.0.4
. Addressed in #21418.
9.6.1​
Released 5/9/2022
Bugfixes:
- Cypress can now launch on systems where Firefox is installed via Snapcraft. Fixed #19793.
- Updates were made to ensure XHR calls are properly displaying the response body in the command log. Fixed #21361.
- Fixed
cy.contains()
and.should('contain', ...)
to handle finding text that contains backslash characters. Fixed #19116 - Updated
.type('{enter}')
to support sending the Enter keystroke to submit buttons that are not rendered within a form html element, but are associated with a form via theform
attribute. Fixed #21163. - Fixed an issue with
cy.session()
such that re-running tests in open mode will now correctly recreate a session. Before this change, an error was thrown indicating the savedsetup
function was not a function because it was serialized. Fixed #17805.
9.6.0​
Released 4/25/2022
Features:
- Now you can easily test multi-domain workflows by using the experimental
cy.origin()
command. This feature allows you to test across different origins or domains within a single test. This experiment was designed to work side-by-side with thecy.session()
experimental feature. You can turn on use of this command by setting theexperimentalSessionAndOrigin
configuration option totrue
. For more details, read our blog post. Addressed #17336 and #944.- Added a new configuration option called
experimentalSessionAndOrigin
. This option enables support forcy.session()
andcy.origin()
for end-to-end testing. - The
experimentalSessionSupport
configuration option has been removed and replaced by theexperimentalSessionAndOrigin
configuration option. Please update your configuration to use the newexperimentalSessionAndOrigin
option to continue to opt-in to this experimental feature. - When
experimentalSessionAndOrigin
is enabled, cross-origin requests will no longer immediately fail, but instead, time out based on thepageLoadTimeout
configuration. This allows the request to be appropriately handled by thecy.origin()
command. - When
experimentalSessionAndOrigin
is enabled, Cypress will no longer wait on page loads between hooks before moving on to the next test.
- Added a new configuration option called
Bugfixes:
- Fixed an issue with Firefox 98+ where the Enter keystroke was not being sent
to an input element when using
.type('{enter}')
. Fixed #21033. - We now verify if an interruption while running tests was signaled by the user or if it came from an error in a plugin before showing the error message. Fixed #21010.
- Improved the error message observed on Windows platforms when unzipping the Cypress binary and the max file length is exceeded. Fixed in #21047.
- Updated the
Cypress.Commands.add()
TypeScript types to better reflect the attributes of the.add()
utility and the JQuery element, a possible previous subject type. #20376.
Dependency Updates:
- Upgraded
electron
dependency from15.3.5
to15.5.1
to consume fixes related to improve performance on macOS Big Sur and later. Addressed #21068.
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.
- 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. - Fixed an issue where
cy.type('{enter}')
was not sending the Enter key for Firefoxv98+
. This was not an issue with Firefoxv97
and below. Fixed #20562. - Fixed a regression in 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. - Fixed an issue with
cy.root()
to respect thetimeout
option passed to the command. Previously, when thetimeout
option was provided, it was ignored and the default timeout was used. Fixed #19985. - Updates were made to decrease the length of the Cypress cache path for Windows to ensure installing pre-release versions of the Cypress binary are within the maximum path length of 260 characters. Fixed in #20961.
- Fixed a regression in 8.6.0 which
prevented
.pause()
from correctly executing when passing the--headed --no-exit
CLI flags tocypress run
. Fixed #20745. - Fixed a regression in 9.2.0 which would
sometimes throw an expected error on navigation with
cy.back()
andcy.go()
. Fixed #19749 and #20539. - Corrected the TypeScript type for a cookie which was incorrectly typed as
any
when the correct type isCookie
. Fixed in #20513. - Added the missing
Cypress.Command.addAll()
TypeScript types. Fixed #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.
Misc:
- A minor visual update was made to the
cy.session()
command log visuals. Fixed #20433.
Dependency Updates:
- Upgraded
ansi-regex
dependency from4.1.0
to4.1.1
to address the CVE-2021-3807 NVD security vulnerability. Addressed in #20807. - Upgraded
plist
dependency from3.0.4
to3.0.5
to address the CVE-2022-22912 NVD security vulnerability. Addressed in #20808.
9.5.3​
Released 3/28/2022
Bugfixes:
- Corrected a logging issue with
cy.intercept()
where the response status code and response body were sometimes missing from the log details inopen
mode. Fixed #18757. - Fixed an issue in
cy.readFile()
where the command would not retry or provide a meaningful error message ifnull
encoding was used and the file was not found. Fixed #20683. - Updated the Cypress Keyboard shortcuts to only run the shortcut when the
pressed shortcut key was not used in conjunction with either the
alt
,ctrl
, orshift
modifier keys. This fixed an issue where the Cypress shortcut handler would override the browser native keyboard shortcut for search (ctrl + f
). Fixed #20222. - Updates were made to correctly escape dollar signs in the
CYPRESS_DOWNLOAD_PATH_TEMPLATE
environment variable. Issues were seen utilizing this template when the env was provided from a package manager file. Fixed #19914. - Fix the
Cypress.Buffer
TypeScript type to reference the static constructor ofBuffer
, instead of incorrectly referencing theBuffer
instance which caused Type errors. Fixes #20542.
Dependency Updates:
- Upgraded
electron
dependency from15.3.4
to15.3.5
to address the CVE-2022-21718 NVD security vulnerability. Addressed in #20750. - Upgraded
minimist
dependency from1.2.5
to1.2.6
. Addressed in #20756. - Upgraded
nanoid
dependency from3.1.20
to3.1.31
to address the CVE-2021-23566 NVD security vulnerability. Addressed in #20726. - Upgraded
node-forge
dependency from1.0.0
to1.3.0
to address the CVE-2022-24771 NVD security vulnerability. Addressed in #20727.
9.5.2​
Released 3/14/2022
Bugfixes:
- Fixed an issue with
.type()
where click events could be fired on the incorrect target element because the target focus changed within a key-down event handler callback. Fixed in #20525. - Fixed a regression in 9.5.0 where ANSI
colors were not removed from the FireFox warning message about the
chromeWebSecurity
configuration option having no effect on the Firefox browser. Fixes #20496. - Updates were made to the pre-release build setup such that Cypress will use a
unique cache folder for each
pre-release installation
on a machine. This removes the need to run
cypress clear cache
before installing a new pre-release version of Cypress or before installing a new released version of Cypress after a pre-release version had been installed. Addressed in #20296.
Misc:
- Updates were made to explicitly disable the
Origin-Agent-Cluster
header for proxied responses to ensuredocument.domain
can continue to be set with Chrome v106+. This was necessary because Chrome is planning to makedocument.domain
immutable in v106+ to relax the same-origin policy by interpreting theOrigin-Agent-Cluster
astrue
, whereas it is currently interpreted asfalse
. Addresses #20147.
Dependency Updates:
- Upgraded
url-parse
dependency from1.5.6
to1.5.9
to address these NVD security vulnerabilities, CVE-2022-0639, CVE-2022-0686 and CVE-2022-0691. Addressed in #20386 and #20439.
9.5.1​
Released 2/28/2022
Bugfixes:
- Added a
ready
event to the Plugins process to ensure all plugins have successfully started before the configuration is loaded and the tests start. Fixed in #19792.- This fixes an issue where the plugin is never executed and leaves Cypress stuck in the initialization phase, where the user can only view the loading spinner.
- This enables support for node's experimental
--loader
flag for plugins.
- Made a change to the DNS lookup to improve test performances and reliability on MacOS machines that leverage the VMWare CBCloud SaaS solution. Before this change, random test failures were observed, as well as hanging tests and initially pending HTTP and HTTPS responses. Fixed in #20062.
- Fixed a regression in 9.5.0 where ANSI
colors were not removed from the
cy.fixtures()
error code frame. Fixes #20208. - Fixed a regression in 9.5.0 where the test config override errors were formatted incorrectly. Fixes #20208.
- Fixed an issue where Cypress would throw an error when reporting or wrapping errors with booleans or numbers. Fixes #19561.
Dependency Updates:
- Upgraded
url-parse
dependency from1.5.2
to1.5.6
to avoid authorization bypass through user-controlled key to address this NVD security vulnerability. Addressed in #20270.
9.5.0​
Released 2/15/2022
Features:
- Enhancements were made to the error experience in both run mode and open mode to improve readability and provide meaningful stack traces. Addressed in #20124.
- Updated the
cy.request()
log message to hide the origin when it matched the browser origin to make debugging easier. This reduces the length of the log message that could be partially hidden if a long url is requested. Addressed in #20009. - Updates were made to log the
ShadowRoot
andDocument
elements as HTML elements. Previously these would be logged as enumerated objects, which were difficult to evaluate. Addressed in #20049. - Updated the terminal output generated in Cypress run mode to de-emphasis the
node
path in the run header. Addressed in #20120.
Bugfixes:
- Fixed an issue where files attached during
.selectFile()
could have the wrongFile
prototype. Fixes #20003. - Updated
.select()
to only dispatch thechange
andinput
events when the selected option is not the currently selected option. This change aligns.select()
with the browser. Fixes #19494. - Updated
.type(' ')
to align with the W3C standards where a click event should be dispatched when the Space key is pressed and the current focus is on a state-changing element with typebutton
,image
,submit
orreset
. Fixes #20067.
9.4.1​
Released 1/31/2022
Bugfixes:
- Fixed a regression in 9.4.0 where the line endings in the public npm package prevented some users from running Cypress. Fixes #19986.
9.4.0​
Released 1/31/2022
Features
- Enhancements were made to
.selectFile()
after receiving feedback after its initial release in 9.3.0.- The default behavior was updated to automatically infer the mime type of files based on their extension to correctly encode file uploads. Addressed in #19751.
- Added the
mimeType
property so you can explicitly set the mime type on files using themimeType
property. Addressed in #19751. - Updated file contents types to allow either a
TypedArray
instance or aCypress.Buffer
instance, where previously file contents were expected to only be an instance ofCypress.Buffer
. Addressed in #19751. - Updated
.selectFile()
to retain the fileName of files read from disk to work with aliases. Addressed in #19803.
Bugfixes:
- Fixed a regression in 9.3.0 to correctly
parse the
--spec
CLI parameter for glob patterns containing a range. Fixes #19783. - Fixed regression in 9.2.1 where the
--openssl-legacy-provider
flag was not being passed to the plugins' child process when the user's system Node version was Node 17+ built with OpenSSL v3+ which resulted in Cypress crashing when trying to run tests. Fixes #19712. - Update
.type('{enter}')
to align with the W3C standards where a click event should be dispatched when the Enter key is pressed and the current focus is on a state-changing element with typebutton
,image
,submit
orreset
. Fixes #19541.
9.3.1​
Released 1/19/2022
Bugfixes:
- Fixed an issue where the bin file was released with windows line breaks. Fixes #19747.
9.3.0​
Released 1/18/2022
Features:
- Added a new Cypress command, called
.selectFile()
, to select a file or files in an HTML5 input element or simulate dragging a file or files into the browser. The API is similar tocypress-file-upload
and we have provided a migration guide for previous users of that plugin. For more details, see our blog post. Fixes #19524 and #170. - Exposed the
Buffer
polyfill, asCypress.Buffer
, to enable working with binary data. Addressed in #19524. - Added the
CYPRESS_DOWNLOAD_PATH_TEMPLATE
environment variable which can be set to a string template for building the download URL for the Cypress binary. This environment variable is useful for users who are downloading the Cypress binary from a proxy that is not one-to-one with the Cypress's default download url. More information can be found in the Install Binary documentation. Fixes #15697.
Bugfixes:
- Fixed an issue where the
--spec
CLI parameter was not working properly when passing multiple glob patterns that are separated by commas. Fixes #16102. - Fixed an issue with how the
CYPRESS_VERIFY_TIMEOUT
environment variable was read so it can set in a project'spackage.json
or its.npmrc
. Fixes #19559.
Dependency Updates:
- Upgraded
graceful-fs
from4.2.0
to4.2.9
. This upgrade resolves issues observed with using graceful-fs v4.2.0 with resolve v1.21+. Addressed in #19676 and resolves #19610.- NOTE: This upgrade to
graceful-fs
breaks Cypress's compatibility with Yarn 2. We have observed errors with Yarn 2.4.2 withgraceful-fs
4.2.9. Before this change, Cypress had minimal Yarn 2 support (see #6377). Between Yarn 3 fixing multiple bugs and the migration path from Yarn 2 to Yarn 3 being minimal, we felt the best step forward was to support and recommend Yarn 3 over Yarn 2.
- NOTE: This upgrade to
- Upgraded
electron
from15.2.0
to15.3.4
. Addressed in #19351.
9.2.1​
Released 1/10/2022
Bugfixes:
- Fixed a regression in 9.2.0 to keep
Cypress open after each spec finishes when the
--headed --no-exit
flags are passed tocypress run
. Fixes #19485. - Improve heuristic for verifying when the
--openssl-legacy-provider
option should be passed to the plugins' child process when the system Node version is v17+. This prevents Cypress from crashing when a user has Node 17 installed which was built with OpenSSL v1. Fixes #19320. - Correctly cast the
CYPRESS_VERIFY_TIMEOUT
environment variable as a number so Cypress will no longer throwTypeError: Expected the timeout option to be a non-negative integer
. Fixes #19476.
Dependency Updates:
- Update pinned resolution of
cli-table3
from~0.6.0
to~0.6.1
to avoid problems with the bug introduced in the colors.js v1.4.44-liberty-2 release. Addresses #19624.
9.2.0​
Released 12/20/2021
Features:
- Cypress will throw an error when a user attempts to update a configuration
value at run-time using either the Test Configuration or using
Cypress.config()
that is a readonly option. Addresses #6407 and #19001. - A
timeout
option has been added to thecy.writeFile()
command, with a default value ofdefaultCommandTimeout
. Addresses #3350. - The default
maxHttpBufferSize
for the internal socket server has been increased to Node's maximum Buffer size (size varies by OS) to allow large file writes withcy.writeFile()
. Addresses #19140. - Add
CYPRESS_VERIFY_TIMEOUT
environment variable to override the timeout duration of theverify
command. Addresses #18290.
Bugfixes:
- Prevent unnecessary snapshotting when running default assertions that would
unnecessarily increase CPU use in
cypress open
mode which lead to out of memory crashes on certain browsers. Fixes #18549. - Removed automatic retries for failed HTTP requests through the proxy. This fixes an issue where failed requests could be re-sent too many times in some conditions. This change could increase the number of failed requests that your app sees. Fixes #19043.
- Reduced the occurrence of an issue where logs for
fetch
andxhr
requests could be associated with the wrong request. Fixes #19043. - Tests that are skipped within
then
blocks will no longer throw errors causing the test to fail. Tests that are skipped outside ofthen
blocks will no longer trigger the fail event. This will prevent screenshots from happening from errors thrown by the fail event. Fixes #14867 and #17660. - Fixed a regression in 9.0.0 where a
fixture provided in a static response to
cy.intercept()
did not support passingnull
to encoding to read the fixture as a Buffer. This identified an undocumented 9.0.0 Breaking Change where the default read behavior of a fixture changed from a Buffer to being read withutf8
encoding. Fixes #19344. - Fixed a regression in 9.0.0 where
cy.contains()
attempted to ignore<script>
and<style>
elements found within<body>
. by deleting them from the dom. This behavior was corrected to ignore the elements without deleting them. Fixes #19377. - Cypress will no longer crash when proxying an ill formed request. For example,
if the application under test has a resource of
"http: //localhost/asset.js"
(notice the extraneous space), Cypress will now log a debug message and the asset will fail to load. Fixes #9220. - Correct
Cypress.Command.add()
andCypress.Command.override()
TypeScript types. Fixes #18879, #19095 and #18940.- Custom command implementations typings take into account
prevSubject
variants. - Custom command implementations now allows to NOT return a value.
- Custom command overwrites typings take into account
originalFn
function.
- Custom command implementations typings take into account
- Add types for
Cypress.session.clearAllSavedSessions()
. Fixes #19363.
Dependencies:
- Upgraded
ssri
from6.0.1
to6.0.2
to mitigate ssri vulnerability. Addressed in #19351.
9.1.1​
Released 12/03/2021
Bugfixes:
- Fixed a regression in 9.1.0 where our
built binary didn't contain patches to some dependencies. Addressed in
#19239. This fixed some
issues including:
- Requests containing
~
will no longer be improperly encoded. Fixes #19083, #19084, #19115, #19096, #19178. - A TypeError displaying
data.hasOwnProperty is not a function
will no longer throw in some situations. Fixes #19091. - Empty extra hooks will no longer be sent as data when recording to the Dashboard. Fixes #19087.
- The Runner hanging when baseUrl is set to null to load a local file. Fixes #19105
- Requests containing
- When using the default configuration of
"nodeVersion": "system"
with an installed system node >=17, Cypress will now work properly rather than throw an error incorrectly pointing to the user's plugin file. Fixes #18914. - Shadow DOM elements no longer error as hidden during actionability when the element is covered by its parent shadow root. Fixes #18008.
- When using
.type()
events now correctly propagate out of the shadow DOM. Fixes #17531. - The
this
context is now properly preserved when overwritingcy.clock()
. Fixes #19158.
Dependencies:
- Upgraded
@cypress/request
from2.88.7
to2.88.10
. Addressed in #19099.
9.1.0​
Released 11/22/2021
Features:
- A
CYPRESS
environment variable will be set to true in child processes where Cypress runs user code in Node.js. You can now detect that you're running in Cypress by looking forprocess.env.CYPRESS
. Addresses #18805.
Bugfixes:
- Specs with % in the filename will no longer fail to load and now behave as any other spec. Fixes #18871.
- When using the Selector Playground, the HTML attribute's value will be wrapped in double-quotes. Fixes #1884.
- The call count is now shown in the Command Log when using
cy.stub().log(false)
. Fixes #18907. - The warning message for retrying connection to a browser has been improved to indicate when it is still waiting. Fixes #18644.
- Cypress commands that rely on
this
context now have access tothis
when overridden. Fixes #18899. - Test configuration is now correctly applied when using
only
. Fixes #18959.
9.0.0​
Released 11/10/2021
Breaking Changes:
- The
nodeVersion
configuration option now defaults tosystem
. The behavior of thesystem
option has changed to always use the Node.js binary/version that launched Cypress. If Cypress was not launched via the terminal, Cypress will use thebundled
Node.js version. This could change the behavior of code within yourpluginsFile
since it may be run in yoursystem
Node.js version. Addresses #18684. - Windows 32-bit is no longer supported in Cypress. Addresses #17962.
- An error will now be thrown if an invalid value is passed to
Cypress.config
. Previously invalid values were ignored and could cause unexpected behavior. Addresses #18589. cy.contains()
no longer yields the<body>
element when it matches the content of<script>
or<style>
tags. Addresses #14861.- Attempting to add an existing built-in Cypress command using
Cypress.Commands.add()
will now throw an error, indicating thatCypress.Commands.overwrite()
should be used instead to overwrite the behavior of existing commands. Addresses #18572. - Custom command implementations are now typed based on the declared custom chainables. Addresses #17496.
- The bundled Node.js version was upgraded from
14.17.0
to16.5.0
. This could change the behavior of code within thepluginsFile
when using the bundled Node.js version of Cypress. Addressed in #18317. - The default read behavior of a fixture provided as a static response in
cy.intercept()
changed from being read as a Buffer to usingutf8
encoding. This aligns the default read behavior ofcy.intercept()
tocy.readFile()
andcy.fixture()
. Addresses #18534.
Deprecations:
- The
nodeVersion
configuration option has been deprecated and will be removed in a future release.
Features:
- When
null
is passed as the encoding tocy.readFile()
orcy.fixture()
, the file is treated as binary and read as a Buffer. Similarly,null
passed as the encoding tocy.writeFile()
allows direct writing of buffers. If the encoding is unspecified, the default remainsutf8
, matching the current behavior. Addresses #18534.
Bugfixes:
- Sticky elements within a fixed container will now be able to be properly scrolled to during action commands. Fixes #4233.
document.referrer
will now correctly reflect the correct value from the application under test aftercy.visit()
. Fixes #4295.
Dependencies:
- Upgraded Chrome browser version used during
cypress run
and when selecting Electron browser incypress open
from91
to94
. Addressed in #15292. - Upgraded bundled Node.js version from
14.17.0
to16.5.0
. Addressed in #15292. - Upgraded
electron
from14.1.0
to15.2.0
. Addressed in #15292.
8.7.0​
Released 10/25/2021
Features:
- There are changes to how "slow" tests are determined and displayed in Cypress.
Addresses #18496.
- Added a
slowTestThreshold
configuration option to customize when tests are considered "slow" duringcypress run
. A test that runs slower than the given threshold will display in orange text in the default 'spec' reporter. This configuration can be set in your Cypress config file or via specific test configuration. - The default slow test threshold was changed from 75ms (Mocha's default) to
10000ms for e2e tests and 250ms for component tests. To restore the old
behavior, you can add
"slowTestThreshold": 75
to your Cypress config file. - All tests will show the time the test ran in milliseconds during
cypress run
with the default 'spec' reporter.
- Added a
- Users can pass an
overwrite: true
option toCypress.Screenshot.defaults
to change default behavior to overwrite existing screenshots without having to setoverwrite
for eachcy.screenshot()
command. Addresses #7955.
Bugfixes:
- Fixed a regression introduced in 8.6.0 where videos recorded in Electron to the Dashboard were not playable in the Firefox or Safari browser and were not compatible with QuickTime player in MacOS.
- Fixed a regression introduced in 8.6.0 so that the warning about the
projectRoot
directory not being writeable will now display correctly. Fixes #18485. - Improved the error message when running Cypress without non-root permissions. Fixes #18445.
- An error now throws when invalid options are passed to the
selectorPriority
configuration option ofCypress.SelectorPlayground.defaults
. Valid values aredata-*
,id
,class
,tag
,attribute
, ornth-child
. Fixes #7745.
Dependency Updates:
- Pinned resolution of
ua-parser-js
to0.7.24
to avoid dependency resolution to the compromised package versions. Please read the security advisory and take actions advised as soon as possible. Addressed in #18611
8.6.0​
Released 10/11/2021
Features:
cy.screenshot()
now acceptsoverwrite: true
as an option to overwrite existing screenshots with the same file name. Addresses #7955.cy.select([])
can now be used to clear any selected options in a multi-value select. Addresses #4318.- Using
cy.pause()
when usingcypress run --headed --no-exit
will now pause a test. Addresses #4044.
Bugfixes:
- Fixed a regression introduced in 8.2.0 where certain XMLHttpRequests would not display their response bodies in the DevTools Console when clicked. Fixes #17656.
- Fixed a regression in 8.3.0 where capturing videos in Chrome versions earlier than 89 would result in choppy videos and skipped frames. Fixes #18021.
- Cypress displays the correct error when certain custom error types are thrown within a test. Fixes #18259.
- The Cypress App will no longer crash when passed a
--spec: {}
from the CLI and instead error when passed an invalid object argument. Fixes #3957. - Logging a plain object no longer results in the error "Cannot convert object to primitive value". Fixes #18143.
Misc:
- Updated the
cy.request()
error message when conflictingfailOnStatusCode
andretryOnStatusCodeFailure
options are passed to be clearer. Fixes #18271.
Dependency Updates:
- Upgraded the Chromium browser version used during
cypress run
and when selecting Electron browser incypress open
from91.0.4472.164
to93.0.4577.58
. - Upgraded
electron
from13.2.0
to14.1.0
. Addressed in #18318 and #18384.
8.5.0​
Released 09/27/2021
Features:
- You can now select an option by index within the
.select()
command. Addresses #757. - Cypress now captures the repository URL on Drone CI. Addresses #18210.
Bugfixes:
- The download of Cypress now respects the
NO_PROXY
environment variable when one is set. Fixes #17702. - When using a custom config file and setting it up to record to the Dashboard,
Cypress now writes the
projectId
in the custom config file instead ofcypress.json
. Fixes #5747.
Misc:
- Windows 32-bit has been deprecated and support will be removed in a later release. A deprecation warning will now display when using Cypress in a Windows 32-bit OS. See #17962 for more detail. Addresses #18094.
- Improved the error messages when an invalid argument type is passed to the
.select()
command. Addressed in #18234.
8.4.1​
Released 09/17/2021
Bugfixes:
- Cypress will no longer crash when setting up a project to record to the Dashboard or viewing the runs or record key for a previously set up project. Fixes #18129.
- The branch collected for Drone CI now correctly reflects the source PR branch for showing in the Cypress Dashboard. Fixes #17860.
8.4.0​
Released 09/13/2021
Features:
- When the URL contains non-ASCII characters, you can use the new
decode
option ofcy.url()
to decode it. Addresses #17399.
Bugfixes:
- Cypress now better handles situations where the extension was installed in a read-only location. Fixes #3852.
- A clearer error message is now thrown for
.check()
or.uncheck()
when there are no matching value attributes found. Fixes#7379. - Hooks will no longer rerun on unrelated tests in some situations after a domain navigation. Fixes #17705.
clientCertificate
types have been added for the Cypress configuration. Fixes #17799.
8.3.1​
Released 08/27/2021
Performance:
- Projects will now open much faster on MacOS Big Sur with improved browser detection performance. Fixes #17773.
Bugfixes:
- Fixed a regression in 8.3.0 where the
correct exit code would not be issued during
cypress run-ct
while running in the Electron browser. Fixes #17752 and #17885. - Fixed a regression in 8.3.0 where
Cypress would cause a
SIGSEGV
error on Mac when closing the Cypress app opened viacypress open
. Fixes #17766. - The
beforeinput
event now correctly fires in Firefox during keyboard events. Fixes #17583.
Misc:
cy.document()
typings now allow for thetimeout
option. Fixes #17695.cy.title()
typings now allow for thetimeout
option. Fixes #17781
Dependency Updates:
- Upgraded
electron
from13.1.7
to13.2.0
. Addressed in #17772. - Upgraded
@cypress/request
from2.88.5
to2.88.6
. Addresses #17622.
8.3.0​
Released 08/16/2021
Features:
- The instructions for recording a run have been updated for some users. Addressed in #17317.
Performance:
- We addressed an issue that increased CPU usage during video recording in Chrome 89+/Electron 12+. Fixes #16152.
- Fixed a regression in 7.2.0 that would
cause
cy.visit()
to take longer to fire its load event in some circumstances. Fixes #16671.
Bugfixes:
- Fixed an issue that could cause intermittent OpenSSL errors when the local CA cert cache becomes corrupted. Fixes #8705.
- Fixed a regression in 7.2.0 causing the menu bar of Cypress to not be clickable in Windows. Fixes #16323.
res.send
ofcy.intercept()
will no longer override JSON-related content types. Fixes #17084.- The
times
option ofcy.intercept
now works properly withreq.reply
. Fixes #17139. - Fixed a regression in 8.0.0 where
Cypress would always warn that
chromeWebSecurity
is set to "false" when it wasn't. Fixes #17614.
Dependency Updates:
- Upgraded Chrome browser version used during
cypress run
and when selecting Electron browser incypress open
from89
to91
. Addressed in #17408. - Upgraded bundled Node.js version from
14.6.0
to14.17.0
. Addressed in #17408. - Upgraded
electron
from12.0.0-beta.14
to13.1.7
. Addressed in #17408. - Upgraded
url-parse
from1.5.1
to1.5.2
. Addressed in #17719.
8.2.0​
Released 08/04/2021
Features:
- You can now cache and restore cookies,
localStorage
, andsessionStorage
in order to reduce test setup times by usingcy.session()
. Thesession
API is experimental and can be enabled by setting theexperimentalSessionSupport
flag totrue
in your Cypress config. See our blog and thecy.session()
doc for more detail. - The logging experience around HTTP requests has been updated.
fetch
requests are always displayed in the Command Log, regardless of ifexperimentalFetchSupport
is enabled.- Duplicate logs for XHRs, fetches, and
cy.intercept()
have been consolidated - Fixes #14843. - The user experience around the information displayed in the console when
clicking on
cy.intercept()
request logs has been improved. - Request logs now indicate if a request has gone to the origin or if it has been stubbed by displaying a filled or empty circle in the request log.
- Request logs now display information about if the request and/or response
was modified by a
cy.intercept()
. - The tooltip displayed when mousing over a request log now displays
information about the matched
cy.intercept()
/cy.route()
rules. - Fixed an issue where pending request logs were not ended between tests. Fixes #14655.
- There's now a
Cypress.currentTest
property to access name the currently executing test viaCypress.currentTest.title
andCypress.currentTest.titlePath
. Addresses #2972.
Bugfixes:
- A "removing cookie failed" error will no longer throw when cookies are cleared in Firefox. Fixes #6375.
- Cypress no longer throws the error "cannot read property split of undefined" in certain circumstances when application errors are thrown. Fixes #17378.
- Cypress now properly runs the final test when nested in a suite with a
before
hook. Fixes #9026. - Fixed a regression in 8.0.0 where an
error would longer throw when there is no
/etc/passwd
entry for the current user, such as in some Docker and GitHub Action setups. Fixes #17415. - Cypress now throws if a function is incorrectly passed as the second argument
to
cy.wait()
. Fixes #17436.
8.1.0​
Released 07/29/2021
Features:
- When using
experimentalStudio
, you can now generate assertions in Cypress Studio by right clicking on an element. Addressed in #16295. - When searching specs in the Test Runner during end-to-end testing, characters that are not letters will be ignored and don't have to be typed. Addressed in #17346.
Performance:
- The Test Runner's performance has been improved when running a large number of commands within a single test. Fixes #6783.
Bugfixes:
- Add Yarn v2 pnp support to our default webpack processor. Fixes #8008 and #16111.
- When running Cypress in global mode, an error will no longer be thrown when trying to add a new project to the Dashboard. Addressed in #17514.
- The Test Runner will no longer crash in some instances when creating a new spec file from the GUI. #17430.
8.0.0​
Released 07/19/2021
Summary:
We've made some updates to ensure a consistent run experience across browsers.
Now all browsers run via cypress run
run headlessly, with a device pixel ratio
of 1, and a screen size of 1280x720 by default.
Breaking Changes:
Please read our Migration Guide which explains the changes in more detail and how to change your code to migrate to Cypress 8.0.**
- When running
cypress run
previous to 8.0, some browsers would launch headed while others were launched headless by default. Cypress now runs all browsers duringcypress run
as headless by default. Addresses #16832. - The default screen size when running a headless browser has been reverted back to 1280x720 pixels (pre 7.0 behavior). Addresses #16853.
- When running the
--headless
Chrome browser viacypress run
, the device pixel ratio will now be 1 by default, matching the behavior of all other browsers. This behavior can be overridden through the browser launch API. Addresses #17375. - Cypress now enforces version checks for browser launching and will error
during
cypress run
and not allow opening the browser incypress open
when attempting to open unsupported browser versions. Cypress supports Chrome >= 64, Firefox >= 86, and Edge >= 79. Addressed in #17355. - Arguments returned from a chained function will no longer incorrectly be of
type
jQuery
and instead have anany
type. Fixes #16669. - The
Cypress.ConfigOptions
,Cypress.ResolvedConfigOptions
andCypress.RuntimeConfigOption
types have been updated so thatConfigOptions
match the JSON schema. Addressed in #17251.
Features:
- You can now configure certificate authority (CA) and client certificates to
use within tests on a per-URL basis via a
clientCertificates
configuration option. See Client certificates for more detail. - Setting the environment variable
ELECTRON_RUN_AS_NODE
now starts Cypress as a normal Node.js process rather than an Electron process. Addresses #16505.
Bugfixes:
console.log
andconsole.error
called within the plugins file will now be captured in thestdout
sent to the Cypress Dashboard, making it visible in Output logs in the Dashboard. Fixes #7434.- There are several fixes for
cy.intercept()
including: - When using the experimental Cypress Studio, there should be a reduced occurrence of "Studio failed to save commands" error messages. Fixes #14767.
cy.invoke()
now retains the properthis
context on nested object methods. Fixes #3871.- We no longer trigger unnecessary snapshot re-renders when hovering over the Command Log. Fixes #17257.
7.7.0​
Released 07/07/2021
Features:
- When using
experimentalStudio
, Cypress Studio can now copy all commands generated to your clipboard. Addressed in #16912.
Bugfixes:
- Cypress now respects
preventScroll
options passed toelement.focus()
calls within the application under test. Fixes #15294. - Using
.contains(0)
will now show the zero in the Command Log. Fixes #1119. - Cypress will no longer show a warning about allowed keys for the
showedOnBoardingModal
when runningcypress open
. Fixes #17095. - The Cypress Studio introduction modal will now display with the correct styling. Fixes #17102.
- The types for
.contains()
now correctly allow for theincludeShadowDom
option. Fixes #17066.
Misc:
- We updated the messaging when Cypress fails to start to be clearer that it's not always due to a dependency missing. Addresses #17112.
7.6.0​
Released 06/23/2021
Features:
- You can now override the default delay between typing characters for
.type()
withCypress.Keyboard.defaults()
or via test configuration. Addresses #566. - The experience when opening a new project via
cypress open
has been improved. Addressed in #15826.- The scaffolded example files have been updated to include examples tests of the TodoMVC project.
- You can now easily delete all of the scaffolded example files directly from the Test Runner GUI.
- There's now a button to create a new spec file when no spec files are found in the project.
- A new onboarding banner with be present with helpful links for new users and new projects.
- The incoming request object yielded to request handler functions passed to
cy.intercept()
(req
) now has areq.query
property, which is a getter/setter for the query parameters on the request URL. Addresses #16327. - You can now pass an
ArrayBuffer
as a request / response body withcy.intercept()
. Addresses #16722
Bugfixes:
- Cypress no longer hangs intermittently when using webpack 5. Fixes #15447.
- It is no longer necessary to return the config from the plugins function when
using the
dev-server:start
event for component testing. Fixes #16860. cy.intercept()
now correctly sets the response body as a string instead of an ArrayBuffer when it contains multi-byte characters. Fixes #16292.cy.intercept()
won't corrupt certain binary responses. Fixes #16722.- On Windows, the Cypress executable is now code signed by "Cypress.io, Inc.".
This fixes
spawn UNKNOWN
errors when launching Cypress with code signing required by policy on Windows. Fixes #2543 - We now warn on
EPERM
errors when accessing the project directory instead of erroring. Fixes #16933. - Cypress now better handles running when browsers with unconventional versions are present on the machine. Fixes #15485.
- Expanded the types for
CyHttpMessages.BaseMessage.headers
to support the value being an array of strings. Fixes #16734.
Dependency Updates:
- Added
enquirer
dependency. Fixes #16846.
7.5.0​
Released 06/07/2021
Features:
- The Test Runner has a new 'Docs' menu with links and prompts specific to helping you get started writing tests, set up in CI, and running tests in the Dashboard. Addressed in #16433.
cy.request()
now accepts a generic in TypeScript for specifying the type of the request body. Addresses #9109.
Bugfixes:
- Cypress will not longer crash with a
hasBinary
infinite recursive call. Fixes #16476. - The
--config-file
option now correctly handles absolute paths. Fixes #6136. cy.location(<key>)
will now retry if the remote location returns an empty string, which is possible during otherwise harmless redirects. Fixes #16463.- Cypress now passes a flag to Chrome browsers to prevent update notifications from displaying in some cases. Fixes #16693.
- TypeScript will now properly error when attempting to use the chai
<value>.should()
syntax. Fixes #16548.
Dependency Updates:
- Replaced deprecated
listr
withlistr2
. Addressed in #16663.
7.4.0​
Released 05/24/2021
Features:
- Cypress now detects and supports testing in the Chrome Beta browser. Addresses #16376.
- There are new keyboard shortcuts to continue (c) and to go to the next test
(n) when the Test Runner is paused via
.pause()
and to toggle auto-scrolling of the Test Runner (a). Addresses #248.
Bugfixes:
cy.request()
can now send binary files in form data. Fixes #1647.cy.request()
can now send blob data. Fixes #6178.- Fixed an issue where
cy.wait()
could yield the incorrect result when used withcy.intercept()
and several simultaneous requests. Fixes #16451. - Improved the way that
cy.intercept()
matchers are displayed in the Command Log when usingRouteMatcher
properties besidesurl
andmethod
. Fixes #9403. cy.intercept()
argument validation has been improved. Invalid hostnames and extra arguments passed tocy.intercept()
now result in an error. Addressed in #16577.cy.screenshot()
no longer incorrectly captures parts of the Test Runner UI during component testing. Fixes #16543.- Spec files that containing spaces in the path will now properly open during
cypress open-ct
. Fixes #16278. - Cypress now correctly uses the
componentFolder
andtestFiles
values from returned from plugins in the component testing runner. Fixes #16424. - Video recordings in Chrome, Chromium, and Electron browsers will no longer drop frames, with the frequency increasing along with the length of the video. Fixes #16648.
- Tests located outside of the
projectRoot
will now open in IDE and generate studio commands when saved. Fixes #16255. config
in the plugins file will now display in alphabetical order. Fixes #16564.
Dependency Updates:
- Upgraded
dependency-tree
from7.0.2
to8.1.0
. Addressed in #16464. - Upgraded
extract-zip
from1.7.0
to2.0.1
. Fixes #6896
7.3.0​
Released 05/10/2021
Features:
- Component tests can now be launched via the
Module API by passing
testingType: 'component'
via the newtestingType
property. ThetestingType
will default toe2e
. Addresses #16302. cy.intercept()
now accepts atimes
option in theRouteMatcher
.times
will specify the number of times that a particularcy.intercept()
should be applied. Addresses #4460 and #8531.cy.intercept()
now accepts invocation usingcy.intercept(url, routeMatcher, handler)
, whereurl
is a regular expression. Previously, this only worked ifurl
was a string. Addresses #16390.- Cypress will now automatically get environment variables for LayerCI when recording to the Dashboard. Addresses #16101.
- Setting the env var
DEBUG=cypress:server:record:ci-info
will print commit information and CI provider information that's sent to the Dashboard as debug logs. Addresses #16236. - Cypress can now use the certificate authority specified in npm config if
CYPRESS_DOWNLOAD_USE_CA
is specified. See "Using a custom CA" for more information. Addresses #8825.
Bugfixes:
- Cypress will no longer incorrectly redirect the AUT window to
/__/
whenlocation.href
is set to a relative path within the call stack of an XHR event handler. Fixes #3975 and #7439. - Cypress now properly handles when a form submit or anchor tag target is set to
_top
or_parent
so that it no longer redirects the parent frame. Fixes #1244. - Fixed a regression in 6.5.0 that could
cause Cypress to crash with a
RangeError: Maximum call stack size exceeded at _deconstructPacket
error. Most commonly, this occurred when handling network errors withcy.request()
. Fixes #15101. - Fixed a regression in 7.0.0 that caused
the Test Runner to crash with an
ERR_INVALID_ARG_TYPE
type error when testing a binary file upload. Fixes #15898 and #16223. - When verifying Cypress, we now listen for the 'close' event instead of the 'exit' event in an effort to fix some situations where the browser cannot be found even though it is on the system. Addressed in #16312.
- Fixed a regression in 6.5.0 that caused
a node warning about
.then()
only accepting functions to display. Fixes #15281. cy.intercept()
now adds aaccess-control-expose-headers: '*'
header by default for CORS requests unless overridden. Fixes #15050.- Improved the way that
cy.intercept()
andcy.route()
requests with multiple aliases are displayed in the command log. Addressed in #16382. - Cypress now correctly shows all
.should('contain')
assertions when chained after.should('be.visible')
. Fixes #16006. Cypress.cookies.debug(true)
will now correctly show cookie-related messages on the console. Fixes #15032.cy.log()
will now show all arguments, not only the first 2. Fixes #16068..select()
now correctly selects option elements with values that have
characters. Fixes #16045.- The
e2e
andcomponent
configuration values will now correctly show when previewing resolved configuration in the Test Runner. Fixes #16282. - When passing the
—quiet
flag, Cypress will no longer print uploading output to Stdout. Fixes #16268. - When pressing the
/
hotkey in Firefox, Cypress will select the SpecList's SearchInput as it does in other browsers. Fixes #16309. - Cypress will now detect the default installation location of the Visual Studio Code editors on Windows machines. Fixes #15080.
- Changing files extensions when creating a new test file should no longer add extra dots to the filename on Windows machines. Fixes #16131.
Dependency Updates:
- Upgraded
classnames
from2.2.6
to2.3.1
. Addressed in #8337. - Upgraded
color-string
from1.5.4
to1.5.5
. Addressed in #16362. - Upgraded
lodash
from4.17.19
to4.17.21
. Addressed in #16406. - Upgraded
registry-js
from1.13.0
to1.15.0
. Addressed in #16409. - Upgraded
url-parse
from1.4.7
to1.5.0
. Addressed in #16408.
7.2.0​
Released 04/26/2021
Features:
- You can now navigate through folders in the Test Runner using the Tab keyboard input and open or close the folder's content with the Enter & Space keyboard inputs. Addresses #3741.
Performance:
- Fixed a regression in 7.0.0 that caused tests to run slowly, especially when run with constrained CPU resources. Fixes #15853.
- Fixed a regression in 7.0.0 causing decreased performance in Chromium browsers due to requesting screencast frames when video is disabled. Fixes #16030.
Bugfixes:
- Fixed a regression in 7.0.0 that caused
the Test Runner to crash with an
ERR_INVALID_ARG_TYPE
type error. We now correctly detect a utf8 request body with multi-byte Unicode characters. Fixes #15901. - Reusing
cy.intercept()
aliases will now work as expected. Fixes #15823. - Fixed an issue in 7.0 where users could get a misleading "must pass a handler
as the 3rd argument" error when using
cy.intercept
. Fixes #16117. cypress run-ct
no longer hangs on Windows machines. Fixes #15976.- Hovering over a command log without a snapshot will no longer cause the error
Cannot read property 'name' of null
. Fixes #15816. - We now throw an error when attempting to
.select()
an<option>
within a disabled<fieldset>
. Fixes #5951. .type()
will no longer change thevalue
attribute of button-like inputs with type button, submit, reset, image, radio, or checkbox. Fixes #15913.- Specs will now load when using a relative directory for
componentFolder
outside of the root project when specifying--project
. Fixes #16053. - The search input will now display when there are many component spec files. Fixes #16089.
Misc:
- Lodash types have been updated. Addressed in #15860.
- Types for the selector playground have been added. Addressed in #15834.
Cypress.Cookies.defaults()
now returns the correct type instead ofvoid
. Addresses #15426..then()
will show the correct type when a collection of HTMLElements is provided. Addressed in #15869.- Improved types for
cy.intercept()
. Addressed in #16167.
Dependency Updates:
- Downgraded the Chromium browser version used during
cypress run
and when selecting Electron browser incypress open
from89.0.4348.1
to89.0.4328.0
. This was done to address a performance regression introduced in 7.0.0. Addressed in #16113. - Upgraded
systeminformation
from5.3.1
to5.6.4
. Addressed in #15819. - Replaced
lolex
with@sinonjs/fake-timers
. Addressed in #15595.
7.1.0​
Released 04/12/2021
Features:
- The events
before:spec
,after:spec
,before:run
, andafter:run
now fire in interactive mode in addition to run mode. This requires theexperimentalInteractiveRunEvents
flag to be enabled. Addressed in #15787.
Bugfixes:
- Viewport configuration set in
cypress.json
is now correctly applied in the Component Test Runner. Fixes #15899. - Running specs on Windows is now supported in the Component Test Runner. Fixes #15842.
- Fixed an issue where crashes in Cypress would cause a misleading "Unknown signal: true" error after the actual crash message. Fixes #15943.
- Fixed an issue introduced in 7.0.0 where requests with responses stubbed via
cy.intercept(routeMatcher, staticResponse)
would still be sent to the destination server. Fixes #15841.
7.0.1​
Released 04/07/2021
Bugfixes:
- Fixed a regression in 7.0.0 that caused the test runner not to check for updates. Fixes #15829.
- The component testing spec list search input no longer throws an exception
when hitting
Enter
. Addressed in #15833. - The preferred file opener modal no longer appears behind the command log. Addressed in #15831.
- Cypress no longer crashes in certain circumstances when running in Docker
without
--ipc=host
. Fixes #15814 and #350. - Node.js warnings are no longer incorrectly printed to
stderr
in production builds of Cypress. Addressed in #15817. - Cypress no longer prints a warning to
stdout
when the video cannot be found after a run. Addressed in #15828. - A warning is no longer displayed when running a TypeScript spec without a
tsconfig.json
file present. Addressed in #15828.
Misc:
- The "New Spec File" in the Desktop GUI has a less pronounced style. Addressed in #15835.
7.0.0​
Released 04/05/2021
Summary:
🎉 Introducing the Cypress Component Test Runner - now in alpha. Today's release includes a brand new test runner designed to replace your Node-based component tests. Our Component Test Runner tests your components in the browser, just like a user would. And, since it runs in the browser, you get to debug your components using your favorite developer tools. Read our Component Testing Guide for more details.
Breaking Changes:
Please read our Migration Guide which explains the changes in more detail and how to change your code to migrate to Cypress 7.0.**
- We introduced several breaking changes to
cy.intercept(). See the
cy.intercept() docs for full usage examples.
Breaking changes:
- Request handlers supplied to
cy.intercept()
are now matched starting with the most recently defined request interceptor. This allows users to override request handlers by callingcy.intercept()
again. This matches the previous behavior that was default incy.route()
. Addresses #9302. cy.intercept()
now automatically parses more JSON MIME types, including 'application/vnd.api+json'. You can now removeJSON.parse(req.body)
orJSON.parse(res.body)
from some tests that previously required it. Addresses #14763.- Falsy values (with the exception of
undefined
) supplied as the body of aStaticResponse
tocy.intercept()
will now be JSONified and sent as the body. Previously, an empty string was sent instead. Addresses #15234 and #14205. - The
matchUrlAgainstPath
RouteMatcher
property has been removed fromcy.intercept()
. - The "substring match" from
cy.intercept()
URL matching has been removed. Previously, a URL would match if it contained the supplied string anywhere. Now, the URL (including querystring) only matches if it is an equality match or a minimatch. res.delay()
andres.throttle()
have been renamed tores.setDelay()
andres.setThrottle()
, respectively. Addresses #15700.cy.route2()
was previously aliased tocy.intercept()
. Now the aliascy.route2()
has been removed. Please update usage ofcy.route2()
tocy.intercept()
. Addressed in #14709.
- Request handlers supplied to
- Component tests have been migrated to use a dedicated test runner and are
bundled differently. See the
Migration Guide for
full examples on how to migrate. Addressed in
#14479.
- Component tests will not be executed when running
cypress open
orcypress run
. Now, they need to be executed by runningcypress open-ct
orcypress run-ct
. Addressed in #15701. experimentalComponentTesting
must be removed from your configuration file,cypress.json
by default, or it will throw an error. Addressed in #15701.- The
file:preprocessor
event is no longer used to compile component tests. Now, adev-server:start
event must be registered.
- Component tests will not be executed when running
- Cypress now catches uncaught errors and fails the test even if the application
under test has defined
window.onerror
. Addresses #8802. - Cypress now fails tests if there is an unhandled promise rejection in the
application under test. Unhandled rejections will trigger the
uncaught:exception
event with the promise as the third argument. Addresses #243. - Cypress now throws an error if the application under test redirects more than
20 times. The number of times allowed to redirect is configurable via the
redirectionLimit
config. Addresses #14445. - The default preprocessor now targets a more modern version of ECMAScript. Addressed in #15274.
- We now enable
contextIsolation
by default in the Electron browser. You can override this option if needed within thebefore:browser:launch
API. Addressed in #15493. Cypress.moment()
has been removed. Please migrate to a different datetime formatter. See our recipe for example replacements. Addresses #8714.- The bundled Node.js version was upgraded from
12.18.3
to14.16.0
. This could change the behavior of code within thepluginsFile
when using the bundled Node.js version of Cypress. Addressed in #15292. - Installing Cypress on your system now requires Node.js 12+. Addresses #9545.
- The default headless browser window size has been increased to 1920x1080 pixels to capture High-definition videos and screenshots. Addresses #15752, #15730, and #15481.
Features:
- A command log entry is now displayed when there is an uncaught exception or unhandled rejection. Addresses #8236.
- We added several features to cy.intercept(). See
the cy.intercept() docs for full usage examples.
Addressed in #14543. New
features:
- There are new events on the req object for
cy.intercept()
includingbefore:response
,response
, andafter:response
. - Response handlers (supplied via event handlers or via
req.continue(cb)
) supplied tocy.intercept()
will be called in reverse order untilres.send
is called or until there are no more response handlers. - A new option,
middleware
, has been added to theRouteMatcher
type. If true, the supplied request handler will be called before any non-middleware request handlers. - A new function,
req.continue(cb)
, is available on request objects yielded bycy.intercept()
. It is functionally the same asreq.reply(cb)
- the request will stop propagating to other event handlers, will be sent outgoing, and the response will be handled by cb. cy.intercept()
can now be called with a new overload:cy.intercept(url, routeMatcher, handler)
.routeMatcher
will be merged withurl
, and the handler is required.
- There are new events on the req object for
cy.visit()
can now visit pages withapplication/xhtml*
content-type. Addresses #15738.- You can now pass runner specific configuration in order to pass different
configuration values to
component
tests versuse2e
tests. Addressed in #15526. - There's a new keyboard shortcut (
ctrl/cmd + f
) to search spec files in the Test Runner based on your OS. Addresses #6229. - You can now create a new spec file directly from the Test Runner in the Desktop. Addressed in #15335.
cy.tick()
now accepts alog
option. Addresses #15180.- The Cypress proxy now adds a
keep-alive
header to all proxy responses. Addressed in #15292 - Cypress no longer forces specific
NODE_OPTIONS
. Addressed in #15292
Bugfixes:
- The
response.body
ofcy.intercept()
is now correct after stubbing a response usingres.send({ fixture })
in areq.continue
callback or abefore:response
orresponse
handler. Addressed in #14543. - Fixed an issue where only the first matching alias for a route would yield a
response object on
cy.wait()
. Fixes #14522. .click()
will no longer fail with "coordsHistory must be at least 2 sets of coords" when specifying{ multiple: true }
. Fixes #3738.- Cypress now checks visibility correctly when an element has CSS "position: sticky". Fixes #14938.
- After selecting a project in global mode and clicking the back button, Cypress will no longer crash. Fixes #15089.
- Errors
Refused to apply style
are gone from the console inopen-ct
during Component Testing. Addressed in #15661. - Some memory leaks were fixed in
@cypress/vue
. Addressed in #15275.
Misc:
- The types for
set-cookie
allowstring[]
, so the header's type has been changed to reflect this. Addresses #15419. - The type definition for
cy.writeFile()
now allows 4 arguments. Addresses #15353. .then()
will show the correct type when raw HTMLElements are provided. Addresses #14875- The Cypress Studio icon now displays properly for tests with long titles. Addresses #15182.
- There were some minor improvements made to the UI when setting up a project in the Test Runner. Addressed in #15665.
Dependency Updates
- Upgraded Chrome browser version used during
cypress run
and when selecting Electron browser incypress open
from87
to89
. Addressed in #15292. - Upgraded bundled Node.js version from
12.18.3
to14.16.0
. Addressed in #15292. - Upgraded
electron
from11.3.0
to12.0.0
. Addressed in #15292.
6.9.1​
Released 4/5/2021
This release contains the same features as 6.8.0. It was published to provide a non-breaking alternative to 6.9.0, which was mistakenly published with breaking changes.
6.9.0​
Released 4/5/2021
This release was mistakenly published with breaking changes, is deprecated, and should not be used. Upgrade to 6.9.1 or 7.0.0, or stay on 6.8.0.
6.8.0​
Released 3/17/2021
User Experience:
- Improved the specs list user interface with a new icon set and accessibility features when in Component Testing mode (alpha). Addressed in #15513
Bugfixes:
- Cypress will no longer exit with an error when recording a run to the Dashboard with empty specfiles. Fixes #15512.
- When using
experimentalStudio
, Cypress Studio the icon to add commands will now fully display on long test titles. Fixes #15182.
6.7.1​
Released 3/15/2021
Bugfixes:
- Interacting with an element that requires scrolling within an element with
scroll-behavior: smooth
no longer fails Cypress's actionability check. Fixes #15453. - A regression in 6.7.0 has been fixed so that the
projectId
will be written correctly to thecypress.json
file on initial creation without an extra config object. Fixes #15497.
6.7.0​
Released 3/15/2021
Features:
- The
experimentalRunEvents
configuration flag has been removed. You can now listen tobefore:run
,after:run
,before:spec
andafter:spec
events in the plugins file without needing the experimentalRunEvents configuration option. See thebefore:run
,after:run
,before:spec
andafter:spec
docs for more information. Addressed in #15276. - When canceling a run from the Dashboard, previously only parallelized runs would cancel correctly. Now all recorded runs will respect cancelation and exit early. Addresses #1691.
- Test configuration is now captured and sent when recording to the Dashboard. Addresses #15487.
- Cypress now sends test details to the Dashboard at the beginning of a recorded run, so historical test code and other data can be provided to the Dashboard upfront. Addressed in #14925.
- The full stack trace from errors thrown in the preprocessor are now displayed. Addressed in #15198.
- Configuration values which are changed at runtime prior to tests running are now properly shown as resolved from the spec code within the Module API to indicate where the change originated from. Addresses #15486.
Bugfixes:
- FFmpeg will no longer error ("width not divisible by 2") during video recording in Chromium-family browsers, including Chrome, Electron, and Edge. Fixes #3491 and #15300.
- cy.wait() no longer falsely returns a timeout when the user aborts an XHR. Fixes #9549.
- .clear() and
.type('{selectall}{del}')
now behave the same when they're used against elements that contain text inputs. Fixes #8447. - When using
experimentalStudio
, Cypress Studio now records typing by using the value of the input rather than the keys that were pressed. Studio also no longer records pressing special keys (such as arrows or ctrl) except for Enter. Fixes #15023. - Empty jQuery objects are now properly shown in error messages in the Command Log. Fixes #14279.
- Length assertions on DOM elements now properly show the user-defined assertion message if specified. Fixes #14484.
- Cypress no longer scrolls on
mouse down
event, fixes #8279.
Misc:
- We updated the UI when connecting a project to the Dashboard. Addressed in #14877.
- "Test recordings" recorded to the Cypress Dashboard are now referred to as recorded "test results." Addresses #15376.
- Errors shown from the plugins file now display top-aligned. Addressed in #15347.
Dependency Updates:
- Upgraded
electron
from11.2.3
to11.3.0
. Addressed in #15201.
6.6.0​
Released 2/18/2021
Features:
- Cypress now extracts and sends CodeFresh CI default variables when recording to the Dashboard. Addresses #4609
Dependency Updates:
- Upgraded
ramda
to version0.27.1
. Addressed in #14958.
6.5.0​
Released 2/15/2021
Performance:
- Improved the startup time of
cypress open
andcypress run
. Addresses #15075.
Bugfixes:
- Fixed an issue where tests would display as failed if an event (such as an XHR request) failed after the test was already completed. This only affects the display of the test and not what was reported in run mode, so it would not have had an effect on suites running in CI. Addresses #14978.
- Fixed a regression introduced in 6.4.0 that caused Electron to crash when opening outside links in the Command Log. Addresses #14912.
- Fixed an issue where browser paths with double backslashes would not work as expected on Windows. Addresses #14719.
- Fixed Microsoft Edge browser detection when passing a path on Windows. Addresses #14716.
- Fixed an issue where the types for
Cypress.on
did not support chaining. Addresses #14991. - Fixed an issue where, when installing two Cypress instances simultaneously,
the downloaded
.zip
could become corrupted and break the install process. Addresses #4595.
Misc:
- Expanded search bar in desktop GUI to fill the entire width. Addresses #14830.
- Added
autoEnd
to the types forLogConfig
. Addresses #9590. - We collect more variables from Bitbucket pipelines to correctly display the pull request information in the Dashboard. Addresses #15081.
Dependency Updates:
- Upgraded
electron
to version11.2.3
. Addresses #15056.
6.4.0​
Released 2/1/2021
Features:
- There's now a Command Log entry in the Test Runner for when a file is downloaded. Addresses #14749.
Deprecations:
- The
delayMs
option for cy.intercept() has been renamed todelay
.delayMs
will still work, but it is deprecated and will be removed in a future release. Addresses #14822.
Bugfixes:
- Fixed an issue causing a webpack compilation error when a
browserslist
is present in project root. Addresses #8864. - Fixed an issue with cy.intercept() where aliases
set via
req.alias
containing a period character would not work as expected. Addresses #14444. - Fixed an issue where delays set using cy.intercept() would not work as expected. Addresses #14446 and #14511.
- Reverted a change to how the Chrome DevTools Protocol is established. Instead of using stdio and then falling back to TCP, Cypress now only uses TCP to try to connect to Chrome DevTools Protocol. Addresses #14819.
- We now better handle spec paths containing special characters so they properly show in the code frame and work when interacting via your IDE. Addresses #14659.
- We addressed several issues with the experimental
Cypress Studio. To enable the Cypress
Studio you can set
experimentalStudio
totrue
in your Cypress configuration. Issues addressed:- Cypress Studio now prompts to start adding commands after visiting an inputted url. Addresses #14688.
- Empty
.type()
commands will no longer be generated when tabbing through inputs. Addresses #14684. - Cypress Studio no longer prompt to enter a URL if the test is in an errored state. Addresses #14686.
- Cypress Studio now reloads tests when
watchForFileChanges
isfalse
. Addresses #14744. - An empty
.click()
command will no longer be added before.type()
in Cypress Studio when it is followed by typed characters. Addresses #14685. - Cypress Studio will now use the correct selector for an element even if the click event changed the selectors. Addresses #14658.
- Multi-select
selects
are now supported in Cypress Studio. Addresses #14743. - There's an improved UI for command failures within Cypress Studio. Addresses #14691.
- The Selector Playground is now closed automatically when Cypress Studio is opened. #14689.
Misc:
- The "no specs found" error now displays which directory it searched for specs. Addresses #14532.
- More types for the resolved config property have been added. Addresses #14392.
Dependency Updates:
- Upgraded
@cypress/get-windows-proxy
to version1.6.2
. Addressed in #14711. - Upgraded
electron
to version11.2.1
. Addressed in #14764. - Upgraded
recast
to version0.20.4
. Addressed in #14623. - Upgraded
registry-js
to version1.13.0
. Addressed in #14668. - Upgraded
semantic-release
to version17.2.3
. Addressed in #14713. - Upgraded
systeminformation
to version4.31.1
. Addressed in #14715.
6.3.0​
Released 1/19/2021
Features:
- Cypress Studio provides a visual way
to generate tests within the Test Runner, by recording interactions against
the application under test. Cypress Studio is an experimental feature that can
be enabled by adding the experimentalStudio
attribute to your configuration,
cypress.json
by default. Address #73. - You can now test file downloads in Cypress without the download prompt
displaying. Any files downloaded while testing file downloads will be stored
in the downloadsFolder which is
set to
cypress/downloads
by default. ThedownloadsFolder
will be deleted before each run unless trashAssetsBeforeRuns is set tofalse
. Addresses #949.
Bugfixes:
- When an uncaught exception is thrown outside a suite with an
.only
, the error will now correctly display in the Command Log. Fixes #14455. - Cypress will no longer crash when no record key is provided to the
--key
flag when followed by other CLI flags. Fixed #14593. - Extra screenshots will no longer be taken when tests are retried when there is
a failure in an
afterEach
hook. Fixes #9209. - Having
waitForAnimations
set tofalse
no longer affects whether Cypress fires actions on inner elements. Fixes #14370. - We fixed a regression in 5.0.0 that would cause string
CYPRESS_
prefixed env variables containing commas to be parsed as multiple values. Fixes #8818. - We fixed a regression in 4.9.0 where asserting
have.value
on an undefined subject would throw an error. Fixes #14359. - We updated the CDP connection to attempt to use the stdio transport first with Chrome 72 and above, before falling back to using TCP. This should remediate issues causing sporadic "Cypress failed to make a connection to the Chrome DevTools Protocol after retrying" errors. Fixes #6540, #7450, #8674, and #8986.
Misc:
- We removed several Chrome flags that are no longer supported. Addressed in #14582.
- You can now open the actively running spec file in your IDE. Addressed in #14521.
Dependency Updates:
- Replaced deprecated
node-sass
withsass
. Addressed in #14415. - Upgraded
debug
from4.1.1
to4.3.1
. Addressed in #14583. - Upgraded
electron
from11.0.3
to11.2.0
. Addressed in #14567. - Upgraded
electron-builder
from22.8.0
to22.9.1
. Addressed in #14493. - Upgraded
shell-env
from3.0.0
to3.0.1
. Addressed in #14622. - Upgraded
uuid
from8.2.0
to8.3.2
. Addressed in #14170.
6.2.1​
Released 1/4/2021
Bugfixes:
- Test retries, when retrying on several failed tests, will no longer cause
hanging during
cypress run
. Fixes #9040. multipart/form-data
is no longer wrongly encoded when using cy.intercept(). This should preventUnexpected end of multipart data
errors on the back end service where the request was pointing to. Fixes #9359.- cy.contains() no longer throws an error when a single quote is used inside its argument when RegExp. Fixes #8626.
- Passing
capture: 'runner'
to a cy.screenshot() command inside .within() now screenshots the entire Test Runner as expected. Fixes #14253. - Cypress.dom.isJquery() now always returns a
boolean instead of
undefined
sometimes. Fixes #14278. calledOnceWith
andcalledOnceWithExactly
sinon matchers no longer throw an error when used within Cypress. Fixes #9644.- We now pass
--disable-backgrounding-occluded-windows
as a default flag to Chrome to prevent backgrounding rendering when the Cypress window is occluded. Fixes #9604.
Misc:
- After login, if a name is undefined on your profile, the Test Runner will show the profile's email and link to instructions to update the name. Addresses #14288.
Dependency Updates:
- Upgraded
devtools-protocol
from0.0.734984
to0.0.839267
. Addressed in #14353. - Upgraded
electron
from11.0.3
to11.1.1
. Addressed in #14352.
6.2.0​
Released 12/21/2020
Features:
- You can now listen to
before:run
,after:run
,before:spec
andafter:spec
events in the plugins file when setting the experimentalRunEvents configuration option totrue
. See thebefore:run
,after:run
,before:spec
andafter:spec
docs for more information. Addressed in #9646, #14178 #14238 and #14263. - The
Timed out retrying
error message now displays the amount of time Cypress retried. Addresses #5781. - The RouteMatcher argument for cy.intercept() has a
new
matchUrlAgainstPath
property. When set totrue
, Cypress will match the suppliedurl
against incomingpath
s. Addressed in #14241.
Bugfixes:
- Passing a URL as a string or RegExp to
cy.intercept() will automatically set
matchUrlAgainstPath
totrue
. This means that the supplied string or RegExp will be matched against the path if matching against the URL fails. Fixes #9379 and #14256. - Getting an alias of cy.intercept() using
cy.get() will no longer always yield
null
. Fixes #9306. - cy.intercept() will now automatically responds to
CORS preflight requests (HTTP
OPTIONS
requests) that match defined routes. Fixes #9599. - Response errors from
forceNetworkError
can now be awaited using cy.intercept() and cy.wait(). Fixes #9062. - Using cy.log() inside .then() no longer breaks the subject value in the command chain. Fixes #8084.
- Using
Cypress.Commands.overwrite
to overwrite .then() now preserves the proper
this
context and sets aliases correctly. Fixes #5101. - Using
Cypress.Commands.overwrite
to overwrite
cy.route()
or cy.intercept() and wait on its alias now properly works. Fixes #3890 and #9580. - Cypress no longer fails to find specs if you set the fixtures folder to be the same as the integration folder. Fixes #14226.
- Cypress no longer fails to show error code frames if the spec filename has a space in it, fixes #7553.
Misc:
scrollBehavior
is now an allowed type when passed as test configuration. Addresses #9643.- The
FileObject
type for the file argument of thefile:preprocessor
event now includes theEventEmitter
type. Addresses #9276.
Dependency Updates:
- Upgraded
electron
from11.0.2
to11.0.3
. Addressed in #9409.
6.1.0​
Released 12/07/2020
Features:
- There's a new
scrollBehavior
configuration option that controls the viewport position when an element is scrolled prior to action commands. Possible values are'top'
,'bottom'
,'center'
,'nearest'
, andfalse
, with'top'
being the default.scrollBehavior: false
disables scrolling altogether.scrollBehavior
can be specified in global configuration, test configuration or individual action commands viaoptions
. Addresses #871 and #4356. - The Tests tab in the Test Runner now orders folders before files. This matches the ordering of most IDEs' file explorers. Addresses #7334.
Bugfixes:
- Responses stubbed from cy.intercept() will now
automatically set
Access-Control-Allow-Origin
andAccess-Control-Allow-Credentials
to permissive values unless explicitly overridden. Fixes #9264. - The
Cannot read property "fireChangeEvent" of undefined
error will no longer throw during a race condition when using cy.intercept(). Fixes #9170. - HTTP responses that cannot have a body (like HTTP 304 and HTTP 204) can now be awaited using cy.intercept(). Fixes #8934 and #8999.
- We fixed an issue where HTTP redirects could not be awaited using cy.intercept() unless dynamically intercepted. Addressed in #9097.
- Tests will no longer hang in certain situations when there's an error in a
before()
hook. Fixes #9162. - We no longer strip
/
from URLs when they are explicitly passed with query parameters. Fixes #9360. - Fixed the regression in
Cypress.dom.isVisible
behavior for elements withposition: fixed
, addresses #8998 and #9031.
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.
Cypress.moment
has been deprecated and will be replaced in a future release. Consider migrating to a different datetime formatter. Addresses #8714.
Misc:
- We collect more environment variables from Bitbucket to better detect reruns. Addresses #9309.
waitForAnimations
andanimationDistanceThreshold
types are now included for all actionable commands. Addresses #8854.
Dependency Updates:
- Upgraded
mocha-junit-reporter
from1.23.1
to2.0.0
. Addressed in #9528.
6.0.1​
Released 11/30/2020
Bugfixes:
- Chromium based browsers on version 87 will no longer show recorded videos as frozen or blank. Fixes #9265.
- We fixed a regression introduced in
5.0.0 that would cause an
Option 'sourceMap' cannot be specified with option 'inlineSourceMap'
error to throw when settingsourceMap
in your tsconfig. Fixes #8477. - cy.screenshot() no longer throws an
"offset" is out of range
error when Cypress attempts to crop the image. Fixes #2034. - cy.screenshot() types won't mistakenly display the command as deprecated. Fixes #9303.
- Lower-cased HTTP methods can now be used with cy.intercept(). Fixes #9313.
6.0.0​
Released 11/23/2020
Summary:
Cypress now offers full network stubbing support with the introduction of the
cy.intercept() command (previously cy.route2()
).
With cy.intercept() your tests can intercept, modify
and wait on any type of HTTP request originating from your app. See our guide on
Migrating cy.route()
to cy.intercept()
.
Breaking Changes:
Please read our 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 asnot.visible
,not.contains
,not.have.class
, etc will now fail when used on non-existent DOM elements. Addresses #205. - DOM elements where the CSS style (or ancestors) are
opacity: 0
are no longer considered visible. However these are still considered actionable and any action commands used to interact with the element will perform the action. This matches browser's implementation on how they regard elements withopacity: 0
. Addresses #4474. - The type yielded by cy.wait(alias) has changed in order to support use of cy.intercept(). Addressed in #9266.
- The
experimentalNetworkStubbing
option has been removed and made the default behavior. You can safely removed this configuration option. Addressed in #9185. - When using .type() and .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 #9066. - 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 #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 #8969. - JSON request and response bodies captured by
cy.intercept() are now automatically parsed,
removing the need to manually do
JSON.parse
. Addressed in #9280.
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()
andcy.route()
have been deprecated. In a future release, support forcy.server()
andcy.route()
will be removed. We encourage you to use cy.intercept() instead. See our guide on Migratingcy.route()
tocy.intercept()
. Addressed in #9185.experimentalFetchPolyfill
has been deprecated. We encourage you to use cy.intercept() to intercept requests using the Fetch API instead.cy.route2()
was renamed to cy.intercept(). We encourage you to update usages ofcy.route2()
to use cy.intercept(). Addressed in #9182.
Features:
- The new cy.intercept() command can be used to manage the behavior of HTTP requests at the network layer. Addressed in #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 yourplugins
file, you can now remove this code. Addresses #5336. - A warning is now displayed when passing invalid configuration keys through the CLI. Addresses #428.
- The
cypress version
command now also displays the current Electron and bundled Node versions. Addresses #9180. - The
cypress version
command now accepts a--component
flag that allows you to print the version of specific components of Cypress. ie Electron, Node, etc. Addresses #9214.
Bugfixes:
- We fixed a regression introduced in 3.5.0 that would cause .type() to not type the entire string when focus was called away from the target element. Fixes #9254.
- .type() and .click() now properly
work on elements inside a
contenteditable
element. Fixes #2717 and #7721. - We fixed a regression introduced in 5.6.0 that would cause the Test Runner to crashes and display a white page when switching tabs while tests are running. Fixes #9151.
- Fixed an issue where
Content-Length
forcy.route2
request bodies could be incorrectly recalculated. Fixes #9166.
Documentation Changes:
- Our Migration Guide has a new section for 6.0 migration.
- Many of our docs examples have been updated to use
cy.intercept() in place of
cy.route()
including our Network Requests doc.
Misc:
- Added the type of
redirects
and changedredirectedToUrl
optional for Response types. Addresses #9275.
Dependency Updates
- Upgraded Chrome browser version used during
cypress run
and when selecting Electron browser incypress open
from85
to87
. Addressed in #9222. - Upgraded bundled Node.js version from
12.16.3
to12.18.3
. Addressed in #9222. - Upgraded
electron
from10.1.5
to11.0.2
. Addressed in #9222.
5.6.0​
Released 11/09/2020
Features:
- You can now dynamically add aliases for requests intercepted via
cy.route2()
. See an example. Addresses #387. - You can now run all integration specs or all component specs separately (or a filtered list of specs) by clicking the appropriate button in the Test Runner in the Tests tab. Addresses #8203.
- Added a new modifier syntax to cy.type(). You can now
type shortcuts like
{ctrl+z}
. Addressed in #5694. - We now show a modal with release notes when available when there is a new version of Cypress. Addressed in #9006.
- In the Test Runner's Settings and Runs tab you can now quickly copy the project id configuration and record key using a copy to clipboard icon. Addresses #9002.
Bugfixes:
- Fixed a regression introduced in 4.12.0 where snapshotting caused images to load too many times. Fixes #8679.
- Using cy.visit() on sites with
content-type
oftext-html
followed by parameters (liketext/html;charset=utf-8
) will no longer throw an error about visiting a site with an invalid content-type. Fixes #8506 - The
Cannot access 'continueSent' before initialization
error will no longer throw when usingcy.route2()
. Fixes #8926. - Awaiting a request body when providing a static response stub in
cy.route2()
should now work properly. Addressed in #9059. - The way that intercepted
cy.route2()
requests are displayed in the Command Log has been improved, including showing the progress bar correctly. Addresses #9053. - The
Cannot read property 'replace' of undefined
error will no longer throw when attempting to generate the stack trace from an error thrown in the application. Fixes #7915. - Stack traces in the Command Log originating from application errors where the location is unavailable will no longer show as a clickable link to open in IDE. Fixes #9106.
- When using the
fixture:
prefix as a stubbed response tocy.route()
, JSON fixtures containing only a number or boolean will no longer throw an error. Fixes #4899. - Fixed an issue causing failed subresource integrity checks for external scripts. Fixes #8983, #9049, and #8992.
Misc:
- Typings for .invoke() and .its()
now allow for a
timeout
option. Addresses #9079. - Typings for
cy.task()
now allow for parameterizing the task return type. Addresses #7136. - A clearer error is printed during
cypress cache list
when no cached versions are found. Addresses #6303.
Dependency Updates:
- Upgraded
commander
from^4.1.1
to^5.1.0
. Addressed in #8979. - Upgraded
semver
from6.3.0
to7.3.2
. Addressed in #9068. - Upgraded
systeminformation
from4.26.9
to4.27.11
. Addressed in #8979. - Removed
node-webkit-updater
. This should remove some security warnings that were shown during install. Addresses #8314.
5.5.0​
Released 10/26/2020
Features:
- cy.viewport() has a new
macbook-16
preset. Addresses #8889. - .type() now fires the
beforeInput
event during typing. Note: Firefox does not support thebeforeinput
event. Addresses #7088.
Bugfixes:
- Updated the Cypress proxy layer to proxy HTTPS traffic from non-AUT origins.
Addressed in #8827.
- This fixed an issue with
cy.route2()
where HTTPS requests to a non-AUT origin would not be intercepted as expected.
- This fixed an issue with
cy.route2()
now properly handles passing a method as its first argument. Fixes #8729.- Fixed an issue with
cy.route2()
where a "Cannot set property response of undefined" error would occasionally occur. Fixes #8858. - Headers field names passed to
cy.route2()
now case-insensitively match against the field names of incoming HTTP requests. Fixes #8921. - Routes that stub fixtures for binary resources (including images) made with
cy.route2()
now serve the correct mime-type and content. Fixes #8623. - When experimentalNetworkStubbing is enabled, using cy.visit() to URLs that redirect and set Transfer-Encoding: chunked will no longer fail in Cypress with a "Parse Error". Fixes #8497.
cypress.run()
through the Module API now has astatus
property in the results matching the correct CLI types ("failed"
or"finished"
). Addresses #8798.- When a value containing an
e
character is passed to the--ci-build-id
flag, Cypress now properly reads it as a string. Fixes #8874.
Misc:
- Updated type definitions to allow for passed either
runMode
oropenMode
toretries
alone. Addresses #8869.
Dependency Updates:
- Upgraded
electron
from10.1.3
to10.1.5
. Addressed in #8927 and #8975.- This addresses a Chrome security issue, CVE-2020-15999. Addresses #8922.
- Upgraded
color-string
from1.5.3
to1.5.4
. Addressed in #8945. - Upgraded
pretty-bytes
from^5.3.0
to^5.4.1
. Addressed in #8964.
5.4.0​
Released 10/14/2020
Features:
- You can now run cypress cache prune to delete all installed Cypress versions from the cache except for the currently-installed version. Addresses #5972.
- There's a new
--size
option for the cypress cache list command that prints the sizes of the Cypress cache folders. Addresses #6404. - For video recordings of runs, there is now a video chapter key for each test. If your video player supports chapters, you can move to the start of each test right away. Addresses #3626.
- In Windows, you can now append the browser type to the end of the path passed
to the
--browser
flag, likecypress open --browser C:/User/App/browser.exe:chrome
, to help detect the browser type. Addresses #6389. - cy.viewport() has new
iphone-7
,iphone-8
, andiphone-se2
presets. Addressed in #8624 - When there is a new version of Cypress available, the update modal has a new design with 'copy to clipboard' buttons to copy the upgrade commands. Addressed in #8751.
- The Command Log can be hidden
by passing the
CYPRESS_NO_COMMAND_LOG=1
environment variable duringcypress open
orcypress run
to be used as a tool to debug performance issues. Addressed in #8689.
Bugfixes:
- We fixed a regression in 5.0.0 where the
chromeWebSecurity
option had no effect in Electron. Fixes #8399. - Tests will no longer hang and now properly throw when there is an error thrown
from a
test:after:run
event listener. Fixes #2271 and #8701. - When a command is chained after .within() and
cy.get()
is called inside it, the scope will no longer permanently change. Fixes #2106, #4672, #4757, and #5183. - Dual commands like cy.contains() when used after an .each() commands now query as expected. Fixes #4921.
/
is no longer added to the URL whenbaseUrl
has param(s). Fixes #2101.- When using
cy.route2()
the route handler timeouts will no longer leak into other tests and cause random failures. Addressed in #8727. - The
request.body
is now available when using cy.wait() on an aliasedcy.route2()
route which had not been intercepted. Fixes #8695. - Re-running failed build steps in Bitbucket will no longer create a new run on the Cypress Dashboard. Fixes #8720.
- The forced garbage collection timer will no longer display when using a version of Firefox newer than 80. Fixes #8725.
- The browser dropdown is no longer covered when opened from the Runs tab in the Test Runner. Fixed in #8745.
- Fixed an issue where preprocessor-related plugins would cause tests not to run and a duplicate instance of Cypress to be spawned. Fixes #8634.
Misc:
- Improved type definitions for
cy.route2()
. Addresses #8694 and #8782. - The Test Runner now shows an indicator in the footer and a toast notification if there is a new version available. Addressed in #8702 and #8803.
Dependency Updates:
- Upgraded Chrome browser version used during
cypress run
and when selecting Electron browser incypress open
from83
to85
. Addressed in #8406. - Upgraded bundled Node.js version from
12.14.1
to12.16.3
. Addressed in #8406. - Upgraded
electron
from9.2.1
to10.1.3
. Addressed in #8406. - Upgraded
firefox-profile
from2.0.0
to4.0.0
. Addressed in #8786. - Upgraded
node-forge
from0.9.0
to0.10.0
. Addressed in #8800.
5.3.0​
Released 9/28/2020
Features:
- Firefox support is now out of beta! 🎉 Firefox 80 and newer are now officially
stable when used with Cypress. Addresses
#8241.
- Versions of Firefox older than 80 can still be used, but will be subject to
the
firefoxGcInterval
workaround. The desktop GUI will display a warning if such versions are used.
- Versions of Firefox older than 80 can still be used, but will be subject to
the
Bugfixes:
- Fixed a bug where
cy.route2()
would not automatically JSONify an empty array handler. Addresses #8532. - Fixed a bug where objects yielded by using
cy.wait
on acy.route2()
alias would not always have aresponse
property. Addresses #8536. - Fixed an issue where
cy.route2()
routes would not be able to intercept requests to HTTPS destinations on a different origin. Addresses #8487. - Fixed an issue where subjects became
undefined
after certain assertion failures. Addresses #5763. - Fixed an issue where a
cy.task
with no arguments passed would receivenull
as the first argument instead ofundefined
. Addresses #5913. - Fixed an issue preventing users from passing the config-file argument when starting cypress through the node module API. Addresses #8632.
- Fixed an issue where
cy.visit()
s to a relative URL containing..
would not work. Addresses #5090. - Fixed an issue where Mocha hooks could still be triggered after the Test Runner was manually stopped. Addresses #8621.
- Fixed an issue where
cy.setCookie
failed when given a cookie name with a__Host-
prefix. Addresses #8261. - Fixed an issue where a misleading error was displayed when test code threw an
exception with a non-
Error
object. Addresses #7870.
Misc:
- The proxy now omits the
Content-Security-Policy-Report-Only
header the same way that it does forContent-Security-Policy
. Addresses #7936. - Added a
status
property toCypressRunResult
objects. Addresses #8580. - Updated types to no longer use deprecated Mocha interfaces. Addresses #5795.
- Passing an empty string to
CYPRESS_INSTALL_BINARY
now takes precedence over npm config. Addresses #8488.
5.2.0​
Released 9/15/2020
Features:
- Added the configuration option
includeShadowDom
for enabling shadow DOM querying globally, per-suite, per-test, or programmatically. Addresses #8442. - Added a
followRedirect
option to request interception withcy.route2()
, allowing redirects to be followed before continuing to response interception. Addresses #7967. - Added the capability to specify
delayMs
andthrottleKbps
when stubbing static responses withcy.route2()
. Addresses #7661. - Installing Cypress pre-releases no longer requires setting the
CYPRESS_BINARY_INSTALL
environment variable. Addresses #8482.
Performance Improvements:
- Fixed a performance issue which led to CPU bottlenecking during Cypress runs. Addresses #8012 and #8297.
Bugfixes:
- Fixed an issue where using TypeScript path aliases in the plugins file would error. Addresses #8555.
- Fixed an issue where using
cy.contains()
within a shadow root would not yield the correct element. Addresses #8494. - Fixed an issue where querying the shadow DOM in a
cy.within()
callback would throw the errorroot.getRootNode is not a function
. Addresses #8478. - Fixed an issue with
cy.type()
{moveToStart}/{moveToEnd}
special characters moving the cursor to the current line instead of the entire text editable when typing in acontenteditable
element. Addresses #8465. - Fixed an issue where typing into a manually-focused number input would prepend the number instead of appending it. Addresses #7170.
cy.type()
now fires aKeyboardEvent
event instead of anEvent
event. Addresses #6125 and #5650.- Fixed long selectors in the selector playground text input overflowing other page elements. Addresses #8247 and #4184.
- Fixed an issue where assertions on
cy.getCookie()
would be called twice. Addresses #6672. - Fixed an issue that caused the "Open in IDE" button on hooks and tests not to appear in Firefox. Addresses #8257.
- Fixed an issue causing Cypress to hang on test retry in run mode with certain assertions. Addresses #8363.
Documentation Changes:
- Fixed examples of delaying and throttling responses with
cy.route2()
. Addresses #8489. - Added examples of using a response function with
cy.route2()
. Addresses #8468. - Removed unmaintained languages. English docs is the only supported language by the Cypress team. We greatly appreciate the contributions from the community for other languages, but these docs are largely stale, unmaintained, and partial. The Cypress team will seek out more scalable docs internalization implementation in the future.
Misc:
- The
experimentalShadowDomSupport
configuration flag has been removed. It is no longer necessary to enable shadow DOM testing. - Improved the error message when the subject provided to
cy.shadow()
is not a shadow host. Addresses #8530. - Improved the error message when the Cypress binary is not executable. It now recommends trying to clear the cache and re-install. Addresses #8397.
- Added missing type declarations for the
cy.route2()
command. - Updated the type declaration for
Cypress.Commands.add()
, addingPromise
to the list of allowed return types. Addresses #7807.
5.1.0​
Released 9/1/2020
Features:
- Introducing experimental full network stubbing support 🎉.
- With
experimentalNetworkStubbing
enabled, thecy.route2
command is available. Addressed in #4176. - By using
cy.route2()
, your tests can intercept, modify, and wait on any type of HTTP request originating from your app, includingXMLHttpRequest
s,fetch
requests, beacons, and subresources (like iframes and scripts). - Outgoing HTTP requests can be modified before reaching the destination server, and the HTTP response can be intercepted as well before it reaches the browser.
- See the
cy.route2()
docs for more information on how to enable this experiment.
- With
cy.trigger()
now accepts aneventConstructor
option for specifying the constructor with which to create the event to trigger. Addresses #5650.
Bugfixes:
- Improved warnings for when user is exceeding test limits of the free Dashboard plan. Addresses #8409.
- Added
retries
toTestOptions
types. Addresses #8405. - Added types for
specType
field onCypress.spec
. Addresses #8256. - Fixed a typo in type definitions. Addresses #8417.
- Cypress now resolves and loads tsconfig.json for TypeScript projects starting from the plugins directory. Addresses #8359.
- Fixed an issue where, if npm config's
noproxy
is set, unexpected behavior could occur. Addresses #8287. - Fixed an issue where nesting hooks within other hooks caused the test to never finish. Addresses #8350.
- Fixed an issue in where tests would unexpectedly fail with a "Can't resolve 'async_hooks'" error. Addresses #8375.
- Fixed an issue where return values from blob utils were mistaken for promises and could cause errors. Addresses #8365.
- Fixed an issue with loading
.mjs
files. Addresses #8361. - Fixed an issue causing tests to run slowly in Electron. Addresses #7930.
- Using
.should
with only chainer assertions will now throw an error. Addresses #883. cy.trigger()
now includes theview
property in the event object when appropriate. Addresses #3686.- Fixed an issue where Cypress would not detect newer 64-bit installations of Chrome on Windows. Addresses #8425.
- Fixed an issue where Cypress would not detect per-user Firefox installations on Windows. Addresses #8432.
Dependency Updates:
- Updated dependency
iconv-lite
to version0.6.2
. Addresses #8387. - Updated dependency
command-exists
to version1.2.9
. Addresses #8388. - Updated dependency
electron
to version9.2.1
. Addresses #8436.
5.0.0​
Released 8/19/2020
Summary:
Cypress now includes support for test retries! Similar to how Cypress will retry assertions when they fail, test retries will allow you to automatically retry a failed test prior to marking it as failed. Read our new guide on Test Retries for more details.
Breaking Changes:
Please read our Migration Guide which explains the changes in more detail and how to change your code to migrate to Cypress 5.0.**
- The
cypress-plugin-retries
plugin has been deprecated in favor of test retries built into Cypress. Addresses #1313. - The Cypress.Cookies.defaults()
whitelist
option has been renamed topreserve
to more closely reflect its behavior. Addressed in #7782. - The
blacklistHosts
configuration has been renamed to blockHosts to more closely reflect its behavior. Addressed in #7622. - The
cy.server()
whitelist
option has been renamed toignore
to more closely reflect its behavior. Addresses #6642. libgbm-dev
is now a requirement to run Cypress on Linux. Addressed in #7791.- Values yielded by cy.setCookie(),
cy.getCookie(), and
cy.getCookies() will now contain the
sameSite
property if specified. Addresses #6892. - The
experimentalGetCookiesSameSite
configuration flag has been removed, since this behavior is now the default. Addresses #6892. - The return type of the Cypress.Blob methods
arrayBufferToBlob
,base64StringToBlob
,binaryStringToBlob
, anddataURLToBlob
have changed fromPromise<Blob>
toBlob
. Addresses #6001. - Cypress no longer supports file paths with a question mark
?
or exclamation mark!
in them. We now use the webpack preprocessor by default and it does not support files with question marks or exclamation marks. Addressed in #7982. - For TypeScript compilation of spec, support, and plugins files, the
esModuleInterop
option is no longer coerced totrue
. If you need to utilizeesModuleInterop
, set it in yourtsconfig.json
. Addresses #7575. - Cypress now requires TypeScript 3.4+. Addressed in #7856.
- Installing Cypress on your system now requires Node.js 10+. Addresses #6574.
- In spec files, the values for the globals
__dirname
and__filename
no longer include leading slashes. Addressed in #7982.
Features:
- There's a new
retries
configuration option to configure the number of times to retry a failing test. Addresses #1313. - .click(), .dblclick(), and
.rightclick() now accept options
altKey
,ctrlKey
,metaKey
, andshiftKey
to hold down key combinations while clicking. Addresses #486. - You can now chain
.snapshot()
off ofcy.stub()
andcy.spy()
to disabled snapshots during those commands. For example:cy.stub().snapshot(false)
. Addresses #3849.
Bugfixes:
- The error
Cannot set property 'err' of undefined
will no longer incorrectly throw when rerunning tests in the Test Runner. Fixes #7874 and #8193. - Cypress will no longer throw a
Cannot read property 'isAttached' of undefined
error duringcypress run
on Firefox versions >= 75. Fixes #6813. - The error
Maximum call stack size exceeded
will no longer throw when callingscrollIntoView
on an element in the shadow dom. Fixes #7986. - Cypress environment variables that accept arrays as their value will now properly evaluate as arrays. Fixes #6810.
- Elements having
display: inline
will no longer be considered hidden if it has child elements within it that are visible. Fixes #6183. - When experimentalShadowDomSupport is enabled, .parent() and .parentsUntil() commands now work correctly in shadow dom as well as passing a selector to .parents() when the subject is in the shadow dom. Fixed in #8202.
- Screenshots will now be correctly taken when a test fails in an
afterEach
orbeforeEach
hook after the hook has already passed. Fixes #3744. - Cypress will no longer report screenshots overwritten in a
cy.screenshot()
onAfterScreenshot option as a unique screenshot. Fixes #8079. - Taking screenshots will no longer fail when the screenshot names are too long for the filesystem to accept. Fixes #2403.
- The "last used browser" will now be correctly remembered during
cypress open
if a non-default-channel browser was selected. Fixes #8281. - For TypeScript projects,
tsconfig.json
will now be loaded and used to configure TypeScript compilation of spec and support files. Fixes #7006 and #7503. reporterStats
now correctly show the number of passed and failed tests when a test passes but theafterEach
fails. Fixes #7730.- The Developer Tools menu will now always display in Electron when switching focus from Specs to the Test Runner. Fixes #3559.
Documentation Changes:
- We have a new guide on Test Retries.
- Our Migration Guide has a new section for 5.0 migration.
Misc:
- Cypress now uses the webpack preprocessor by default to preprocess spec files.
- The Runs tab within the Test Runner has a new improved design when the project has not been set up or login is required. Addressed in #8141.
- The type for the
Window
object returned from cy.window() is now correct. Addresses #7856. - The type definition for Cypress's
ApplicationWindow
can now be extended. Addresses #7856. - The type definition for
reporterOptions
has been added. Addresses #7877.
Dependency Updates
- Upgraded Chrome browser version used during cypress run and when selecting
Electron browser in cypress open from
80
to83
. Addressed in #7791. - Upgraded bundled Node.js version from
12.8.1
to12.14.1
. Addressed in #7791. - Upgraded
chalk
from2.4.2
to4.1.0
. Addressed in #7650. - Upgraded
cli-table3
from0.5.1
to0.6.0
. Addressed in #7650. - Upgraded
electron
from8.3.1
to9.2.0
. Addressed in #7791 and #8235. - Upgraded
execa
from1.0.0
to4.0.2
. Addressed in #7650. - Upgraded
express
from4.16.4
to4.17.1
. Addressed in #8179. - Upgraded
fs-extra
from8.1.0
to9.0.1
. Addressed in #7650. - Upgraded
log-symbols
from3.0.0
to4.0.0
. Addressed in #7650. - Upgraded
tmp
from0.1.0
to0.2.1
. Addressed in #7650.
4.12.1​
Released 8/5/2020
Bugfixes:
- The error
Cannot set property 'err' of undefined
will no longer incorrectly throw when rerunning tests in the Test Runner. Fixes #7874. - Skipping the last test before a nested suite with a
before
hook will now correctly run the tests in the suite following the skipped test. Fixes #8086.
Dependency Updates:
- Upgraded
md5
from2.2.1
to2.3.0
. Addressed in #8161. - Upgraded
electron-context-menu
from0.15.1
to2.2.0
. Addressed in #8180.
4.12.0​
Released 8/3/2020
Features:
- Now you can control whether screenshots are automatically taken on test
failure during
cypress run
by settingscreenshotOnRunFailure
in your configuration. Addresses #5029. - The
pluginsFile
now has access to a readonlyversion
property within theconfig
object that returns the current Cypress version being run. This will allow plugins to better target specific Cypress versions. Addresses #6352. - During
cypress open
, you can now run a subset of all specs by entering a text search filter and clicking 'Run n tests' Addresses #6581.
Bugfixes:
position: fixed
elements that have a parent withpointer-events: none
will now correctly evaluate as visible. Fixes #6675.- Applications using custom elements will no longer trigger infinite XHR request loops. Fixes #1068.
- When snapshotting the DOM, Cypress no longer causes
attributeChangedCallback
to be triggered on custom elements. Fixes #7187. - Spec files containing
+
characters now properly run in Cypress. Fixes #5909. - When using the
fx
shortcut incy.route()
, an error is now thrown when the fixture file cannot be found. Fixes #7818. - Cypress no longer thrown
Cannot read property '__error' of null
error when passing a file containingnull
content to cy.fixture(). Fixes #8010. - Values containing exponential operators passed to
--env
via the command line are now properly read. Fixes #6891. - The "Open in IDE" button no longer disappears from hooks when the tests are manually rerun. Fixes #8094.
- When experimentalSourceRewriting is enabled, AST rewriting will no longer return an output before the body is done being written. This would happen when the response body was too large and the response would be sent while the body was still being modified. Fixes #8043.
- When using .type(), Cypress now properly types into an input within an iframe that auto focuses the input. Fixes #8111.
Misc:
- Dependencies for our
cypress
npm package are no longer pinned to a specific version. This allows the use ofnpm audit fix
to fix security vulnerabilities without needing a patch release from Cypress. Addresses #8046. - We now collect environment variables for AWS CodeBuild when recording to the Dashboard. Addressed #8101.
- Types inside Module API are now accessible via the
CypressCommandLine
namespace. Addresses #7309. - We added more type definitions for the .should() command. Addresses #5573.
- Cookie command's
expiry
property type is now a Number instead of a String. Addresses #8144. - There are some minor visual improvements to the Test Runner's Command Log when hovering, focusing and clicking on hook titles and pending tests. Addressed in #8153.
Dependency Updates:
- Upgraded
jimp
from0.13.0
to0.14.0
. Addressed in #8102. - Upgraded
moment
from2.26.0
to2.27.0
. Addressed in #8122.
4.11.0​
Released 7/21/2020
Features:
- You can now pass an
ensureScrollability: false
option to .scrollTo() to skip checking whether the element is scrollable. Addresses #1924. - cy.clock() now accepts Dates as well as a Number for now. Fixes #7786.
- The Module API has a new
cypress.cli.parseRunArguments
function to assist in parsing user-supplied command line arguments using the same logic ascypress run
uses. Addresses #7760.
Bugfixes:
- Running multiple specs within Firefox during
cypress run
on Windows will no longer fail trying to make a connection to the browser. Fixes #6392. - Cypress will no longer throw a
Cannot read property 'isAttached' of undefined
error duringcypress run
on Firefox versions >= 75. Fixes #6813. - Fixed an issue where Cypress tests in Chromium-family browsers could randomly fail with the error "WebSocket is already in CLOSING or CLOSED state." Fixes #7180.
- Taking a screenshot of an element that changes height upon scroll will no
longer throw an
invalid for option "size"
error. Fixes #6099. - Setting
viewportHeight
orviewportWidth
from within the test configuration now properly changes the viewport size for the duration of the suite or test. - Setting deep objects and arrays on
config
within thepluginsFile
now sets the values correctly. Fixes #7959. - The progress bar for
cy.wait()
now reflects the correctrequestTimeout
andresponseTimeout
of the command. Fixes #7881. - The command's progress bar will not longer restart when its parent test is collapsed in the Command Log. Fixes #7912.
- Key value pairs sent to
ELECTRON_EXTRA_LAUNCH_ARGS
askey=value
will now be properly read in. Fixes #7994. - Stubbed responses responding with an empty string to
cy.route()
now correctly display as 'xhr stub' in the Test Runner's Command Log. Fixes #8018. - Quickly reclicking the "Run All Tests" button in the Test Runners' Command Log will no longer throw errors about undefined properties and the tests will no longer hang. Fixes #7968.
Misc:
- The error messages thrown from
pluginsFile
andsupportFile
now mention that.ts
extensions are supported. Addresses #7940. - The style when focusing on tests in the Command Log has been updated. Addresses #7855.
Dependency Updates:
- Upgraded
@benmalka/foxdriver
from0.4.0
to0.4.1
. Addressed in #8040. - Upgraded
firefox-profile
from1.3.1
to2.0.0
. Addressed in #8000. - Upgraded
fix-path
from2.1.0
to3.0.0
. Addressed in #8028. - Upgraded
human-interval
from0.1.6
to1.0.0
. Addressed in #8031. - Upgraded
lodash
from4.17.15
to4.17.19
. Addressed in #7954. - Upgraded
plist
from2.1.0
to3.0.1
. Addressed in #8045. - Upgraded
proxy-from-env
from1.0.0
to1.1.0
. Addressed in #7900. - Upgraded
resolve
from1.13.1
to1.17.0
. Addressed in #7989. - Upgraded
systeminformation
from4.21.1
to4.26.9
. Addressed in #7975. - Upgraded
uuid
from3.3.2
to8.2.0
. Addressed in #7976, #8002, and #8011.
4.10.0​
Released 7/7/2020
Features:
- You can open a
before
,beforeEach
,after
, andafterEach
hook definition in your IDE from the Test Runner's Command Log by clicking the Open in IDE button. Addresses #7793. before
,beforeEach
,after
, andafterEach
hook definitions now display separately in the Test Runner's Command Log when defined in separate hook definitions. Addresses #7779.- You can now open a spec file directly from the Tests tab in the Test Runner by clicking the Open in IDE button. Addresses #7713
Bugfixes:
- HTTP requests taking longer than the default
responseTimeout
will no longer be prematurely canceled by the Cypress proxy layer. Fixes #6426. - Using Cypress commands to traverse the DOM on an application with a global
parent
variable will no longer throw Illegal Invocation errors. Fixes #6412. - When
experimentalShadowDomSupport
is enabled, using .type() on an input in the Shadow DOM will not result in an error. Fixes #7741. - When
experimentalShadowDomSupport
is enabled, checking for visibility on a shadow dom host element will no longer hang if the host element was the foremost element and had an ancestor with fixed position. Fixes #7893. - Debug logs from the
@benmalka/foxdriver
module will no longer appear if anyDEBUG
environment variable was set. Fixed #7723.
Misc:
Dependency Updates:
- Upgraded
recast
from0.18.8
to0.19.1
. Addressed in #7898.
4.9.0​
Released 6/23/2020
Features:
- An animated progress bar now displays on every command in the Command Log indicating how long the command has left to run before reaching its command timeout. Addresses #7642.
- There is now an experimentalFetchPolyfill
configuration option. When this option is
true
, Cypress will automatically replacewindow.fetch
with a polyfill that Cypress can spy on and stub. Addresses #7710. - You can now pass a
--quiet
flag to cypress run to silence any Cypress specific output from stdout. Addresses #7714.
Bugfixes:
- cy.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
). #7280. - We fixed a regression in 4.6.0 where errors thrown from the application under test as strings would not be correctly handled. Fixes #7590.
- We fixed a regression in 4.8.0 where .click()
would hang if the subject had a shadow root and
experimentalShadowDomSupport
was not enabled. Fixes #7679. - We fixed a regression in 4.6.0 so that
.should('have.value')
now properly asserts against<progress>
,<meter>
or<li>
element's values. Fixes #7603. - Cypress no longer responds with 413 responses during a recorded
cypress run
when the stdout is too large. Fixes #7548. - We fixed an issue where Cypress could exit successfully even with failing tests when launched in global mode. Fixes #7755.
- Assertion logs now properly display as parent commands in the
Command Log regardless of
what is in the
beforeEach
hook. Fixes #7731. - When
experimentalShadowDomSupport
is enabled, querying shadow dom in certain situations will no longer cause the errorCannot read property 'length' of undefined
duringcypress run
. Fixes #7676. - Highlighting of elements upon hover of a command in the Command Log are now visible when targeting absolute positioned elements. Fixes #7762.
- cypress run will no longer crash
when provided an empty string to the
--project
flag. Fixes #7743.
Misc:
- There is now a loading state to indicate when tests are loading in the Command Log. Addresses #7700.
- The type definitions for
fixturesFolder
,pluginsFile
,screenshotsFolders
andvideoCompression
have been updated to allowfalse
TypeScript types. Addresses #7654. - The type definitions for
cy.wait(ms)
now correctly yield the type of the previous subject. Addresses #7682. - The type definitions now allow for the 'key' keyword when chaining off 'any' or 'all' assertion chainers. Addresses #7665.
Dependency Updates:
- Upgraded
arch
from2.1.1
to2.1.2
. Addressed in #7672. - Upgraded
eventemitter2
from4.1.2
to6.4.2
. Addressed in #7705 and #7707. - Upgraded
getos
from3.1.1
to3.2.1
. Addressed in #7685. - Upgraded
is-installed-globally
from0.1.0
to0.3.2
. Addressed in #7703. - Upgraded
jimp
from0.12.0
to0.13.0
. Addressed in #7618. - Upgraded
moment
from2.24.0
to2.26.0
. Addressed in #7718. - Upgraded
signal-exit
from3.0.2
to3.0.3
. Addressed in #7738.
4.8.0​
Released 6/8/2020
Features:
- You can now apply certain test configuration for the duration of a suite or test by passing a configuration object to the test or suite as the second argument. Addresses #7167.
- Cypress.isBrowser() has been expanded to allow for new matcher arguments to assist in filtering matching browsers. Addresses #7168.
- We now display the currently running file at the top of the Test Runner's Command Log. That file can be opened in your preferred file opener by clicking the file. Addresses #7506.
- We added experimental shadow DOM support through the
experimentalShadowDomSupport
option. See the Experiments page for more information. Addresses #144.
Bugfixes:
- Upon domain navigation,
before
andafter
hooks defined in completed suites no longer erroneously rerun. Fixes #1987. - Errors thrown within root level
after
hooks now correctly display in the Test Runner's Command Log. Fixes #2296. - We fixed a regression in 4.6.0 where an XHR response without a body
would cause Cypress to throw
Cannot read property '__error' of null
. Fixes #7518. - We fixed a regression in 4.6.0 where using
cy.visit() to an authenticated URL would error with
Request cannot be constructed from a URL that includes credentials: /__cypress/runner/./wasm/mappings.wasm
Fixes #7481. - We now properly load code from the
pluginsFile
orsupportFile
when they are TypeScript files. Fixes #7459. - utf-8 characters now properly display within error code frames. Fixes #7507.
- Errors thrown in a
cy.on('fail', fn)
fail handler now display a stack trace and code frame pointing to the origin of the error. Fixes #7512. - .click() now properly clicks on wrapped inline elements when the first child element in the parent element has no width or height. Fixes #7343 and #7012.
- cy.wrap() now properly respects the
timeout
option. It also better handles situations when passed a promise that never resolves. Fixes #5980. - When experimentalSourceRewriting is enabled, Cypress will no longer exit with SIGABRT in certain situations. Fixes #7572.
- We fixed a regression in 3.8.0 where the "Tests" button in the Test Runner wouldn't take you back to the tests list in all browsers. Fixes #5948.
- Using the
S
shortcut during .pause() no longer does anything. This prevents the Test Runner from getting into a 'stuck' state. Fixes #6867.
Misc:
- The design of errors and some iconography displayed in the Test Runner's Command Log have been updated. Addresses #7499, #7542 and #7563.
- The commands in the Test Runner's Command Log now display in the same casing as the original command. Addresses #5773.
- The navigation links in the Test Runner now display the correct CSS styles when focused. Addresses #7491.
- Cypress.config() now has TypeScript types for the
taskTimeout
option. Addresses #7531. - TypeScript types for cy.screenshot() options and Cypress.log() have been updated to be more accurate. Addresses #7445.
- TypeScript types for
Cypress.automation
have been added. Addresses #7519. - We now display a more accurate error message when passing a browser to the
--browser
flag that is not supported by Cypress. Addresses #6979. - We're continuing to make progress in converting our codebase from CoffeeScript to JavaScript. Addresses #2690 in #7588 and #7591.
Dependency Updates:
- Upgraded
chrome-remote-interface
from0.28.1
to0.28.2
. Addressed in #7615. - Upgraded
electron
from8.3.0
to8.3.1
. Addressed in #7599.
4.7.0​
Released 5/26/2020
Features:
- cy.request() now supports an
encoding
option that can be used to set the encoding of the response body, defaulting toutf-8
. Addresses #2029 and #3576.
Bugfixes:
- We fixed a regression in 4.6.0 where the address bar of the application under test would disappear when scrolling commands ran and the application under test would visually shift after taking screenshots. Fixes #7443 and #7466.
- We fixed a regression in 4.6.0 where test runs could hang when loading spec files with source maps. Fixes #7464.
Misc:
- We now display a more descriptive error message when the plugins file does not export a function. Addresses #6611.
4.6.0​
Released 5/20/2020
Features:
- Errors in the Test Runner now display a code frame to preview where the failure occurred with the relevant file, line number, and column number highlighted. Clicking on the file link will open the file in your preferred file opener and highlight the line and column in editors that support it. Addresses #3762.
- Cypress now utilizes source maps to
enhance the error experience. Stack traces are translated so that your source
files are shown instead of the generated file that is loaded by the browser.
Cypress will include an inline source map in your spec file. If you
modify the preprocessor, ensure that inline
source maps are enabled to get the same experience. Users of
@cypress/webpack-preprocessor
should upgrade to v5.4.1 or later of the package which will correctly inline source maps. Addresses #881, #1761 and #3966. - Cypress now enables AST-based JS/HTML rewriting when setting the
experimentalSourceRewriting configuration
option to
true
. Addresses #5273. - Number arguments passed to
have.text
,have.id
,have.data
,have.value
, andhave.attr
assertions chainers are now automatically cast to strings for comparison. Addresses #7314.
Bugfixes:
- Default TypeScript options are now set
to
module: commonJS
which Node.js and the browser expect. This fixes a situation where setting a different module in atsconfig.json
would cause errors to throw if you hadexport
,import
orasync
keywords in your code. Fixes #7005, #7011, #7043, and #7151. - When experimentalSourceRewriting is enabled,
setting
location
orlocation.href
to a relative href, or usinglocation.replace
orlocation.assign
with a relative href will no longer navigate the AUT to the wrong URL. Fixes #3975 and #3994. - When experimentalSourceRewriting is enabled,
the use of
window.top
andwindow.parent
will no longer cause the AUT to break out of the Cypress iframe. Fixes #5271 and #1467. - When experimentalSourceRewriting is enabled,
calls to
window.frames
,window.parent.frames
, and otherframes
will no longer point to the wrong reference after being proxied through Cypress. Fixes #2664. - When experimentalSourceRewriting is enabled,
scripts using the
integrity
attribute for sub-resource integrity (SRI) will now load after being proxied through Cypress. Fixes #2393. - When experimentalSourceRewriting is enabled,
the use of
document.location
to set the URL will no longer navigate the AUT to the wrong URL. Fixes #7402. - Type definitions will no longer conflict when running Cypress in a project with Jest. Fixes #3536.
- We increased the timeout for launching Firefox from 2.5 seconds to 50 seconds. Previously, users hitting this limit would encounter a "cannot open socket" error; now, the error will be wrapped. Fixes #7159.
- .click will now click in the correct coordinates when either x or y coordinate options are zero. Fixes #7319.
- Cypress no longer displays
onError is not a function
when a browser can't connect. Fixes #7217. - You can now pass the
force: true
option to .select() to select options within a disabled<select>
. Addresses #107. - We now throw an error when attempting to .select() an
<option>
within a disabled<optgroup>
. Fixes #7226. - We fixed a regression in 4.3.0 where the message output during errors were not formatted correctly. Fixes #6924.
- Using Cypress._.capitalize now correctly behaves the same as Lodash's capitalize method. Fixes #7222.
- When
experimentalComponentTesting
is enabled, clicking on a component spec now watches the correct file without assuming it is an integration file. Fixes #7244. - Firefox video recording no longer crashes Cypress when running very short spec files. Fixes #6408.
- Applications containing a DOM element with an id attribute containing 'jquery' will no longer throw an error during cy.visit(). Fixes #6193.
- Long errors generated when compiling or bundling the test file are now horizontally scrollable. Fixes #6898.
Misc:
- Cypress no longer requires write access to the root of the project, it instead will display a warning when no write access is given. Addresses #1281.
- We increased the timeout for launching Chrome from 20 seconds to 50 seconds. Addressed in #7372.
- We increased the timeout for macOS or Linux to exit from a
--version
command when looking for available browsers from 5 seconds to 30 seconds. Addressed in #7366. - We improved error handling when Cypress launches Chromium-family browsers. Addresses #6518.
- We now export
Cypress.ConfigOptions
types as a partial of the full options interface. Addresses #7238. - We're continuing to make progress in converting our codebase from CoffeeScript to JavaScript. Addresses #2690 in #7162, #7216, #7227, #7320, #7232, and #7345.
Dependency Updates:
- Upgraded
@cypress/browserify-preprocessor
from2.2.2
to2.2.3
. Addressed in #7291. - Upgraded
cookie-parser
from1.4.4
to1.4.5
. Addressed in #7389. - Upgraded
cypress-multi-reporters
from1.2.4
to1.4.0
. Addressed in #7431. - Upgraded
electron
from8.2.3
to8.3.0
. Addressed in #7236 and #7387. - Upgraded
image-size
from0.7.4
to0.8.3
. Addressed in #7236. - Upgraded
jimp
from0.9.3
to0.12.0
. Addressed in #7408. - Upgraded
return-deep-diff
from0.3.0
to0.4.0
. Addressed in #7292.
4.5.0​
Released 4/28/2020
Features:
- Cypress now supports the execution of component tests using framework-specific
adaptors when setting the
experimentalComponentTesting
configuration option totrue
. For more details see the @cypress/react and @cypress/vue repos. Addresses #5922 and #6968.
Bugfixes:
- Custom Mocha reporters will now correctly use the version of Mocha bundled with Cypress. Fixes #3537 and #6984.
- We better account for word boundaries in application scripts when
modifyObstructiveCode
istrue
. Fixes #7138. - Fixed an issue where iterators in TypeScript were not properly transpiled. Fixes #7098.
Misc:
- The update window in the Test Runner now encourages yarn users to
yarn upgrade
Cypress instead ofyarn add
to help prevent installing 2 versions of Cypress when using yarn workspaces. Addressed in #7101. - We're continuing to make progress in converting our codebase from CoffeeScript to JavaScript. Addresses #2690 in #7031 and #7097.
Dependency Updates:
- Upgraded
electron
from8.2.0
to8.2.3
. Addressed in #7079.
4.4.1​
Released 4/20/2020
Bugfixes:
- Cypress can now launch on systems where Chromium is installed via Snapcraft. Fixes #7020.
- We now check whether the
mouseup
event's target element is detached before issuing theclick
event during .click(). Fixes #6923. - We fixed a regression in 3.8.1 where the Test Runner could send an
undefined
organization ID during project setup when the default organization is preselected. Fixes #7013. - We fixed a regression in 4.4.0 that caused projects to include bundled TypeScript. Fixes #7036.
- Fixed an issue where sites that set
Feature-Policy: document-domain 'none'
headers would fail to load in Cypress. Fixes #6480.
Misc:
- We fixed some extra spacing displaying below the project nav in the Test Runner. Addresses #7023
- The typings for run results when using the
Module API now indicate they can be
null
orundefined
. Addresses #6126. - We're continuing to make progress in converting our codebase from CoffeeScript to JavaScript. Addresses #2690 in #7004.
4.4.0​
Released 4/13/2020
Features:
- TypeScript test files are now supported without using special preprocessors plugins. Addresses #1859.
Bugfixes:
- We fixed an issue where Cypress could crash with a
This socket has been ended by the other party
error when testing applications that make use of WebSockets. Fixes #6458. - Uncaught errors thrown from within application or test code now display their proper stack trace. Fixes #6964.
- Assertion errors now include a stack trace that includes the calling code. Fixes #6969.
- We now clone the
options
object passed into Cypress commands so that they're not mutated and receive the properoptions
. Fixes #3171. - We fixed an issue where invalid
Set-Cookie
values could cause requests to fail with acannot read property key of undefined
error. Now, invalidSet-Cookie
values will be ignored. Fixes #6890.
Misc:
- Cypress no longer hides output from
cypress --version
,cypress version
,cypress cache path
, orcypress cache list
commands when npm log level issilent
orwarn
. Addresses #2705. - The cy.task() error message is now more specific about the promise resolution value required. Addresses #6241.
Dependency Updates:
- Upgraded
http-proxy
from1.17.0
to1.18.0
. Addressed in #6934.