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
duringcypress 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
typejQuery
and instead have anany
type. Fixes
#16669. - The
Cypress.ConfigOptions
,Cypress.ResolvedConfigOptions
and
Cypress.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 aclientCertificates
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. See
Running headless tests without Xvfb
for more details. 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.