Skip to content

3.3.0

Compare
Choose a tag to compare
@bahmutov bahmutov released this 17 May 16:24

Released 5/17/2019

Features:

  • Cypress now automatically reads from your system's HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment 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.focused and not.be.focused assertions 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 retryOnStatusCodeFailure and retryOnNetworkFailure to 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 options arguments. 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 run now supports scripts of type="module". Fixes #3696.
  • Exposed Cypress.isCy() method to check if a value is a valid instance of cy or a cy chainable. 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_OPTIONS environment variables set, Cypress no longer issues an incorrect 0 exit code. #1676
  • Fixed a regression introduced in 3.2.0 that caused .its() to no longer retry when it yields undefined. #3837
  • Fixed a regression introduced in 3.2.0 that caused cy.fixture() to throw a EISDIR error if a directory had the same name as a file within that same directory. Fixes #3739.
  • user-agent headers 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 verify and cypress run commands by starting its own Xvfb server on Linux if the first attempt fails due to possible DISPLAY misconfiguration. Addresses #4034.
  • Cypress now properly handles typing JavaScript object prototype methods (like hasOwnProperty) into .type(). Fixes #3423.
  • We now set the form option to true if the Content-Type header equals application/x-www-form-urlencoded and json is not already set by a user. This fixes a situation where Cypress would try to parse the body as 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 --browser argument. Fixes #3979
  • Fixed 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-alive header 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 timeout option in cy.hash(). Fixes #3844.
  • Fixed type definition for match assertion so that it now only accepts RegExp type arguments. Fixes #2578.
  • The .trigger() type definition now expects its options to be ObjectLike. Addressed in #3809.
  • The cy.clock() type definition now allows for type Date. Fixed in #4106.
  • Added type definition for undocumented Cypress.LocalStorage.clear method. 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:

Dependency Updates

  • Upgraded commit-info from 2.1.2 to 2.1.2. Addressed in #4045
  • Upgraded data-uri-to-buffer from 0.0.4 to 1.2.0. Addresses #4152.
  • Upgraded electron from 1.8.2 to 2.0.18. Addresses #4000.
  • Upgraded electron-packager from 9.1.0 to 13.1.1. Addresses #4155.
  • Upgraded express-handlebars from 3.0.0 to 3.0.2. Addressed in #4086.
  • Upgraded find-process from 1.2.1 to 1.4.1. Addressed in #4087.
  • Upgraded getos from 2.8.4 to 3.1.1. Addressed in #4222.
  • Upgraded http-status-codes from 1.3.0 to 1.3.2. Addressed in #3949.
  • Upgraded jimp from 0.6.0 to 0.6.4. Addressed in #4097.
  • Removed method-override. Addressed in #4209.
  • Upgraded node from 8.2.1 to 8.9.3. Addressed in #4001.
  • Downgraded parse-domain from 2.1.7 to 2.0.0 to avoid a regression released in parse-domain. Addresses #3717.
  • Upgraded pluralize from 3.1.0 to 7.0.0. Addressed in #4205 and #4206.
  • Upgraded semver from 5.6.0 to 5.7.0. Addressed in #4112.
  • Upgraded send from 0.16.2 to 0.17.0. Addressed in #4134.
  • Upgraded supports-color from 5.5.0 to 6.1.0. Addressed in #4150.
  • Removed tar-fs. Addressed in #4148.
  • Upgraded term-size from 1.2.0 to 2.0.0. Addressed in #4148.
  • Upgraded tmp from 0.0.33 to 0.1.0. Addressed in #4111.
  • Upgraded trash from 4.3.0 to 5.2.0. Addressed in #4140.
  • Upgraded url-parse from 1.4.4 to 1.4.7. Addressed in #4110.
  • Upgraded widest-line from 2.0.1 to 3.1.0. Addressed in #4139.
  • We updated and removed some dependencies used for development.