Skip to content

3.5.0

Compare
Choose a tag to compare
@bahmutov bahmutov released this 23 Oct 21:38
· 0 commits to 5aaeef74a1f648ddfba202375004833778038f7a since this release
0ac77ad

Released 10/23/2019

Features:

  • We now record video during cypress run in Chrome, Chromium, and Canary browsers. This requires passing the name or path of the Chrome browser to the --browser flag. Addresses #4608.
  • There is a new .rightclick() command to right click on DOM elements. Addresses #53.
  • Cypress now accepts a --config-file argument to specify a different file to be used for Cypress configuration. You can also pass false to the --config-file to not use any configuration file. Addresses #1369.
  • You can now use your system's Node version by setting the nodeVersion to system in your configuration. This Node version will be used to build files in your integrationFolder and "supportFile" configuration#Folders-Files and also be used to execute code in your "pluginsFile" configuration#Folders-Files. If not set, Cypress will continue to use the Node version bundled with Cypress. Addresses #4432.
  • ".dblclick() dblclick now accepts position, x, and y arguments. Addresses #116.
  • ".dblclick() dblclick now accepts force and multiple in its options. Addresses #116.
  • .screenshot() now accepts a padding argument when screenshotting elements that will alter the dimensions of the screenshot of the element. Addresses #4440.
  • cy.visit() now accepts a qs option representing an object of query paramaters 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-s10 and samsung-note9. Addresses #4967.
  • Passing a ~ to CYPRESS_CACHE_FOLDER will automatically resolve to the user's home directory. Addresses #5386.

Bugfixes:

  • ".dblclick() dblclick and .click() now fire all appropriate mouse events including mouseover, mousemove, mouseout, pointerdown, pointerup, and pointermove. Fixes #1016, #1847, #2045, #2521, #2768, #2928, #2957, and #3224.
  • We updated ".dblclick() 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 maxLength when using .type() on an input. Fixes #4587.
  • We fixed an issue where datetime-local inputs would not have their value updated during .type(). Fixes #2613.
  • .type() now allows you to type - into number inputs with text selection. Fixes #4767.
  • We now fire an input event 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 code property during keyboard events triggered during .type(). Fixes #3722
  • Cypress now sends screenX and screenY properties 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_MISMATCH errors. 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-type application/vnd.api+json to JSON. Fixes #5165.
  • XHR responses in cy.route() that exceed 80kb in size no longer fail with an ERR_EMPTY_RESPONSE error. Fixes #76.
  • Cypress no longer crashes with dest.end errors on Windows machines. Fixes #2181.
  • The onFocus event 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 string error 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 the commandTimeout. Fixes #1075, #2478, #3349, and #4790.
  • We fixed a bug where Cypress would exit with an ENOTCONN error at the end of a test run when using Node >12.11.0 on 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 .js file containing Unicode transferred using Content-Encoding: gzip that 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/cypress folder. 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 Xvfb was being thrown because Xvfb could not start within the allowed time. Addresses #5110.
  • We now warn when using cypress run from 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_ENV environment 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 name or value is 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 options Object 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 run no 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 localhost to be in NO_PROXY. To make Cypress send traffic for localhost through the proxy, you will now have to pass <-loopback> in NO_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 fetch with 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.2 no longer errors due to outdated jQuery types. Addresses #5065.
  • We updated types for Cypress.Commands.overwrite() to not allow an options object as an argument. Addresses #5341.
  • We added failures and message types when a run fails using the Module API. Addresses #5335.
  • We're continuing to make process 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, and y arguments plus force and multiple options.
  • Added the --config-file argument to Command Line and Module API doc.
  • Added the nodeVersion argument to Configuration doc and mentioned its uses in the Plugins Guide and Writing a Plugin doc.
  • Updated all docs to mention 'configuration file' instead of static cypress.json file since this is not configurable via a --config-file argument.
  • Added qs option to cy.visit() with examples.
  • Added padding option 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 Test Runner 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-fiddle plugin 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 url in the cy.route() doc.
  • Mention that the file:// prefix is not supported in the cy.visit() doc.
  • Add a note about when passing <-loopback> in NO_PROXY is 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 run and when selecting Electron browser in cypress open from 61 to 73. Addressed in #4720.
  • Upgraded electron from 2.0.18 to 5.0.10. Addressed in #4720.
  • Upgraded node from 8.9.3 to 12.0.0. Addressed in #4720.
  • Upgaded jquery from 2.2.4 to 3.1.1. Addressed in #1229.
  • Upgraded sanitize-filename from 1.6.1 to 1.6.3. Addressed in #5216.
  • Upgraded @cypress/get-windows-proxy from 1.5.4 to 1.6.0. Addressed in #5108.