v15.21.0
Added 2
- Added the cypress tap command, which gives AI agents direct access to open-mode Cypress sessions and enables listing sessions, starting and rerunning specs, reporting run status and results, printing failing test errors and Command Log, and inspecting the DOM and accessibility tree
- Added CYPRESS_DISABLE_GUEST_TELEMETRY environment variable to disable reporting Cypress sends for non-logged sessions
Changed 1
- Upgraded @sinonjs/fake-timers from 11.3.1 to 14.0.0; cy.clock() now implements performance.mark() and performance.measure() and reports faked performance.timeOrigin
Fixed 6
- Fixed WebKit runs hanging indefinitely when more parallel requests than the browser's per-host connection pool were intercepted by a cy.intercept() route with a request handler
- Fixed test-level blockHosts overrides having no effect when overriding project-level configuration
- Fixed cypress run printing the (Attempt N of M) line twice when both beforeEach and afterEach hooks failed during the same attempt
- Fixed have.attr, have.css, and have.prop assertions applying styles, attributes, or properties to the element instead of asserting on them when passed an object
- Fixed cy.env() command console props output listing environment variable names under numbered keys instead of a single Env vars label
- Fixed Windows issue where adding, renaming, moving or deleting a spec file while cypress open was running was not reflected in the specs list
Deprecated 2
- cy.exec() has been deprecated and will be removed in a future major release; use cy.task() instead
- execTimeout configuration option has been deprecated in favor of taskTimeout
From Cypress
Deprecations:
cy.exec()has been deprecated and will be removed in a future major release of Cypress. Usecy.task()instead, which runs in Node without depending on the operating system, shell, or terminal of the machine running Cypress. TheexecTimeoutconfiguration option is deprecated alongside it, in favor oftaskTimeout. Addresses #34639.
Features:
- Added the
cypress tapcommand, which gives your AI agent direct access to your open-mode Cypress session. It lists the open-mode Cypress sessions running on the machine, starts and reruns a spec, reports a run's status and results, prints a failing test's error and Command Log, and inspects the DOM and accessibility tree of the application under test. Every subcommand prints readable output by default and machine-readable JSON with--json. Runcypress tap --helpfor the full list of subcommands. Addresses #34036. - Added a
CYPRESS_DISABLE_GUEST_TELEMETRYenvironment variable, which disables any reporting Cypress sends for non-logged sessions. This includes anonymous usage events within Cypress open-mode and the Cypress CLI. Addressed in #34540.
Bugfixes:
- Fixed an issue where WebKit runs could hang indefinitely when more parallel requests than the browser's per-host connection pool were intercepted by a
cy.intercept()route with a request handler. Fixes #33926 and addresses #23807. - Fixed an issue where overriding
blockHostswith test configuration (for exampledescribe('...', { blockHosts: [...] }, ...)) had no effect, so requests were still blocked or allowed according to the project-level value. Test-levelblockHostsoverrides now take effect at runtime and are restored between specs. Fixes #21151. - Fixed an issue where
cypress runprinted the(Attempt N of M)line twice for the same attempt when abeforeEachand anafterEachhook both failed during that attempt. Fixes #26143. - Fixed an issue where passing an object to the
have.attr,have.css, orhave.propassertions, such as.should('have.css', { backgroundColor: 'rgb(128, 0, 0)' }), applied those styles, attributes, or properties to the element and passed instead of asserting on them. These assertions now fail with an error stating that the name must be a string. Fixes #26451. - Fixed an issue where the console props output for a
cy.env()command listed the requested environment variable names under numbered keys instead of a singleEnv varslabel. Addressed in #34615. - Fixed an issue on Windows where adding, renaming, moving or deleting a spec file while
cypress openwas running was not reflected in the specs list, leaving stale specs until Cypress was restarted. Clicking a spec that had been renamed or moved could then fail to run. Projects whosespecPatterncontains a directory, such as the End-to-End Testing defaultcypress/e2e/**/*.cy.{js,jsx,ts,tsx}, were affected. Fixes #22303.
Dependency Updates:
- Upgraded
@sinonjs/fake-timersfrom11.3.1to14.0.0. Whilecy.clock()is active, the fakedperformanceobject now implementsperformance.mark()andperformance.measure()(previously no-ops that returnedundefined) and reports a fakedperformance.timeOrigin. Addressed in #34377.