3.5.0
Released Released on October 22, 2019
Features:
We now record video by default when you run Cypress in Chrome, Chromium, or Canary such as during cypress run --browser chrome. Addresses #4608.
There is a new .rightclick() command to right click on DOM elements. Addresses #53.
Cypress now accepts a
--config-fileargument to specify a different file to be used for Cypress configuration. You can also passfalseto the--config-fileto not use any configuration file. Addresses #1369.You can now use your system's Node version by setting the
nodeVersiontosystemin your configuration. This Node version will be used to build files in yourintegrationFolderandsupportFileand also be used to execute code in yourpluginsFile. If not set, Cypress will continue to use the Node version bundled with Cypress. Addresses #4432..dblclick() now accepts
position,x, andyarguments. Addresses #116..dblclick() now accepts
forceandmultiplein itsoptions. Addresses #116..screenshot() now accepts a
paddingargument when screenshotting elements that will alter the dimensions of the screenshot of the element. Addresses #4440.cy.visit() now accepts a
qsoption representing an object of query parameters to be used in the URL. Addresses #5034.cy.viewport() now allows for viewport sizes up to 4,000 pixels. Addresses #5181.
cy.viewport() accepts new size presets for
iphone-xr,iphone-x,samsung-s10andsamsung-note9. Addresses #4967.Passing a
~toCYPRESS_CACHE_FOLDERwill automatically resolve to the user's home directory. Addresses #5386.
Bugfixes:
.dblclick() and .click() now fire all appropriate mouse events including
mouseover,mousemove,mouseout,pointerdown,pointerup, andpointermove. Fixes #1016, #1847, #2045, #2521, #2768, #2928, #2957, and #3224.We updated .dblclick() to follow the same actionability checks as .click(). Fixes #3798.
Coordinates clicked during .click() are now correct if the element being clicked is within an iframe. Fixes #4347.
We now allow .type() to be used on any DOM element. The element will receive all of the type events. Fixes #2166 and #3661.
If a typeable element gains focus during .type(), Cypress now continues typing into the newly focused element. Fixes #2240.
We now correctly borrow the property getter for
maxLengthwhen using.type()on an input. Fixes #4587.We fixed an issue where
datetime-localinputs would not have theirvalueupdated during .type(). Fixes #2613..type() now allows you to type
-into number inputs with text selection. Fixes #4767.We now fire an
inputevent when using .type() typing{enter}inserts a newline. Fixes #4870.We no longer input text when non-
{shift}modifier keys are typed in .type(). Fixes #5424.We now properly send the
codeproperty during keyboard events triggered during .type(). Fixes #3722Cypress now sends
screenXandscreenYproperties to events triggered using .trigger(). Fixes #3187.We fixed a bug where Cypress could not intercept traffic sent through cy.visit() to IP addresses over HTTPS, leading to
ERR_SSL_VERSION_OR_CIPHER_MISMATCHerrors. Fixes #771.We fixed a bug introduced in 3.3.0 where some HTTPS sites failed to load during cy.visit() and cy.request() with a "handshake failed" error. Fixes #4394.
We fixed a bug where ECC SSL Certificates were not supported during cy.visit() that was introduced in 3.3.0. Fixes #4368.
We fixed an issue introduced in 3.4.0 that would cause the Selector Playground to not properly highlight the currently hovered element. Fixes #4872.
Cypress.env()now escapes<script>tags in the configuration file. Fixes #4952.Cypress now properly handles converting responses of
content-typeapplication/vnd.api+jsonto JSON. Fixes #5165.XHR responses in
cy.route()that exceed 80kb in size no longer fail with anERR_EMPTY_RESPONSEerror. Fixes #76.Cypress no longer crashes with
dest.enderrors on Windows machines. Fixes #2181.The
onFocusevent no longer incorrectly fires on hidden elements. This fixes an issue introduced in 3.3.2. Fixes #4898.You can now call .click() on inputs or textareas that are
readonly. This fixes an issue introduced in 3.4.1. Fixes #4874.Cypress no longer crashes with a
"port" option should be a number or stringerror when receiving an erroneous HTTP CONNECT. Fixes #3250.Cypress tests now timeout if there are no Cypress commands enqueue and the
done()callback is not called within thecommandTimeout. Fixes #1075, #2478, #3349, and #4790.We fixed a bug where Cypress would exit with an
ENOTCONNerror at the end of a test run when using Node>12.11.0on Windows OS. Fixes #5241.We fixed a bug where the Chrome policy warnings introduced in 3.4.0 would not appear. Fixes #4986.
We improved the way that cookies are handled for Chrome browsers. This fixes an issue when parsing cookies that were set with a domain beginning with a
.in Chrome 77. Fixes #5142 and #5206.We fixed a bug when visiting an application that does an HTTP request to a
.jsfile containing Unicode transferred usingContent-Encoding: gzipthat could cause the JavaScript file to become corrupted. Fixes #1746.We now normalize the Cypress cache folder to resolve in the current folder and not with respect to the
node_modules/cypressfolder. Fixes #2364.
Misc:
Cypress now displays a more precise error message when checking an element's visibility if an element is detached from the DOM. Addresses #4946.
We increased the timeout to wait for Xvfb to start from 5 seconds to 30 seconds. This should resolve some issues where the error
Could not start Xvfbwas being thrown because Xvfb could not start within the allowed time. Addresses #5110.We now warn when using
cypress runfrom the binary directly (not from an npm module) since this is not its intended use. Addresses #1573.We now warn on
cy.visit('file://...)to explain that this url format is not supported and suggest visiting a relative HTML file. Addresses #4452.Setting the reserved
CYPRESS_ENVenvironment variable will now throw an error. Addresses #1621.We now throw a better error when passing in an Object to the browser argument of the Browser Launch API explaining that a String is expected instead. Addresses #4966.
An error will now be thrown if an invalid
nameorvalueis supplied to cy.setCookie(), matching the RFC 6265 compliant validation of cookie names and values. Addresses #5206.Passing an invalid type to the 2nd argument of cy.get() now throws an error explaining that an
optionsObject is expected. Addresses #2953.We now throw a more helpful error message during cy.screenshot() that would result in a screenshot with 0 width or height. Addresses #5149.
Stdout printed during
cypress runno longer truncates text such a filenames and instead wraps the text to fit within the width of the terminal. Addresses #4977.We now display up to 2,000 characters of HTTP property values within error messages during cy.request() errors. Addresses #3145.
Cypress now always considers
localhostto be inNO_PROXY. To make Cypress send traffic forlocalhostthrough the proxy, you will now have to pass<-loopback>inNO_PROXY. Addresses #4780.We changed the way cookies are set in cy.visit() to more closely match the browser's behavior when setting cookies, particularly when using
fetchwith cookies. Addresses #4433.We've added more flags to send to Chrome upon launch that should help with issues encountered during browser automation including
--disable-backgrounding-occluded-window,--disable-breakpad,--disable-ipc-flooding-protection,--password-store=basic, and--use-mock-keychain. Addresses #5132 and #3633.Scrolling the specs list now only scrolls the list of spec files and no longer scrolls the search and filter bar. Addresses #4904.
We fixed some layout issues within the Test Runner that were introduced in 3.4.1. Addresses #4888, #4912, and #4959.
The counter badge for spies and stubs no longer appears visually cut off. Fixes #4822.
TypeScript
3.6.2no longer errors due to outdated jQuery types. Addresses #5065.We updated types for Cypress.Commands.overwrite() to not allow an
optionsobject as an argument. Addresses #5341.We added
failuresandmessagetypes when a run fails using the Module API. Addresses #5335.We're continuing to make progress in converting our codebase from CoffeeScript to JavaScript. Addresses #2690 in #4869, #4906, #5096, #5107, #5156, #5173, and #5352.
Documentation Changes:
Added a .rightclick() doc.
Added a Webinars doc containing videos of all of the official Cypress webcasts.
Updated the .dblclick() doc to include new
position,x, andyarguments plusforceandmultipleoptions.Added the
--config-fileargument to Command Line and Module API doc.Added the
nodeVersionargument to Configuration doc and mentioned its uses in the How to use Plugins and Node Events Overview doc.Updated all docs to mention 'configuration file' instead of static
cypress.jsonfile since this is not configurable via a--config-fileargument.Added
qsoption to cy.visit() with examples.Added
paddingoption to cy.screenshot() with examples.Updated the cy.viewport() doc to have a max viewport size of
4000.Added newly supported viewport sizes to the cy.viewport() doc.
Documented new keyboard shortcuts in the Cypress App doc.
Added a new section on troubleshooting problems with Xvfb to the Continuous Integration doc.
Added a section to our Debugging doc about our
cypress-fiddleplugin used for playing around with small test cases.Added a section to our Debugging doc explaining how to patch an installed version of Cypress.
Mention not needing to decode portions of the
urlin thecy.route()doc.Mention that the
file://prefix is not supported in the cy.visit() doc.Add a note about when passing
<-loopback>inNO_PROXYis necessary in the Proxy Configuration doc.Updated our Dashboard docs to include screenshots containing our new Dashboard navigation design.
We have some newly translated documentation in Portuguese. If you'd like to help in translating more, please open a pull request in our documentation repo.
Dependency Updates
Upgraded Chrome browser version used during
cypress runand when selecting Electron browser incypress openfrom61to73. Addressed in #4720.Upgraded
electronfrom2.0.18to5.0.10. Addressed in #4720.Upgraded
nodefrom8.9.3to12.0.0. Addressed in #4720.Upgraded
jqueryfrom2.2.4to3.1.1. Addressed in #1229.Upgraded
sanitize-filenamefrom1.6.1to1.6.3. Addressed in #5216.Upgraded
@cypress/get-windows-proxyfrom1.5.4to1.6.0. Addressed in #5108.