Releases: cypress-io/cypress
Releases · cypress-io/cypress
0.5.4
0.17.0
Released 08/30/2016
Overview:
- The desktop application has been completely redesigned. We have moved from a tray application to a standard dock application. The list of projects is now in the same window as the list of tests in a project. As each test runs, the application highlights the currently running spec and displays the browser version running. The configuration of a project is now displayed in its own tab. There is now a Desktop Menu where you can logout, check for updates, or view help links.
- The test runner has been rebuilt from the ground up in React.js. The left side of the runner called the reporter is now a separate application. This, as well as other changes, markedly improved the performance of running tests. Your tests will now run faster. This will also enable you to test your application in full screen. Additionally this paves the way for being able to spawn multiple browsers at once and synchronize testing across them. This also means we'll be able to support mobile browsers. The UI for doing this hasn't been implemented but the vast majority of the work to accomplish this is done now.
- We have rewritten the entire proxy layer of the Cypress server to finally fix all the problems with CORS.
Breaking Changes:
- You cannot cy.visit() two different super domains within a single test. Example:
cy.visit('https://google.com').visit('https://apple.com')
. There shouldn't be any reason you ever need to do this in a single test, if you do, you should make these two separate tests.
Features:
- All CORS related issues should finally be fixed now. Cypress now internally switches to the domain that you used in your cy.visit(). This means that the correct domain will display in the URL based on the application currently under test. Your application's code will run under the current domain at all times. Previously we implemented an endless amount of hacks and internal translations to figure out the domain you were supposed to be on without actually being on the domain. This caused code to behave different and caused subtle issues. Those issues should now be resolved. The entire proxy layer has been rewritten to handle all
https
certificates flawlessly, continue to inject (even onhttps
pages), and still know when to automatically bypass injection so you can open other tabs while testing in Cypress. These new proxy changes also unlock the ability to do things like whitelisting or blacklisting specific 3rd party domains, or even be able to stub not just XHR's but any kind ofHTTP
request. window.fetch
now works correctly. Stubbing these does not yet work but it is now possible for us to implement stubbing in a future version. Addresses #95.- The list of tests now automatically refresh when test files are renamed, deleted, or added. In addition, because the list of tests is now displayed in the desktop application, we now synchronize the state of the current running spec.
- cy.visit() has better error messages. Cypress now programmatically determines why a cy.visit() failed and gives you a ridiculously accurate error message. Addresses #138.
- cy.visit() now displays redirects and any cookies set.
- The currently running test is now scrolled into view. This behavior can be turned off by scrolling in the command log or selecting to disable auto-scroll at the top of the command log. Addresses #194
- Tests in the Command Log now automatically expand when specific commands take longer than
1000ms
to run. Previously when running more than 1 test we did not expand commands until a test failed. Now they will be expanded and automatically collapsed whenever a single command is taking a long time to finish. - We now have full blown subdomain support. This means you can now navigate to a subdomain either directly via a cy.visit() or by navigating in your application naturally (such as clicking an
<a>
). - cy.request() now attaches and sets cookies transparently on the browser. Even though the browser will not physically make the request, we automatically apply outgoing cookies as if the browser had made the request. Additionally we will automatically set cookies on the browser based on the response. This means you can use cy.request() to bypass not just CORS but handle things like automatically logging in without having to manually perform these actions in the UI.
- We now handle
HTTP
request errors much better. Previously if your web server sent us back a4xx
or5xx
response we would automatically send back a500
. Now we transparently pass these through. - Improved dozens of error messages.
- .debug() output has been improved, and you can now easily inspect the current command's subject.
- Clicking the URL in the header of the runner now opens that URL in a new tab.
Bugfixes:
- Fixed URL proxy issue with subdomains. Fixes #183.
- Viewport size maximum has been decreased from
3001px
to3000px
and minimum has been increased from199px
to200px
to match error messages. Fixes #189 - Websockets are now correctly proxied through
https
and through subdomains different than the current domain under test. - Stopped .debug() from accidentally mutating subjects.
- Cypress now correctly injects and handles pages which are missing a
<head>
, a<body
>, or even an<html>
tag. Previously it would bomb on pages missing these tags. - All commands with a long message (such as assertions) are automatically scaled down in font size and truncated properly. In addition, assertions will correctly bold the
expected
andactual
values.
Misc:
cypress run
no longer requires being logged in.- Renamed configuration option
commandTimeout
to defaultCommandTimeout. Cypress will transparently rewrite this if you have it in yourcypress.json
, so you don't have to do anything. - Renamed
onConsole
andonRender
Command Log options toconsoleProps
andrenderProps
. We still support the older property names for backwards compatibility. - Added support for a command's
message
orrenderProps.message
to use markdown. - The default value of
port
within a project's global configuration has changed from2020
to now being a random open port. You can still configure a specificport
if needed within the configuration. - We have upgraded the
Chromium
that runs headlessly oncypress run
to version51
. - The internal version of
node
which is built into Cypress is now6.1.0
. - Cypress
.js
files are no longer minified to make them easier to debug. - We are cleaning up internal
__cypress
cookies more so they won't get in the way of testing your application. - We now opt into
gzip
handling instead of forcing requests to omit it. - The runner is now responsive. It will correctly scale down URLs on smaller screen sizes instead of looking completely broken in CSS. We also designed a much better loading indicator.
- Added button to the reporter that focuses the Test Runner and shows the list of tests.
- The reporter now updates the duration every
100ms
instead of only when a test changes. - In the reporter, suites that are pending or contain only pending tests have the blue "pending" indicator on the left instead of the white "processing" indicator.
0.5.3
Released 04/19/2015
Bugfixes:
- Handle relative path segments which walk up past the remote host
../../assets/app.css
. - Throw explicit error for
null
,undefined
, and""
arguments to cy.contains(). Fixes #24.
Misc
- Improved
onConsole
message for cy.focused() when no element was returned. Fixes #23.
0.5.2
0.5.1
0.16.5
0.16.4
0.16.3
Released 06/17/2016
Features:
- cy.route() now accepts string glob patterns using minimatch under the hood. This means you can more easily route dynamic urls without using
regex
. Example:cy.route('POST', '/users/*/comments', {})
. - Cypress.minimatch is now exposed so you can easily test globbing patterns.
- .type() can now be used on non-input elements that have a
tabindex
attribute. Key events will fire but no text content will change and no input based events fire. Fixes #172. - There is now an ignoreTestFiles configuration option that accepts an array of
glob
patterns. This enables you to ignore extraneous spec files that may be created during a build process. The default pattern is*.hot-update.js
which will ignore dynamically generated webpack hot module swapping files. Fixes #159.
Bugfixes:
- Fixed a bug where Cypress could get into a weird state and continuously error due to the
before:log
event not being properly disposed. Fixes #173. - Fixed a bug where invalid UTF-8 characters were being set in XHR headers which caused XHR's to fail. We now properly encode and decode all values. Fixes #168.
- Nested directories under
cypress/support
no longer cause a500
when tests run. This was due to Cypress not ignoring directories and trying to serve them as regular files. Fixes #163. - Fixed situations where 3rd party libraries (such as New Relic were instrumenting XHR's identical to Cypress' implementation. This caused an infinite loop which would crash the browser. We've updated how we instrument XHR's to take this into account and deployed multiple fallbacks and strategies to prevent this kind of thing from happening in the future. Fixes #166.
Misc:
- Cypress.Server.defaults() now accepts a
urlMatchingOptions
option for passing options to minimatch. cypress run
now exits with the number of test failures instead of always exiting with 0. This matches the same waycypress ci
works. Fixes #167.- In the Cypress CLI tool package version
0.11.1
, you can now pass the--spec
option tocypress ci
. This enables you to run a specific spec file as opposed to all tests. Fixes #161.
0.11.1
Released 09/14/2015
Bugfixes:
- Utilizing cy.server() across multiple tests before a cy.visit() now orks correctly. As a side effect now Cypress will rebind both the
server
and allroutes
whenever the remote window is reloaded (for hatever reason) - even during a test itself. This means you can navigate between pages without ever having to restart the server or routes (hey will automatically rebind) when the window loads. Fixes #59.
Misc:
- Providing a "number-string" as in:
should("have.length", "1")
will no longer throw an error. - Internal API changes for
$Commands
.
0.16.2
Released 06/11/2016
Features:
- Added new cy.screenshot() command which can take screenshots on demand.
- When running
cypress run
or in CI, Cypress will now automatically take a screenshot when a test fails. You can optionally turn this off by setting screenshotOnHeadlessFailure tofalse
in your configuration. - Added new screenshotsFolder configuration option with default of
cypress/screenshots
. - When running in Circle CI, we automatically export screenshots as artifacts which makes them available directly in their web UI. If you're using Circle CI, you'll be able to see screenshots without doing anything. If you're using Travis CI, you'll need to upload artifacts to an
s3 bucket
. This is a small slice of what is coming to help diagnose and understand errors in CI. Also in0.17.0
we will automatically scroll the tests and more intelligently and open / close test commands so you can visually see what happened. Currently you may not see the test command's failure in the Command Log due to the view not scrolling. - Added new .each() command which iterates serially on a collection yielding the iteratee, the index, and the collection. Addresses #156.
- cy.route() can now accept a single function and/or you can pass a function to the
response
property. This allows you to lazily evaluate routing responses. Great for referencing fixtures. Addresses #152. - cy.contains() now accepts a regular expression. Addresses #158.
- .type() now accepts
{downarrow}
and{uparrow}
. We do not move the caret but do fire all the proper events. Addresses #157.
Bugfixes:
- cy.exec() now outputs additional
stderr
andstdout
information. It additionally will automaticallysource
your$SHELL
which makes GUI apps behave as if they've been launched from your terminal. Fixes #153 and #154. - .then() yielding nested subjects.
- cy.contains() no longer returns the last element found when siblings both contain the same content. Fixes #158.
- Cypress no longer errors when you return a raw DOM element. It now correctly wraps this as the new subject.
Misc:
- cy.contains() now provides an even more specific error message when it was scoped to a particular DOM element and contained a selector. Fixes #160.
- You will now see a very specific error message when we detect that you've mixed up
async
andsync
code in a .then() callback function. An example would be queuing up a new cypress command but then synchronously returning a different value.