3.3.0
Released Released on May 16, 2019
News:
We've written a blog post about the 300% increase in proxy performance delivered in
3.3.0.
Features:
Cypress now automatically reads from your system's
HTTP_PROXY,HTTPS_PROXY, andNO_PROXYenvironment variables and proxies traffic accordingly through Cypress based on these values. This includes network traffic within your application under test, when downloading Cypress, and when accessing 'Runs' within the Test Runner. Please read our new Proxy Configuration doc to understand more about proxy configuration in Cypress. Fixes #672, #733, #939, #1039, #1459, #1469, #1470, #1541, #1608, #2295, #3855, #3865, #1401 and #3857.Your project's current proxy settings now display in the Settings of the Test Runner. Addresses #3856.
Support for
have.focus,not.have.focus,be.focusedandnot.be.focusedassertions have been added. Addresses #97.We now offer a separate 32bit and 64bit build for Windows. Addresses #716, #787, #2095, #706, #3706, and #4016.
Requests that go through cy.visit() or cy.request() are now automatically retried under the hood when the request fails. This more closely reflects Chrome's default behavior on requests. Addresses #4013, #898 and #1013.
cy.visit() and cy.request() now support new options
retryOnStatusCodeFailureandretryOnNetworkFailureto allow changing Cypress's automatic request retry on status codes and network errors. Addresses #4013, #898 and #1013..type() now supports the special character sequences
{insert},{pageup}, and{pagedown}. Addresses #3845.We now indicate which XHRs match which alias in the Command Log on .wait() when they match an alias multiple times. Addresses #477.
The console log when clicking on the cy.visit() command now displays its resolved
optionsarguments. Addresses #3721.There's a new 'canceled' XHR status shown on the Command Log to indicate the difference between calling
xhr.abort()and the browser canceling the request due to page navigation. Addresses #3973.The Electron browser now runs Chrome Version 61. Addresses #4000.
Running Cypress via
cypress runnow supports scripts oftype="module". Fixes #3696.Exposed Cypress.isCy() method to check if a value is a valid instance of
cyor acychainable. Fixes #3822.There is a new "Download Chromium" menu item in the "Help" menu of the Test Runner links to Cypress's Chromium Download Tool. Addresses #3977
Bugfixes:
Fixed a regression introduced in 3.2.0 that caused an error to throw when visiting domains with certain public suffixes. Fixes #3717.
When running Cypress with
NODE_OPTIONSenvironment variables set, Cypress no longer issues an incorrect 0 exit code. #1676Fixed a regression introduced in 3.2.0 that caused .its() to no longer retry when it yields
undefined. #3837Fixed a regression introduced in 3.2.0 that caused cy.fixture() to throw a
EISDIRerror if a directory had the same name as a file within that same directory. Fixes #3739.user-agentheaders sent as arguments to cy.request() and cy.visit() are now properly sent. Fixes #3873 and #3719.When a request is proxied through Cypress and there is a network error, we no longer send an HTML response with a 500 status code. We now kill the browser-facing socket and let the network error be handled by the application under test. Fixes #4101, #4231, #1036, #4231, and #1398.
We changed Cypress's implementation to no longer rely on internal XHR events when the browser navigates. This fixes a a bug in Chrome 71+ that could cause XHRs to pend forever. Fixes #3973 and #4130
We greatly improved the speed of proxied requests through our network layer. Fixes #3192 and #1469.
If an error occurs during
cypress verify, we now kill the verification process after 10 seconds and print the error message. This should prevent some situations where Cypress would hang during installation or verification and never exit. Fixes #819.Cypress automatically retries
cypress verifyandcypress runcommands by starting its own Xvfb server on Linux if the first attempt fails due to possibleDISPLAYmisconfiguration. Addresses #4034.Cypress now properly handles typing JavaScript object prototype methods (like
hasOwnProperty) into.type(). Fixes #3423.We now set the
formoption totrueif theContent-Typeheader equalsapplication/x-www-form-urlencodedandjsonis not already set by a user. This fixes a situation where Cypress would try to parse thebodyas a string, resulting in a confusing error message. Fixes #2923.cy.contains() now correctly handles comma delimited arguments passed to the selector argument. Fixes #2407.
Passing a browser path containing spaces now works properly when passed to the
--browserargument. Fixes #3979Fixed display of tooltips when selecting elements from the Selector Playground so that they display at the correct coordinates when scrolling. Fixes #1351.
The lists of spec files now display at the correct indentation level when they are nested more than 5 directories deep. Fixes #3652.
Cypress now properly parses environment variables with empty values. Fixes #3742.
Assertions running outside of a test are now properly handled in Cypress instead of throwing internal errors. Fixes #3926.
Cypress.log() now throws an error when not properly passed an object as its argument. Addresses #3658.
Cypress.log() no longer throws when called before any other Cypress commands. Fixes #3658.
Misc:
We now better support capturing environment variables within Azure DevOps. Addresses #3657.
Cypress now only scans for spec changes when the watcher sees changes, rather than polling to scan. Addresses #3069.
The ability to open the context menu to see "Inspect Element" has been reenabled in the Electron browser. Addresses #4002.
We no longer package non-Windows FFmpeg builds with Windows builds, resulting in a 35-40% reduction in zipped size and a 36-43% reduction in unzipped size of download. Addresses #3888.
The warning messages when going over test recording limits have been updated to correctly display 'monthly tests' and 'private tests' where necessary. Addresses #4024.
When an HTTP request is received by the proxy layer, by default, we send it with a
Connection: keep-aliveheader so that the connection will be reused if possible. Addresses #3857.Improved accessibility of Test Runner for screen readers. Addresses #3850.
Cypress type definition now allow a
timeoutoption in cy.hash(). Fixes #3844.Fixed type definition for
matchassertion so that it now only acceptsRegExptype arguments. Fixes #2578.The .trigger() type definition now expects its
optionsto beObjectLike. Addressed in #3809.The cy.clock() type definition now allows for type
Date. Fixed in #4106.Added type definition for undocumented
Cypress.LocalStorage.clearmethod. Fixes #4070.Added type definition for Cypress.isCy() method. Fixes #3822.
Added missing type definitions for some cy.visit() options. Fixes #3989.
The spinner animation should more smoothly spin when a command is pending in the Test Runner. Addressed in #4005.
Documentation Changes:
New Proxy Configuration doc. Addressed in #1486.
Added
{insert},{pageup}, and{pagedown}as supported special character sequences to .type(). Addressed in #1567.Added newly supported
focusassertion to Assertions doc. Addresses #1372.Added new options
retryOnStatusCodeFailureandretryOnNetworkFailureto cy.visit() and cy.request().Updated install instructions for Windows on how to target 64bit and 32bit infrastructures. Addressed in #1568.
Updated .its() and .invoke() docs to better explain how default assertions are handled. Addresses #1643.
Updated our Roadmap to more closely reflect the work we are doing. Addressed in #1567.
Added a section about how to request our new Open Source Plan in the Dashboard Service doc. Addressed in #1567.
Dependency Updates
Upgraded
commit-infofrom2.1.2to2.1.2. Addressed in #4045Upgraded
data-uri-to-bufferfrom0.0.4to1.2.0. Addresses #4152.Upgraded
electronfrom1.8.2to2.0.18. Addresses #4000.Upgraded
electron-packagerfrom9.1.0to13.1.1. Addresses #4155.Upgraded
express-handlebarsfrom3.0.0to3.0.2. Addressed in #4086.Upgraded
find-processfrom1.2.1to1.4.1. Addressed in #4087.Upgraded
getosfrom2.8.4to3.1.1. Addressed in #4222.Upgraded
http-status-codesfrom1.3.0to1.3.2. Addressed in #3949.Upgraded
jimpfrom0.6.0to0.6.4. Addressed in #4097.Removed
method-override. Addressed in #4209.Upgraded
nodefrom8.2.1to8.9.3. Addressed in #4001.Downgraded
parse-domainfrom2.1.7to2.0.0to avoid a regression released inparse-domain. Addresses #3717.Upgraded
pluralizefrom3.1.0to7.0.0. Addressed in #4205 and #4206.Upgraded
semverfrom5.6.0to5.7.0. Addressed in #4112.Upgraded
sendfrom0.16.2to0.17.0. Addressed in #4134.Upgraded
supports-colorfrom5.5.0to6.1.0. Addressed in #4150.Removed
tar-fs. Addressed in #4148.Upgraded
term-sizefrom1.2.0to2.0.0. Addressed in #4148.Upgraded
tmpfrom0.0.33to0.1.0. Addressed in #4111.Upgraded
trashfrom4.3.0to5.2.0. Addressed in #4140.Upgraded
url-parsefrom1.4.4to1.4.7. Addressed in #4110.Upgraded
widest-linefrom2.0.1to3.1.0. Addressed in #4139.We updated and removed some dependencies used for development.