Skip to content

Releases: cypress-io/cypress

0.8.1

19 Jul 07:23
Compare
Choose a tag to compare

Released 06/30/2015

Bugfixes:

  • .select() will now fire a focus event on the <select> even if the window isn't in focus.
  • .click() has been upgraded to be more intelligent about firing focus events, and now takes into account the previously focused element.
  • .type() and .clear() will not issue change events or focus events unnecessary when chaining together multiple actions which do not change the element or cause it to lose focus. Fixes #47.

0.13.6

19 Jul 07:29
Compare
Choose a tag to compare

Released 01/09/2016

Features:

  • All commands now retry if the the associated element is disabled until the element is no longer disabled. If the command times out a specific error message is now thrown.
  • cy.server() and cy.route() now take an optional onAbort callback which fires anytime an XHR is aborted.

Bugfixes:

  • Fixed edge case where XHR's which were already aborted were aborted a 2nd time when tests end. Cypress now only aborts currently running XHR's which have not already been aborted.
  • When passing an array of aliases to cy.wait() there was an edge case where an incorrect error message was being thrown. The incorrect values were a combination of the wrong alias, the wrong timeout value, or the wrong request or response. Now Cypress correctly provides all 3 of these values.

0.13.5

19 Jul 07:29
Compare
Choose a tag to compare

Released 01/03/2016

Features:

  • Added new command: cy.go() which accepts back, forward, or an arbitrary Number.
  • cy.go() enables you to navigate back or forward in your history. Cypress intelligently handles situations where moving forward or back causing a full page refresh, and will wait for the new page to load before resolving and moving onto new commands. It additionally handles situations where a page load was not caused (such as hash routing) and will resolve immediately.

Misc:

  • Using {force404: false} will now output a warning explaining this is now the default option and can be removed safely.

0.13.4

19 Jul 07:29
Compare
Choose a tag to compare

Released 12/31/2015

Features:

  • Added waitForAnimations and animationDistanceThreshold configuration options.
  • Cypress now automatically detects and waits for an element which is animating to stop animating. The threshold that Cypress considers animating is set to a distance of 5px per 60fps. In other words, if your element is moving too fast for a user to interact with, then Cypress considers the element animating and will wait until it finishes before attempting to interact with it. When we say 'interact' we mean apply command actions like .click(), .select(), .type(), .check(), etc. Waiting for animations prevents a series of edge cases and weird bugs where Cypress was interacting with elements too quickly which might cause undesired side effects in your application which are hard to track down. The downside to this implementation is that for every action Cypress must wait at least 2 run loops before applying actions. This slows down every action command by about 32ms. If your app does not use animations you may wish to turn off this behavior in your cypress.json file.

Bugfixes:

  • Prevent undefined error when attempting to .click() an element which is fixed position when it is covered by another element. Cypress now correctly provides why it cannot click the element in question. Fixes #90.
  • Prevent infinite loop in edge cases when checking whether an element was hidden.

Misc:

  • The default behavior of cy.server() has changed from force404: true to become force404: false. In other words, Cypress will no longer forcibly send XHR's to 404 status when these XHR's do not match any existing cy.route(). This change better aligns with predictable usage for most Cypress users.

0.13.3

19 Jul 07:29
Compare
Choose a tag to compare

Released 12/25/2015

Notes:

  • Merry Christmas everyone ;-)

Features:

  • Overhauled the entire subsystem dealing with an element's visibility state. Previously we were simply using jQuery's .is(":visible") selector which was ineffective at truly determining when an element is "visible". Our changes now differ significantly from jQuery, but they match what a real user would consider visible, and the rules are fairly easy to explain. In other words these rules should just "make sense".
  • An element is considered visible if it can be "interactive" with a user. In other words, if the user is able to click, type, drag, or otherwise physically interact with the element it is considered visible.
  • Because of the additional complexities of how Cypress considers an element visible, we now have added the exact reason why an element is not visible when throwing an error. This means you'll see errors detailing whether an element or its parents have display: none, visibility: hidden, or whether an element is considered hidden because its effective width or height is zero. Whatever the reason, Cypress will indicate why your element is considered hidden.
  • Exposed Cypress.Dom.isHidden which holds the logic for determining an element's visibility. Modify this to change the rules.
  • Upgraded .select() to automatically retry when the <select> is disabled, its matching <option> is disabled, or when Cypress cannot find a matching <option>. This more correctly aligns with the behavior of other actions like .click(), which automatically retry until the element is ready to receive the action.

Bugfixes:

  • Throw on .select() when it cannot find a matching <option>. Also throw when <select> or a matching <option> is disabled. Fixes #91.
  • "Hidden" elements which actually displace height or width are now highlighted when restoring the DOM when a command is hovered.
  • Margin on zero client width / client height is now displayed correctly on command hover and more accurately mimics the way Chrome Dev Tools highlights elements.
  • Using history.back, history.forward, or history.go in CI or in headless mode now works again.

Misc:

  • The updated hidden rules apply to all assertions like should("be.hidden"), and how Cypress indicates an element is hidden displays in the Command Log.
  • Updated many error messages to be more explanatory and precise.
  • Elements which are stringified during errors now indicate their text content (truncated to 10 characters) <button>Save</button> or whether they contain children elements by indicating an ellipsis <div>...</div>.
  • The Routes instrument panel now displays the column: Stubbed instead of Status, which indicates whether a route is stubbing matching XHR's.

0.13.2

19 Jul 07:29
Compare
Choose a tag to compare

Released 12/20/2015

Notes:

Features:

  • Added responseTimeout configuration value.
  • cy.wait() has been upgraded to now use two separate timeout values. In previous versions cy.wait() used the commandTimeout and would automatically time out if the XHR did not achieve a response in that time frame. Now cy.wait() will go through two independent timeout phases. At first cy.wait() will wait for an XHR to be requested which matches its route. It will wait up to the value configured with requestTimeout (default 5000ms). After it sees a matching request it will then go into response waiting mode. It will wait up to the value configured with responseTimeout (default 20000ms). When cy.wait() fails you now receive a much better error message indicating exactly which phase failed. Whether a request was never sent out, or whether it timed out waiting for a response. This gives you the best of both worlds and prevents situations where Cypress was timing out on slow servers. By creating new configuration values: requestTimeout and responseTimeout you can now directly control this behavior without affecting other regular commands.

Bugfixes:

  • Prevent removing trailing new lines on fixtures after formatting.
  • Added cache buster to test files which forces them to be reloaded in the Sources panel after making modifications. In previous versions when test files were live reloaded Chrome would not display their new contents due to a bug in Dev Tools. We've now worked around this issue.

Misc:

  • Removed {stub: false} option from cy.server() and cy.route(). Cypress will now log a deprecation warning when you use the this option. Removing this option helps simplify the API because now Cypress can figure out whether you really want to stub the route based on whether you've provided a response or not. If you have not provided a response, the default behavior will be to not stub. If you do provide a response, Cypress will stub the route.
  • Repurposed requestTimeout to now mean the time we wait for an XHR to be requested. Changed cy.request() to now use responseTimeout configuration value.
  • Updated many error messages to be more consistent.
  • Added special error messages when elements can not have actions applied to them with a suggestion to use {force: true}.

0.12.8

19 Jul 07:28
Compare
Choose a tag to compare

Released 12/2/2015

Features:

  • There is now a new Error Messages Page which will provide additional explanation when you are getting errors from Cypress. These errors will be directly linked to (like how Angular provides errors).
  • Instead of hard coding external documentation, we now link everything through a redirection portal. This will prevent any links / documentation from ever breaking due to reorganization or renaming.
  • Cypress now throws a specific error message (with a link to further explanation) if you attempt to run commands outside of a test. Usually this happens accidentally when you write cy.commands inside of a describe or context block instead of the it. I've wasted too much time and almost bombed entire presentations / demos so I've finally stopped this from ever happening again. If you ever see this error message, trust me, you will forever thank me.
  • The error message: Cannot call cy.method() because the current subject has been removed or detached from the DOM. has been rewritten to provide much clearer information on why this is happening, including a string representation of your DOM element. Additionally it will have its own error page dedicated to explaining how this happens and what you can do to prevent it.

Misc:

  • Rewrote error message which is displayed when Cypress cannot parse your test / spec file. Now a list of suggestions are given and an external link is provided which further explains how this may happen.
  • Clarified the "Default Message" page when you have not cy.visit() your application yet.
  • Whitelisted .coffee, .scss, .less XHR's from displaying in the Command Log.

0.12.7

19 Jul 07:28
Compare
Choose a tag to compare

Released 11/30/2015

Bugfixes:

  • Prevent passing {multiple: true} incorrectly showing up in Command Log. Fixes #88.
  • Properly whitelist resource like XHR's which have query params such as jquery's {cache: false} option.
  • Correctly take into account <base> tag on XHR's. Fixes #89.

0.12.6

19 Jul 07:28
Compare
Choose a tag to compare

Released 11/29/2015

Features:

  • There are now Getting Started docs including configuration for cypress.json
  • Cypress now silently restarts the server whenever it detects a change to cypress.json - meaning you no longer have to manually reboot the server for changes to be picked up.
  • There is a new Cypress.config interface - akin to Cypress.env which provides access to configuration values.

Bugfixes:

  • Setup/Teardown code was not properly running on nested mocha beforehooks which caused the error: The XHR server is unavailable or missing.... Fixes #80 and #86.
  • Prevent accidental mutation of cy.server() options when cy.route() was provided options. Fixes #84 and #85.
  • Using cy.title() would incorrectly search the <body> for title elements, and is now restricted to only searching in the <head>
  • Cross-Origin requests are now proxied by Cypress. In other words their URL's are transparently rewritten which bypasses CORS problems. This is a quick fix which should satisfy most of the problems users were having with CORS requests. However there is a much bigger change coming in 0.14.0 where the entire proxy layer will be rewritten to accommodate CORS, window.fetch and domain cookies flawlessly. As it stands Cypress is prone to errors in complex setups.

Misc:

  • Exposed visitTimeout and requestTimeout configuration.
  • Increased visitTimeout from 20s to 30s.
  • .click() will now throw if you are attempting to click more than 1 element. Pass {multiple: true} to enable this behavior again. Each element will be clicked serially and inserted into the Command Log.

0.12.5

19 Jul 07:28
Compare
Choose a tag to compare

Released 11/22/2015

Features:

  • Errors reading / writing cypress.json on project add are now displayed inline.

Bugfixes:

  • Prevent app crashing when cypress.json could not be read or written to when adding a project.

Misc:

  • App crashes now send a full stack trace (instead of 10 line truncation).
  • Better error handling + error messages when trying to read / write from cypress.json.