3.4.1
Released 7/29/2019
Dashboard Features:
- We’re excited to announce GitHub integration for the Cypress Dashboard. You can now get timely and useful test run information within pull-requests via status checks and pull-request comments. Learn all about it on our blog. Addresses #981.
Bugfixes:
- Fixed a bug where the content of pages using non-UTF-8 character encoding would become corrupted when opened in Cypress. Fixes #3479, #1543, and #3650.
- Fixed a regression introduced in 3.4.0 that caused an error to be thrown when chaining together multiple assertions using the
and
chainable getter. Fixes #4833. - The
include
andincludes
assertion chainers now correctly work the same ascontain
andcontains
assertion chainers. Fixes #4833. - Cypress now correctly works offline on Windows when visiting a localhost URL. Fixes #4763.
-
cy.type()
now factors in thereadonly
property of<input />
elements, and will wait for this property to befalse
before attempting to type. Fixes #1246. - Variables beginning with
top
andlocation
in your application code are no longer modified whenmodifyObstructiveCode
istrue
. Fixes #4794. - We removed erroneous socket connections when the browser is initially launching. Fixes #4776.
- Fixed a bug when dismissing pinned snapshots that would cause the page to be wiped with nothing rendered. Fixes #4864.
- We upgraded the
mocha-teamcity-reporter
dependency so that it no longer errors in certain situations when trying to access duration on tests. Fixes #4654. - We upgraded the
lodash
dependency to fix a security vulnerability warning. Fixes #4699, #4730, #4743.
Misc:
- We now ensure we are shipping with production versions of dependencies such as
react
,mobx
, etc. This should help to prevent conflicts with Developer Tools extensions and increase performance by reducing memory, heap allocation, and overall JS bundle size. Addresses #4844. - Video recordings now wait after all tests finish to ensure that the video captures the final rendered frames of the browser. This prevents the last few paints from being cut off. Fixes #2370.
- Cypress now looks for any npm proxy configuration values as a fallback when no other system proxy configuration is found. This brings this feature into parity with how npm reads off proxy configuration values during an
npm install
. Addresses #4719. - We updated the messaging when there is a failure downloading Cypress to recommend checking your proxy settings. Addresses #1662.
- A warning message now displays if you attempt to run the Cypress binary directly instead of going through the cypress
npm
package. Addresses #1573. - There are newly added examples in the TypeScript definitions for custom commands,
cy.location()
and.should()
. Addresses #3684 and #4715. - The types for the
cy.contains(content, options)
syntax have been added. Addresses #4727. - Types for
cy.once()
have been added. Addressed in #4788. - There is now a
{ parseSpecialCharSequences: false }
option tocy.type()
that disables parsing the special character sequences found between the{}
characters. This will now type what you’ve provided literally without any special parsing. Fixes #4287. - You can now zoom in the main Test Runner window and also the Electron browser. Corresponding keyboard shortcuts for Zoom in, Zoom out and Actual Size are also available. Addresses #1231.
- When viewing the Test Runner’s main window at its smallest size, the header text no longer incorrectly wraps. Addresses #86.
- We’re continuing to make process in converting our codebase from CoffeeScript to JavaScript. Addresses #2690 in #4781 and #4817.
- We increased the cypress binary verification phase from 10 seconds to 30 seconds to accomodate underpowered or overwhelmed machines typically found in CI environments. Addresses #4624.
Documentation Changes:
- We have new instructions on how to set up GitHub Integration with the Cypress Dashboard.
- Updated instructions for adding types for custom commands in the TypeScript Support doc. Addressed in #1901
- Added a section about video encoding and how to speed up the encoding time to Screenshots and Videos doc. Addressed in #1880
Dependency Updates
- Upgraded
@ffmpeg-installer/ffmpeg
from1.0.17
to1.0.19
. Addressed in #4792. - Upgraded
browserify
from13.3.0
to16.3.0
. Addressed in #4751, #4825 and #4826. - Upgraded
data-uri-to-buffer
from1.2.0
to2.0.1
. Addressed in #4622. - Upgraded
duplexify
from4.0.0
to4.1.1
. Addressed in #4853. - Upgraded
graceful-fs
from4.1.15
to4.2.0
. Addressed in #4818. - Upgraded
lodash
from4.17.11
to4.17.15
. Addressed in #4684, #4709, #4784. - Upgraded
mocha-junit-reporter
from1.23.0
to1.23.1
. Addressed in #4785. - Upgraded
p-queue
from1.2.0
to6.1.0
. Addressed in #4750. - Upgraded
semver
from6.0.0
to6.3.0
. Addressed in #4797. - We also updated and removed some dependencies used for development.
3.4.0
Released 7/9/2019
Features:
- Users can now log in to the Test Runner through the browser installed on their system. This also allows for login via GitHub with U2F keys. Addresses #3583, #4337, and #1162.
- Google or SSO (if configured) login is now supported in the Test Runner. Addresses #3519.
Bugfixes:
- Cypress now properly supports partial matching of string values for assertions
contain.text
,contain.html
, andcontain.value
. Fixes #1969. - A form is now properly submitted when using
.type('{enter}')
on a form containing no buttons and only one input that allows implicit submission. Fixes #4495. - Extra whitespace and quotations are now stripped from the
CYPRESS_INSTALL_BINARY
environment variable to help prevent some unexpected results when set in Windows. Fixes #4506. - Electron rendering warnings are no longer printed to console output. Fixes #4288.
Misc:
- We now expose a downloadable binary for each commit made into the develop branch of the cypress repository so that pre-released versions can be installed. See this commit for an example. Addresses #4525.
- There are now a series of checks that are run during download of Cypress to verify that the zip file downloaded is the correct file. Addresses #812 and #3515.
- A warning now displays for Windows’ users who have Group Policy settings that may interfere with usage of Cypress. Addresses #4391.
- There’s a new warning when mouse interactions fail displaying that it failed due to the element having CSS
pointer-events: none
. Addresses #3164. - If a URL is passed to
cy.route()
containing percent-encoded characters, we now display a warning explaining thatcy.route()
expects a decoded URL. Addresses #2372. - Environment variables for Semaphore 2.0 are now captured when recording tests to the Dashboard. Fixes #4671.
- We now capture environment variables set from Concourse CI when recording tests to the Dashboard. Fixes #4376.
- We replaced capturing environment variables from SnapCI (which is no longer available) to instead capture ones set from GoCD when recording tests to the Dashboard. Fixes #2680.
- The JSON schema file used for intelligent code completion for the Cypress configuration file has been updated to match our documentation.
Documentation Changes:
- New error message added about policy settings to our Error Messages doc. Addressed in #1567.
- Real World example tests were added to Example Applications doc. Addressed in #1567.
- More content was added to our Code Coverage doc.
Dependency Updates
- Removed
string-to-stream
since it was no longer being used. Addressed in #4619. - Upgraded
@cypress/commit-info
from2.1.3
to2.1.4
. Addressed in #4597. - Upgraded
@cypress/react-tooltip
from0.4.0
to0.5.0
. Addressed in #4610. - Upgraded
errorhandler
from1.5.0
to1.5.1
. Addressed in #4618. - Upgraded
fs-extra
from8.0.1
to8.1.0
. Addressed in #4620. - Upgraded
request-progress
from0.4.0
to3.0.0
. Addressed in #4584. - We also updated and removed some dependencies used for development.
3.3.2
Released 6/27/2019
Performance Improvements:
- We fixed a regression introduced in 3.3.0 that was causing the Test Runner to do extremely unnecessary re-renders of the Command Log on any command change - leading to exponential performance degradation on any run. This was the root cause behind many users experiencing a reduction in performance when upgrading to
3.3.0
or above. Fixes #4411 and #4313. - We reduced memory consumption and improved the performance of running tests anytime you’re inside of
cypress open
. Fixes #2366. Thanks @CoryDanielson! - We no longer delay proxied responses with no body with status codes 1xx, 204, 304. This fixes a regression introduced in 3.2.0 where responses with these status codes were delayed when using a proxy. Fixes #4298.
- Snapshots were previously being mistakenly stored then instantly deleted when
numTestsKeptInMemory
was set to 0. We now no longer record the snapshots at all whennumTestsKeptInMemory
is set to 0. This should slightly improve the performance of running tests with this setting. Fixes #4104 and #4164.
Bugfixes:
- Cypress no longer watches files when run using
cypress run
. This will fix some runs that were crashing with anENOSPC
error. Fixes #4283. - Cypress now correctly handles
blur
andfocus
events in situations where the browser has lost focus. Fixes #4039, #1176, and #1486. - If the DOM element provided to
.type()
is already in focus, Cypress no longer attempts to click on the DOM element. This allows you to call.focus()
on elements that are focusable, but not necessarily clickable and type into them using.type()
. Fixes #3001 and #4420. - Some elements inside of a parent with CSS
overflow: hidden
that flow outside of its parent are now properly considered hidden. #4161 - Elements that are inside a parent with CSS
position: absolute
which is itself inside of a parent element withoverflow: hidden
are now properly considered visible. Fixes #4395 and #755. -
<option>
and<optgroup>
elements are now properly considered visible if it is contained within a visible<select>
. Fixes #4473. -
<body>
and<html>
elements are now properly always considered visible. Fixes #4475. -
<td>
and<tr>
elements with CSSvisibility: collapse
are now properly considered hidden. Fixes #4476. - We now correctly handle form submission when using
.type('{enter}')
on a form containing a button of typereset
. Fixes #3909. - If a site’s
content-type
isnull
,undefined
or cannot be determined duringcy.visit()
, we now look at the content of the site and evaluate whether it looks like HTML. If it does look like HTML we no longer error and continue as if it the site’scontent-type
istext/html
. #1727 #773 #3101. - Previously Cypress would send the
auth
header to any URLs that match the CORS origin of the originalauth
header. We now correctly only send theauth
headers when there is an exact match on the protection space. Fixes #4267. - Requests that go through
cy.visit()
orcy.request()
are now automatically retried onENOTFOUND
errors. Fixes #4424 and #1755. - Cypress now errors when the
body
paramater passed tocy.request()
contains a circular reference. Fixed in #4407. - We fixed an issue where the
ignoreTestFiles
configuration was being filtered out when passed via a command line flag, so in effect being ignored. Fixes #1696. - Setting
NO_PROXY
is now respected for HTTPS urls, as it should be. Fixes #4303. - When running tests with non-string test titles, the screenshots now automatically stringify the test titles instead of throwing an error. Fixes #4310.
- Cypress no longer incorrectly errors when calling
cy.window().screenshot()
,cy.window().scrollTo()
orcy.window().trigger()
in an application with multiple iframes. Fixes #4396. - Fixed a regression in 3.3.0 causing some users using proxy to see the “Browser was not launched through Cypress” error during
cypress open
. This was caused by incorrectly routing requests for Cypress’s internal server onlocalhost
through the user’s proxy. Fixes #4410. - We fixed situations during a test failure where the Test Runner would throw
RangeError: Maximum call stack size exceeded
. Fixes #1958 and #4346. - Fixed issue where
window.performance.getEntriesByType
would returnundefined
instead of an array within application code when usingcy.clock()
. Fixes #3625. - Passing an array of strings to
ignoreTestFiles
no longer causes an error to throw. Fixes #4312. - Fixed a visual bug when aliasing a non-route subject multiple times that would cause the Test Runner to show ‘undefined’ alias with empty counts. Fixes #4429.
- Fixed regression introduced in 3.2.0 where Cypress would error because it could not find a type definition file for ‘../sinon’. Fixes #4272.
-
cy.writeFile()
no longer errors in TypeScript files when passing anoptions
object as its third argument. Fixes #4461. -
cy.stub()
no longer errors in TypeScript files when evaluating returns. Fixes #4302.
Misc:
- Warnings are now displayed when recording in
cypress run
to warn when a project is nearing its organization’s usage limit. They also clearly explain any consequences of going over a plan’s usage limit. Addresses #4530. - An warning icon with a tooltip is displayed in the Runs tab of the Test Runner when parallelization was disabled during the run due to being over the organization’s usage limit. Addresses #4489.
- You can now opt out of sending exceptions to
https://api.cypress.io
by settingCYPRESS_CRASH_REPORTS=0
in your system environment variables. #4386 - We are now capturing Google Cloud build details when recording tests to the Cypress Dashboard. Addresses #3582.
- The tests titles and headers in the Command Log no longer truncate with elipsis when the text is longer than that width of the Command Log. Instead the text wraps so that all text is shown. Addresses #3947.
- Special env vars are now truncated in
Cypress.env()
and the debug logs. Addresses #4501. - The
projectId
in now displayed in the configuration in the Test Runner settings like all other configuration values. Fixes #4500. - When recording to the Dashboard, unrecognized warnings coming from the API server are now displayed in stdout. Fixes #4489.
Documentation Changes:
- New Code Coverage doc. Addressed in #1744.
- New Visual Testing doc. Addressed in #1744.
- New Courses doc to list online courses that teach end-to-end testing with Cypress. Addressed in #1766.
- Added a section about Hacking on Cypress in the Debugging doc. Addressed in #1783.
- Added a section on how to opt out of sending exception data to Cypress in the Installing Cypress doc.
Dependency Updates
- Removed
electron-positioner
since it was no longer being used. Addressed in #4502. - Upgraded
chokidar
from1.7.0
to3.0.1
. Addressed in #4487. - Upgraded
cookie
from0.3.1
to0.4.0
. Addressed in #4329. - Upgraded
dependency-tree
from6.5.0
to7.0.2
. Addressed in #4364. - Upgraded
fs-extra
from0.30.0
to8.0.1
. Upgraded in CLI package only to5.0.0
. Addressed in #4418, #4419, #4422, #4437, #4555, #4559, #4571, #4581. - Upgraded
mocha-junit-reporter
from1.18.0
to1.23.0
. Addressed in #4417. - Upgraded
pluralize
from7.0.0
to8.0.0
. Addressed in #4438. - Upgraded
shell-env
from0.3.0
to3.0.0
. Addressed in #4466, #4467, and #4471. - Upgraded
winston
from0.9.0
to2.4.4
. Addressed in #4538. - We updated and removed some dependencies used for development.
3.3.1
Released 5/23/2019
News:
- We’ve written a blog post about the 300% increase in proxy performance delivered in 3.3.0.
Bugfixes:
- Cypress no longer accidentally prints internal Electron logs when running
cypress run
. This bug would exhibit itself when verifying and running Cypress the first time after installation. You may have seen these logs when running in CI. Fixes #4255. - Fixed a bug for users running external network proxies that prevented requests from completing. Requests should now all work correctly. Fixes #4257.
- Fixed a regression in 3.3.0 causing large requests such as
multipart/form-data
uploads to hang. Fixes #4240, #4252, and #4253. - Fixed issue where support for
have.focus
,not.have.focus
,be.focused
andnot.be.focused
assertions were not working. Fixes #4265. - Names given to
.as()
now work properly when they contain a.
character. Fixes #3512. - The proper error is now thrown when passing
{log: false}
to a Cypress command that failed. Fixes #3847. - Fixed an issue where highlighting a command’s snapshot would throw an error when no application was rendered in the AUT frame. Fixes #4177.
- We now properly detect the branch name when running Cypress in AppVeyor. Fixed in #4234.
Misc:
- Fix capitalization of
Xvfb
in error messages. Addressed in #4262.
Documentation Changes:
- We have some newly translated documentation in Chinese and Japanese. If you’d like to help in translating more, please open a pull request in our documentation repo.
3.3.0
Released 5/17/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_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
andnot.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()
orcy.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()
andcy.request()
now support new optionsretryOnStatusCodeFailure
andretryOnNetworkFailure
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 resolvedoptions
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 oftype="module"
. Fixes #3696. - Exposed
Cypress.isCy()
method to check if a value is a valid instance ofcy
or acy
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 yieldsundefined
. #3837 - Fixed a regression introduced in 3.2.0 that caused
cy.fixture()
to throw aEISDIR
error if a directory had the same name as a file within that same directory. Fixes #3739. -
user-agent
headers sent as arguments tocy.request()
andcy.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
andcypress run
commands by starting its own Xvfb server on Linux if the first attempt fails due to possibleDISPLAY
misconfiguration. Addresses #4034. - Cypress now properly handles typing JavaScript object prototype methods (like
hasOwnProperty
) into.type()
. Fixes #3423. - We now set the
form
option totrue
if theContent-Type
header equalsapplication/x-www-form-urlencoded
andjson
is not already set by a user. This fixes a situation where Cypress would try to parse thebody
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 incy.hash()
. Fixes #3844. - Fixed type definition for
match
assertion so that it now only acceptsRegExp
type arguments. Fixes #2578. - The
.trigger()
type definition now expects itsoptions
to beObjectLike
. Addressed in #3809. - The
cy.clock()
type definition now allows for typeDate
. 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:
- 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
focus
assertion to Assertions doc. Addresses #1372. - Added new options
retryOnStatusCodeFailure
andretryOnNetworkFailure
tocy.visit()
andcy.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-info
from2.1.2
to2.1.2
. Addressed in #4045 - Upgraded
data-uri-to-buffer
from0.0.4
to1.2.0
. Addresses #4152. - Upgraded
electron
from1.8.2
to2.0.18
. Addresses #4000. - Upgraded
electron-packager
from9.1.0
to13.1.1
. Addresses #4155. - Upgraded
express-handlebars
from3.0.0
to3.0.2
. Addressed in #4086. - Upgraded
find-process
from1.2.1
to1.4.1
. Addressed in #4087. - Upgraded
getos
from2.8.4
to3.1.1
. Addressed in #4222. - Upgraded
http-status-codes
from1.3.0
to1.3.2
. Addressed in #3949. - Upgraded
jimp
from0.6.0
to0.6.4
. Addressed in #4097. - Removed
method-override
. Addressed in #4209. - Upgraded
node
from8.2.1
to8.9.3
. Addressed in #4001. - Downgraded
parse-domain
from 2.1.7 to 2.0.0 to avoid a regression released inparse-domain
. Addresses #3717. - Upgraded
pluralize
from3.1.0
to7.0.0
. Addressed in #4205 and #4206. - Upgraded
semver
from5.6.0
to5.7.0
. Addressed in #4112. - Upgraded
send
from0.16.2
to0.17.0
. Addressed in #4134. - Upgraded
supports-color
from5.5.0
to6.1.0
. Addressed in #4150. - Removed
tar-fs
. Addressed in #4148. - Upgraded
term-size
from1.2.0
to2.0.0
. Addressed in #4148. - Upgraded
tmp
from0.0.33
to0.1.0
. Addressed in #4111. - Upgraded
trash
from4.3.0
to5.2.0
. Addressed in #4140. - Upgraded
url-parse
from1.4.4
to1.4.7
. Addressed in #4110. - Upgraded
widest-line
from2.0.1
to3.1.0
. Addressed in #4139. - We updated and removed some dependencies used for development.
3.2.0
Released 3/15/2019
Features:
-
cy.visit()
has been expanded to allow optionsurl
,method
,body
, andheaders
. This allowscy.visit()
to be called with aPOST
method or with headers likeAccept-Language
orAuthorization
. Fixes #1500, #1904 and #908. -
cy.request()
now allows any valid HTTPmethod
to be used includingTRACE
,COPY
,LOCK
,MKCOL
,MOVE
,PURGE
,PROPFIND
,PROPPATCH
,UNLOCK
,REPORT
,MKACTIVITY
,CHECKOUT
,MERGE
,M-SEARCH
,NOTIFY
,SUBSCRIBE
,UNSUBSCRIBE
,SEARCH
, andCONNECT
. Addresses #1302 - The
–browser
argument of the Command Line and thebrowser
argument of the Module API have been updated to allow passing a<path>
. Addresses #1026. -
cy.type()
now accepts{home}
and{end}
special character sequences to move the cursor to the start or end of a line. Addresses #2033. - The Cypress Chrome extension now has a static ID of
caljajdfkjjjdehjdoimjkkakekklcck
. This allows Cypress to be added to extension whitelists for those working under corporate policies that prohibit extensions. Addresses #3673, #1239 and #2494.
Bugfixes:
- Problems logging in through GitHub in the Test Runner have been fixed. The GitHub login window no longer shows the browser support banner and the “Authorize cypress-io” button is no longer disabled. Fixes #1251.
- Fixed an issue when testing applications using older versions of jQuery. They now no longer throw
item.first is not a function
. Fixes #2927. - Cypress now detects more instances of
browser
installations. Fixes #3183 and #3218. - Fixed issue with loading fixture files containing more than one
.
in their filename while not specifying the file extension. We are also displaying a clearer warning when a fixture file cannot be found. Fixes #1402. - All third party
@types
have been moved from Cypressdependencies
intodevDependencies
. This should fix situations where user’s type dependencies were conflicting with Cypress’s third party type definitions. Fixes #3371 and #1227. -
Cypress.config('baseUrl')
has been updated to no longer strip singular/
at the end of urls and instead only strip instances of multiple/
. Fixes #3540. - The prompt to “Restore pages?” is no longer displayed within Chrome upon restarting a crashed Chrome window. Addresses #2048.
-
cy.wrap()
no longer throws an error when a non-jQuery wrapped DOM element is passed in as an argument. Fixes #3549. - Fixed issue where all arguments passed to
setTimeout
orsetInterval
were not properly passed on to the target function. Fixes #3592. -
.filter()
has been updated so that when called with a function, the options are now properly read. Fixes #3315. - Cypress’s recognition of websites attempting framebusting has been updated to include framebusting code wrapped within
()
. #3267 - When
.its()
returnsundefined
it no longer errors. It will now follow the same logic as all other commands and only fail when directly by a.should()
command with an assertion that is not met. Fixes #1531. - When
cy.wrap()
is followed directly by a.should()
command,cy.wrap()
will now retry when its argument evaluates toundefined
until it meets the requirements of the assertion or thecy.wrap()
command times out. Fixes #3241.
Misc:
- We now display a warning when passing an argument to
--spec
that is not surrounded by quotes""
recommending that the argument instead be surrounded by quotes. In some cases, not providing quotes can cause the arguments to be read in a way that is likely not its intended use. Addresses #3318 and #2298. - The number of logs printed when installing Cypress in docker has been reduced. Partially addresses #1243.
- The seeded Kitchen Sink examples have some new examples showing how to add a message to assertions, how to compare the text content of two elements, and how to make assertions about
data
attributes. The examples also have some small typo fixes. Fixes #502. Addressed in #3272, #3287, and #3700. - We now only mount internal servers on
loopback
. Addresses #3712. - The instructions in Cypress’s update window now include
yarn
update instructions alongsidenpm
. Addresses #2871. - The spec file’s font weight has been increased within the Test Runner for better readability. Addressed in #3065.
- We improved the error message displayed when a record key is unrecognized during
cypress run
. Addresses #1449. - We improved the typings when using
Cypress.on
to listen forwindow.alert
events to allow forSinon.stub
. Fixes #3451. - Fixed typo in typing for
.trigger
options. Addressed in #3588.
Documentation Changes:
- New Retryability doc #1278
- Updated
--browser
andbrowser
args to acceptpath
#1419 - Document how to accept or reject project transfers #1474
- Updated docs on explain how to run Chrome and Chromium browsers #1339
- Added
{home}
and{end}
character sequences to cy.type() - Added all newly supported HTTP methods to
cy.request()
doc. - Add new section to Debugging doc explaining whitelisting the Cypress Chrome extension.
- Fixed code example for google analytics stubbing #1454
Dependency Updates
- Upgraded
@cypress/commit-info
from2.1.1
to2.1.2
. #3327. - Upgraded
@cypress/xvfb
from1.2.3
to1.2.4
. #3328. - Upgraded
@ffmpeg-installer/ffmpeg
from1.0.15
to1.0.17
. #3329. - Upgraded
cachedir
from1.3.0
to2.1.0
. #3660. - Upgraded
chalk
from2.4.1
to2.4.2
. #3362. - Upgraded
chokidar
from1.6.0
to1.7.0
. #3363. - Upgraded
coffee-script
from1.12.5
to1.12.7
. #3365. - Upgraded
commander
from2.11.0
to2.19.0
. #3366. - Upgraded
common-tags
from1.4.0
to1.8.0
. #3368. - Upgraded
compression
from1.7.2
to1.7.3
. #3379. - Upgraded
cookie
from0.2.4
to0.3.1
. #3380. - Upgraded
cookie-parser
from1.4.3
to1.4.4
. #3443. - Upgraded
dependency-tree
from6.4.0
to6.5.0
. #3381. - Upgraded
electron-context-menu
from0.8.0
to0.11.0
. #3383. - Upgraded
electron-packager
from9.0.1
to9.1.0
. #3384. - Upgraded
electron-positioner
from3.0.0
to3.0.1
. #3385. - Upgraded
errorhandler
from1.1.1
to1.5.0
. #3386. - Upgraded
express
from4.16.2
to4.16.4
. #3409. - Upgraded
extract-zip
from1.6.6
to1.6.7
. #3410. - Upgraded
glob
from7.1.2
to7.1.3
. #3412. - Upgraded
image-size
from0.5.5
to0.7.2
. #3413 and #3500. - Upgraded
is-ci
from1.0.10
to1.2.1
. #3414. - Upgraded
lodash
from4.17.4
to4.17.11
. #3344. - Upgraded
mocha-junit-reporter
from1.17.0
to1.18.0
. #3417. - Upgraded
moment
from2.23.0
to2.24.0
. #3433. - Upgraded
morgan
from1.3.0
to1.9.1
. #3434. - Upgraded
node-uuid
from1.4.1
to1.4.8
. #3436. - Upgraded
parse-domain
from2.0.0
to2.1.7
. #3437. - Upgraded
request
from2.87.0
to2.88.0
. #3444. - Upgraded
request-progress
from0.3.1
to0.4.0
. #3445. - Upgraded
request-promise
from4.1.1
to4.2.4
. #3446 and #3476. - Upgraded
return-deep-diff
from0.2.9
to0.3.0
. #3447. - Upgraded
send
from0.14.2
to0.16.2
. #3448. - Upgraded
ssl-root-cas
from1.2.5
to1.3.1
. #3449. - Upgraded
supports-color
from5.1.0
to5.5.0
. #3464. - Upgraded
through
from2.3.6
to2.3.8
. #3465. - Upgraded
tmp
from0.0.31
to0.0.33
. #3466. - Upgraded
tough-cookie
from2.4.3
to3.0.1
. #3477 and #3659. - Upgraded
trash
from4.0.0
to4.3.0
. #3478. - Upgraded
underscore.string
from3.3.4
to3.3.5
. #3480. - Upgraded
yauzl
from2.8.0
to2.10.0
. #3481. Potentially fixes #3515. - We also updated many dependencies used for development and removed some unused dependencies.
3.1.5
Released 1/30/2019
Bugfixes:
- Fixed issue where the
onLoad
event was never being called when callingcy.visit()
on the url Cypress is currently navigated to. Fixes #1311. - Fixed regression introduced in
3.1.4
that caused anInvalidStateError
when visiting a page with an XHR request with aresponseType
other thantext
or''
. Fixes #3008. - Fixed several issues in Chrome* versions >= 72 in the Cypress proxy that caused using
cy.visit()
withlocalhost
to fail, or usinglocalhost
inside of thebaseUrl
configuration option. Fixes #1872 and #3252 and #1777. - Fixed another issue in Chrome* versions >= 72 where a scrollable command log would cause the entire application to be scrollable. Fixes #3253.
- Fixed not correctly passing the
timeout
option forcy.request()
. This should fix some instances where largetimeout
values would causeESOCKETTIMEDOUT
errors. Fixes #2669. - Fixed issue where Cypress would inject a script tag before the
<!DOCTYPE>
declaration when the document only contained the doctype declaration. Fixes #2617. - The error message when visiting a site with an invalid content-type now prints the correct content-type of the response Cypress received from the web server. Fixes #3101.
- Fixed issue where an internal
layout.html
file would inadvertently get loaded instead of the spec file. Fixes #2891. - Fixed issue where the Chromium browser was not detected in Linux due to Cypress not distinguishing between Chrome and Chromium browsers with the same version. Fixes #1400.
- Fixed issue of Cypress being unable to play videos with
autoplay
. We now pass the--no-user-gesture-required
command line switch to Chrome. Fixes #2376. - We now pass the Chromium command line switches
--use-fake-ui-for-media-stream
and--use-fake-device-for-media-stream
to Chrome by default in order to better support testing webcam functionality. Fixes #2704. - Updated filenames allowed for screenshots to allow more characters that are valid. Fixes #3052.
- Fixed TypeScript error caused by
dtslint
dependency introduced in 3.1.4. Fixes #3024 and #3136. - Improved error message displayed for
cypress cache
to not display[object Object]
and made--help
labels more descriptive. Fixes #2589. - Using
.clear()
on inputs of type ‘date’ is now working. Fixes #2738 - Fixed issue where
event
was undefined when using anonload
event handler. Fixed #2859
Misc:
- Improved errors shown when opening a project in the Desktop Application. The design is more readable and the error’s stack trace is now expandable. Addresses #2955.
- Improved experience of search in Desktop Application when there are no results. Addresses #3146.
- Updated tooltip content so that it no longer flows outside of the tooltip in the Test Runner when displaying longer routes. Fixes #2980.
- Added word labels beside icons in Desktop Application for ‘Support’ and ‘Docs’ links. Addresses #3091.
- Updated the CLI to no longer silence important stdout from
cypress version
,cypress cache list
etc commands. Addresses #2705. - Fixed incorrect type definition for options usage for .then(). Addresses #3075.
- Fixed incorrect JSDoc comments in type definition for .focus() and better formatted comments in type definitions. Addresses #2975 and #2954.
- Updated error messages to include single quotes when displaying written test code. Addresses #2684
Documentation Changes:
- Added example on how to use a fake video for webcam testing to Browser API doc.
Dependency Updates
- We’ve begun automating our dependency update process in order to avoid accidental dependency updates. Addresses #2990 and #3025.
- Upgraded
sinon
from3.2.0
to3.3.0
. Addresses #1328.
3.1.4
Released 12/25/2018
Merry Christmas everyone!
Bugfixes:
- Fixed a very longstanding (!) issue where
.click()
would fail to click the center coordinates of elements with styledisplay: inline
. Cypress would instead report that the element was being covered causing the error:cy.click() failed because this element is being covered by another element
. Fixes #210. - We now no longer abort XHR’s which have their
.abort()
method called but are already complete. This fixes an edge case where complete XHR’s were having theirdisposer
function called in frameworks likerxJS
which lead to Cypress accidentally re-aborting the XHR’s after they were complete. Fixes #761. - Fixed issues involving XHRs displaying as ‘aborted’ in the Cypress Command Log when they were not actually aborted. Fixes #1652.
- We no longer abort XHR request during the page’s
unload
event and allow the browser to handle natively calling abort. Fixes #2968. - Fixed an issue where Cypress’s
devDependencies
were being included in the Windows binary. Fixes #2896. - Fixed issue where XHR’s
onreadystatechange
was not receiving the proper event arguments. Fixes #2925. - We now properly strip leading paths of files on uncaught errors from Windows OS. Fixes #2936.
Misc:
- Removed the word ‘already’ from the Cypress install message in order to be less confusing. Adresses #2754.
- Fixed incomplete type definitions for
cy.request
. Fixes #2305.
Dependency Updates
- Upgraded
commit-info
from2.0.0
to2.1.1
. Fixes #2848. - Upgraded
lodash
from4.17.10
to4.17.11
. Fixes #2929.
3.1.3
Released 12/03/2018
Bugfixes:
- Fixed regression introduced in 3.1.1 with
requestAnimationFrame
that caused some animations not to run. Fixes #2725. - Fixed regression introduced in 3.1.2 that caused DOM elements passed to
cy.wrap()
to no longer yield the proper jQuery array instance. Fixes #2820. - Fixed regression causing invocations of
cy.clock()
to error on subsequent tests. Fixes #2850. - Fixed issue where a fix included in 3.1.2 did not pass the
windowsHide
argument to the proper options. Fixes #2667 and #2809. - Passing
.check({ force: true })
no longer requires the checkbox or radio to be visible. Fixes #1376.
Misc
- Updated types to support promises as arguments within
cy.wrap
. Fixes #2807. - We now expose all jQuery methods and values onto
Cypress.$
. Fixes #2830. -
cy.wait()
now accepts a separate timeout option forrequestTimeout
andresponseTimeout
. Fixes #2446.
Documentation Changes:
- Added
requestTimeout
andresponseTimeout
options tocy.wait()
- Added ‘History’ table to
cy.wait()
- Added ‘Alias’ for assertions that are aliases of each other to
Assertions
Dependency Updates
- Upgraded nodemon from
^1.8.1
to^1.8.7
. Fixes #2864. - Upgraded request from
^2.27.0
and^2.28.0
to^4.0.0
, Fixes #2455.
3.1.2
Released 11/18/2018
Bugfixes:
- Fixed a regression caused in
3.1.1
where we attempted to set a property on an invalid cookie sent from a server. Fixes #2724. - Fixed Cypress not correctly aborting long running connections (such as server sent events) on proxied requests. Fixes #2612.
- Fixed bug where tests were failing due to assertions causing Cypress to accidentally iterate through cross-origin iframes. If you were seeing “random” cross-origin errors, this likely fixes those issues. Fixes #2784.
- Fixed incorrectly setting
charCode
andkeyCode
when using.type()
on a few different special characters such as{
. Fixes #2105. - Fixed another regression in
3.1.1
where passingundefined
to asetTimeout
caused Cypress to error. Fixes #2719. - Fixed a bug in node core where Cypress would not show up in
Windows
for users onnode >= 11
. Fixes #2667. - Fixed a bug with trashing assets in linux that caused recursive
.Trash
files to show up. We now have opted to actuallyrm -rf
the files in linux because trashing is too inconsistent between linux distros. Fixes #2742.
Misc
- Added type definitions for
Cypress.moment()
. Fixes #2746. - We now display better error messages in the CLI when runs exceed billing limits. Fixes #1689.
Dependency Updates
- Removed
progress
#2733.
3.1.1
Released 11/2/2018
Features:
- You can now pass a
flag
option tocy.writeFile()
. The following flags are available. Fixes #1249. - There is a new
CYPRESS_DOWNLOAD_MIRROR
environment variable for installing Cypress at a mirror url. Fixes #2609. - The Module API now returns the
runUrl
fromcypress.run()
. Fixes #2596. - Specs now properly display as focused when navigating through specs via the keyboard. Fixes #2273.
- Tasks registered in the plugins file with the ‘task’ event are merged with any tasks registered by previous calls to
on('task')
, instead of overwriting the previous tasks. Fixes #2284.
Bugfixes:
- Fixed a bug where Cypress would error when a secure cookie flag was set and then expired from an HTTPS url without the subsequent secure flag. Due to the way Cypress was constructing the url, this would fail to actually remove the cookie. Fixes #1264, #1321, #1799.
- We now truncate filenames for screenshots to not exceed 255 characters in length. Previously there were cases where the screenshot filename would exceed 255 characters and error. Fixes #2403 and #2665.
- Fixed issue when using
cy.writeFile()
and passing an object to a.json
file. The object is now correctly written to the JSON file instead of a string. Fixes #2373. - We updated how we handle
trashAssetsBeforeRuns
behavior. We now trash the contents of thescreenshotsFolder
andvideosFolder
directories instead of trashing the directories themselves. This helps maintain any file access permissions for the directories. Fixes #1943 and #2600. - Fixed bug where mocked Dates using
cy.clock()
would not be an instance ofDate
. Fixes #2570. - Directories within specs whose names contain
.
are now correctly read as directories instead of spec files within the Test Runner. Fixes #2423. - Cypress no longer automatically takes screenshots of skipped tests. Fixes #2368.
- Fixed an issue where returning/resolving
undefined
from acy.task()
handler resulted in an incorrect runtime error. Fixes #2553. - Update
modifyObstructiveCode
to account for framebusting techniques that usewindow.frameElement
, so that Applications using this technique will run properly in Cypress. Fixes #2582. - Fixed bug where only the first DOM element of an array of DOM elements would be blacked out after being passed as argument to
blackout
withincy.screenshot()
. Fixes #2508. - We fixed an issue involving timers after running
cy.screenshot()
. Fixes #2432. - The Test Runner now retries node-originated errors from our internal API requests. Fixes #2341
- Fixed issue with multiple
readyStateChanges
with the samereadyState
. Fixes #1150. - Fixed Type error being thrown for users using TypeScript 3. Fixes #2363.
Misc
- We are now collecting more environment variables from runs when run in Semaphore, GitLab, Bitbucket, Team Foundation Server, Codeship, and Shippable. Fixes #2460, #2358, #2343, and #2453.
- The Test Runner’s search now resets when switching between projects. Fixes #2512.
- Fixed internal Cypress tests. Fixes #2606.
- Replaced use of
new Buffer
withBuffer.from
. Fixes #2626. - Whitelisted
autoScrollingEnabled
to be saved instate.json
. Fixes #2476. - Fixed internal test error
beforeSpecRun is not a function
. Fixes #2401. - Switched our internal tests to use CircleCI workspaces. Fixes #2398.
- Update TypeScript definition for
cy.screenshot()
to include screenshot specific options. Fixes #2654. - URLs printed within the CLI will now display as the color blue. Fixes #2493.
- We began bulk converting some of our codebase from CoffeeScript to JavaScript. Fixes #2686 and #2687.
- We updated some of our internal ESLint rules to be more strict and also to help with CoffeeScript to JavaScript conversions. Fixes #2688.
Documentation Changes:
- Added
flag
option tocy.writeFile()
doc. - Added
runUrl
to returned run in Module API doc. - Documented new
CYPRESS_DOWNLOAD_MIRROR
flag and rewrote advanced install instructions to be clearer in Installing Cypress doc.
Dependency Updates
- Upgraded common-tags from
^1.4.0
to^1.8.0
#2415 - Upgraded @cypress/browserify-preprocessor from
1.1.0
to1.1.1
#2513 - Upgraded lolex from
^1.5.2
to^3.0.0
#2570 - Upgraded @types/jquery from
3.2.16
to3.3.6
#2363 - Upgraded zunder from
5.6.5
to6.1.1
#2541
3.1.0
Released 8/13/2018
Summary:
- Cypress can now run tests in parallel across multiple virtual machines, or can be parallelized on a single machine. Cypress will automatically figure out, detect, and load balance all of your specs in the fastest and most efficient way possible. There is no configuration other than passing a
--parallel
flag and spinning up multiple machines on your CI provider. From our experiments you can expect to see approximately 40% reduction in overall run time per machine you add. However, attempting to run in parallel on a single machine requires server grade hardware with dozens (or even hundreds) of CPU’s and GB of RAM to run efficiently. A much better and simpler approach is to use a cluster of docker containers that are all isolated from each other. Any standard CI service (CircleCI, TravisCI, etc) comes with the ability to do this. We automatically tap into their environment variables to make parallelization possible without you having to configure anything. - Beyond parallelization, you now have the ability to group multiple runs with each other so that they show up together (grouped) in the Dashboard. This enables you to test different applications, groups of specs, or different environments (like development, staging, production) and see all of the results together. We know how important cross browser testing is to everyone, so we built this to lead directly into aggregating the results of multiple browsers into a single run.
- The Dashboard Service has been updated to show you more visual information about what happened during a run. You can see how specs were parallelized and you can calculate the effect of adding or removing machines to help reduce the overall run time.
Features:
-
cypress run
accepts a new–parallel
flag to run specs in parallel. Fixes #1690 and #64 and #2297. -
cypress run
accepts a new–group
flag to group multiple spec files within a single run. Fixes #2169 -
cypress run
accepts a new–ci-build-id
flag. Fixes #2153.
Bugfixes:
- We’ve finally tracked down the source of specs “hanging” and failing to start when running Electron. We finally tracked it down to a bug in Electron itself with setting
menu
when using offscreen rendering. Fixes #2322 and #2294 and #1235 and #1333. - Clicking on svg elements is now working. 3.0.2 introduced a bug that would throw an ‘illegal invocation’ error. Fixes #2245 and #2252 and #2258 and #2277 and #2288.
- Fixed a regression in
3.0.2
that caused typing{enter}
not to submit a form when there were<button>
elements other thantype='submit'
. Fixes #2261 and #2326. - Fixed a small visual bug where failed commands were not aligned to other commands. Fixes #2314.
- Fixes a race condition where async electron browser commands came in after the renderer had been destroyed, causing failures. Fixes #2321.
Misc
- When recording to the Dashboard Service, we now provide estimated durations per spec directly within the standard output, as long as the spec has had enough run history for this to be determined. Fixes #2276.
- When using the new
–parallel
or–group
feature, we now visually indicate that to you in the standard output when recording. Fixes #2275. - We have added support for more CI providers to automatically detect and show more relevant information in the Dashboard, instead of showing ‘Unknown’. Fixes #2146.
- We have added better checks and reliability for detecting runs in Jenkins. Fixes #1990.
- The built in
cypress-browserify-preprocessor
was bumped to1.1.0
. This supports more JavaScript features by default, including async/await, object rest spread, and class properties. Fixes #2254. -
cypress run
now creates a new browser profile per run per browser, but keeps the same browser profile for interactive mode withcypress open
. This means you can run Cypress locally over multiple processes and the browser profiles will not conflict with each other. Fixes #1566. - The Desktop-GUI has been updated to get the new routes provided by the Cypress API for runs. Fixes #2189.
- Cypress now retries multiple times (with a backoff strategy) when communicating with our API fails while recording runs. This will provide better feedback in situations when the API is temporarily unavailable. Fixes #1590.
- When Cypress retries due to an API timeout or failure it now displays a very nice message indicating to you the delay and number of retries left. Fixes #2280.
- We’ve added parallelization to our own internal tests for the driver and the desktop-gui. We’ve been able to reduce the number of concurrent instances our tests use by 4, and shaved about 6 minutes off of each build. Faster with less resources. Fixes #2325.
Documentation Changes:
- Added
Parallelization
doc. - Update
Dashboard Service
doc with new screenshots and run sections. - Update
Command Line
doc with new flags and alphabetized flags.
3.0.3
Released 7/30/2018
Bugfixes:
- Reverted the Chrome argument that disabled
RootLayerScrolling
which was used to prevent the application under test from “shaking” due to a bug in versions 66 and 67. This workaround inadvertently created a different and much more severe bug in Chrome 68 that would miscalculate pointer coordinates. This led to Cypress giving confusing errors about elements being covered up on action. This is still a bug in Chrome, and is fixed in Canary but has not yet been released to the stable Chrome 68 channel. Nevertheless, removing theRootLayerScrolling
flag does fix it. We did several experiments to try to ensure that the “shaking” behavior does not exhibit itself in Chrome 68. We have limited the--disable-blink-features=RootLayerScrolling
flag to Chrome 66 and Chrome 67. Fixes #2223 and #2215 and #2037. - Fixed another bug with Chrome that caused the
chromeWebSecurity: false
option to not be respected. This was due to Chrome progressively rolling out trials of a new option that attempts to isolate sites (and iframes) in their own child process if their origins are different. Fixes #1951 and #2001 and #715. - Fixed Cypress hanging in CI due to excessive and unnecessary globbing. We finally tracked down this issue which made it appear as if Cypress was “hanging” after closing a spec file and then attempting to open the next one. Fixes #2183 and #1905 and #1912.
- We are now properly serializing nested object arguments when using the Module API via
cypress.open()
orcypress.run()
. Passing nested objects inreporterOptions
now works correctly. This is especially useful when usingmocha-multi-reporters
. In addition to fixing the Module API, we are now also properly handling nested arguments from the Command Line. In order to pass nested objects within CLI params you must pass stringified JSON. This is useful for properties such asblacklistHosts
. Fixes #1348 and #1357 and #2221. - Fixed a bug causing screenshots saved via
cy.screenshot()
to be in different folders when you ran usingcypress open
vscypress run
. Fixes #2091. - Fixed bugs with Electron losing focus when running headlessly via
cypress run
after navigation. Now the browser will always act as if it is focused no matter what and in all situations when running headlessly. If you were seeing focus related problems when running headlessly, this should fix them. Fixes issue #2190. - Fixed using when using
cy.click()
on an element that bound to thefocus
event while the browser was currently out of focus. We have now normalized all focus and blur events to behave the same as if the browser is always in focus. This should fix the other batch ofblur
andfocus
issues that users have been experiencing. Fixes #549 and #2198. - Fixed the vast majority of known issues with
.type()
. Fixes #1241. - Using
.type()
on an input of typeemail
ornumber
will no longer fire unnecessary additionalblur
andfocus
events. Fixes #2210. - Fixed
.type()
breaking on chains when passing the sameoptions
references. Fixes #365. - Fixed an issue with
.clear()
not behaving the same ascy.type('{selectall}{backspace}')
. Fixes #420. - Fixed a bug with issuing an additional
blur
andclick
event when chaining.clear().type(...)
. Fixes #593. - Fixed many issues with typing into
[contenteditable]
elements. WYSIWYG, Draft.js based, and other HTML editors now work correctly. Fixes #596 and #1686 and #2096. - The caret now correctly moves on
[contenteditable]
elements. Fixes #1108. - Fixed
.type()
inserting a rogue<br>
tag after the first letter in[contenteditable]
elements. Fixes #1926. - Fixed issue where change events with
.type()
would not fire correctly for many more situations and edge cases. Fixes #651. - Fixed issues with typing into JS based text-mask plugins. Basically anything that would alter the
.value
in response to certain events now works correctly. Fixes #940 and #1684. - Using
.clear()
on an input with amaxlength
attribute now works. Fixes #1002 and #2056. - Fixed issues with
.type()
not firing thechange
event oninput[type=number]
. Fixes #1171. - Fixed other event related issues with
.type()
that were not firing correctly. Fixes #1209. - Fixed even more issues with
.type()
not inserting characters oninput[type=number]
. Fixes #1381. - Fixed not being able to type negative numbers into
input[type=number]
elements. Fixes #2173. - Fixed
selectionStart
andselectionEnd
with.type()
when using{leftarrow}
or{rightarrow}
. Fixes #1234. - Fixed not being able to type into a
datetime-local
input. Fixes #1366. - Calling
.focus()
or.blur()
oncy.window()
no longer fires blur events on theactiveElement
or causes it to becomebody
. Fixes #2234. - Using
cy.get('body').click()
now correctly changes theactiveElement
back tobody
and causes the existingactiveElement
to receiveblur
. Fixes #2236.
Misc:
- We’ve loosened up the restrictions surrounding what we consider a typeable element. You can now type into inputs with invalid
type
attributes because the browser does still consider them regulartext
inputs and allows you to type into them. Fixes #586. - Using
{uparrow}
or{downarrow}
with.type()
on aninput[type=number]
element now increments or decrements the number configured via thestep
attribute. Fixes #2110. - Using
{uparrow}
or{downarrow}
with.type()
now correctly moves the cursor ontextarea
or[contenteditable]
elements. Fixes #2187. - You can now use
.focus()
or.blur()
oncy.get('body')
. Fixes #2235. - Bumped the version in
junit
reporter dep from1.12.1
to1.17.0
which adds a few new features. Fixes #2238. - Bumped deps that
npm audit
was yelling about. Fixes #1701. - Runs showing up in the
Runs
tab now more closely match how they display in the Dashboard. Fixes #2060. - Added more debug logs. Fixes #2108.
- When recording to the Dashboard we now more accurately collect commit details when it is missing from the local
git
data. Fixes #2129 and #2073. - Updated build in example kitchen sink to
1.0.2
. Fixes #2139. - Updated the json-schema describing
videoCompression
. Allowing it to be a boolean. Fixes #2140.
Documentation Changes:
3.0.2
Released 6/28/2018
Bugfixes:
- Screenshots taken with
cy.screenshot()
on 2x DPI are now taken at the correct full size. Fixes #1857 and #2018. - Windows users no longer exit with
EPIPE
errors when runningcypress run
in newer versions of Node. Fixes #1841 and #2044. - Fixed issue where applications programmatically stealing focus would lead to slow runs in Electron when running via
cypress run
. #1909 and #1892. - Electron no longer reports the browser as out of focus when running via
cypress run
. Fixes #1939. - Modified the
document.hasFocus()
method to returntrue
if the top window (Cypress window) is in focus. This should now correctly match how your application behaves outside of Cypress. Fixes #1940. - Fixed issue where Cypress would unnecessarily scroll when attempting to locate elements with
position: sticky
. Fixes #1475. - Fixed a bug where changing the
integrationFolder
in Windows would lead to errors with plugins. Fixes #1704. - Cypress no longer crashes when a 3rd party server sends invalid
gzip
content. Also fixed issues with incorrectly gunzipping multibyte characters which would potentially lead to serving invalid HTML or JS. Fixes #1396 and #1756. - The
--silent
flag should now be respected duringnpm install cypress
on all OSes. Fixes #817. - Corrected a typo in the CLI for a warning message. Fixes #2038.
- Fixed some areas of the Desktop GUI that did not display path names correctly in Windows. Fixes #1830.
- The
pluginsFile
now supports an absolute path instead of just a relative one. Fixes #1837. - Fixed a regression introduced in
3.x.x
where application code that usedsetTimeout
with a string argument would see the errorfn.apply is not a function
. Fixes #1854. - Fixed issue where preprocessor errors were being swallowed. Fixes #1877.
- Fixed issue where Cypress would hang indefinitely when starting a new spec when in
cypress run
mode. Additionally we have optimized the code path to not read in the localstate.json
unnecessarily. Fixes #2013 and #1912 and #1905 and #1890. - Fixed a couple regressions in the Dashboard where timed out runs stayed “Pending” forever. Fixes #1891 and #1952.
- Fixed another Dashboard regression where an error would throw when recording tests and sending a large list of specs. Fixes #1901.
- Fixed issue where videos would not be recorded when an object was returned from
before:browser:launch
when in the Electron browser. Fixes #1992. - Fixed an issue where Cypress would inject content into the
<header>
tag instead of the<head>
tag. Fixes #2026. - Fixed an oversight where a specific framebusting check was not being properly stripped and removed by the default config option
modifyObstructiveCode
. Fixes #2030 and #2059. - Fixed icons visually shifting when tests were running in the Test Runner. Fixes #1983.
- Server sent events now finally work correctly in Cypress. Fixes #1440 and #1111.
- Time traveling snapshots now preserve the styles of empty
<style>
tags with programmatically inserted CSS rules. Fixes #1226.
Misc:
- There are now several new CLI commands for interacting with the binary cache:
cypress cache path
,cypress cache list
, andcypress cache clear
. Fixes #1856. - We’ve added a new CLI flag:
--no-exit
forcypress run
to keep the browser open after the tests finish running. Fixes #1871. - The CLI now respects config values and environment variables put in your
.npmrc
file. Fixes #1399 and #1853. - Significantly improved the performance of taking screenshots. #1863.
- Node module dependencies updated. Fixes #1674 and #1942.
- The bundled version of FFmpeg has now been bumped from
3.x.x
to4.x.x
. This may help with some issues users were experiencing when recording videos. Fixes #1972. - Added more debug logs to FFmpeg to determine why FFmpeg compression sometimes causes Cypress to crash (mostly while running in Travis CI). Fixes #1971.
- Several improvements to TypeScript typings. Fixes #1881 and #2007 and #1899 and #1902 and #1897 and #1907.
- We improved error logging and the user experience around
cypress verify
. Fixes #1984. - We no longer log the
skipping install
message if the Cypress binary is already installed locally. Fixes #1985. - Now, by default, screenshots are nested within a folder with the name of the spec file that is currently running. Example - the spec named
cypress/integration/foo/bar_spec.js
will save screenshots inside of this directory:cypress/screenshots/foo/bar_spec.js/*
. Fixes #1826. - Passing
foo/bar/baz
as the fileName arg tocy.screenshot()
inside a spec,app.spec.js
, will now result in the screenshot being saved to a nested folder path such as:cypress/screenshots/app.spec.js/foo/bar/baz.png
. Fixes #1771 and #668. - We now append
(failed)
to the screenshot filename of screenshots taken automatically during test failure. Fixes #1923. - If multiple screenshots are taken during a test that will result in the same filename, their file paths are now appended with a number, i.e.
test name (1).png
. This prevents screenshot files with the same name from being overwritten. Fixes #1766. - Screenshot
onAfterScreenshot
andonBeforeScreenshot
callbacks ar enow invoked for failed tests. They include atestFailure
property to distinguish between automatic ones and your own use ofcy.screenshot()
. Fixes #2040. - There’s now an
after:screenshot
plugin event you can use in yourpluginsFile
to work with screenshots after they are taken. This enables you to rename them, move their location, resize them, send them to a service, etc. Fixes #2039. - Added
Cypress.browser
object which contains information about the currently running browser. Fixes #1919 and #1961. - Added
Cypress.spec
object which contains information about the currently running spec. Fixes #1918. - URLs displayed in the Command Log during
cy.visit()
are no longer arbitrarily truncated at a set width. Fixes #1995.
Documentation Changes:
- Update
cy.screenshot()
doc to include new file naming behavior - Updated “Command Line” doc to include new cache commands
- Added
Cypress.browser
doc. - Added
Cypress.spec
doc. - Added
after:screenshot
plugin event doc.
3.0.1
Released 5/30/2018
Bugfixes:
- Seeded KitchenSink tests no longer fail. Fixes #1812.
- The binary cache now correctly works and will not reinstall Cypress if an existing version is already installed. Fixes #1813.
- Closing the
Electron
browser and then openingChrome
no longer causescy.screenshot()
to fail. Fixes #1820. - Fixed a bug with Windows users seeing crashes with
tty.getWindowSize is not a function
. Fixes #1815 and #1817.
3.0.0
Released 5/29/2018
Summary:
- There is a new
cy.task()
command that enables you to go outside the browser to perform tasks directly innode
. This will make it easy to setup, scaffold, seed, talk to your database, or anything else useful on a back end. -
cy.screenshot()
has been rewritten from the ground up. It now takes a screenshot of only the application under test by default. It also can take full page screenshots or element only screenshots. This is the first step of Cypress Dashboard support for screenshot diffing. - When running with
cypress run
we now run each spec file in isolation from others. We have rewritten our reporter to provide more details and provide a summary of the run at the bottom. - The Dashboard has been upgraded to make it easier to understand the results of each spec run. This was done in anticipation of providing you the ability to parallelize and load balance your spec files automatically in CI.
- We are now capturing the performance and timings data of every test when using
--record
mode and are beginning to offer the first analytics and insights into the health of your tests on our Dashboard Service. - Cypress now caches globally per version which prevents it from being installed multiple times across projects.
Breaking Changes:
- We now run each spec file in isolation from one another. This shouldn’t technically break anything, but if you have set up your tests in a way that requires the state of a previous spec file, this could potentially break your tests. This will go a long ways towards reducing problems we were seeing with long runs in CI. Fixes #431, #681, #1589, #1539, and #1692.
- The environment variable
CYPRESS_BINARY_VERSION
has been removed. You should use the equivalent environment variableCYPRESS_INSTALL_BINARY
instead. - The environment variable
CYPRESS_SKIP_BINARY_INSTALL
has been removed. To skip the binary install, setCYPRESS_INSTALL_BINARY=0
. -
screenshotOnHeadlessFailure
has been removed as an option incypress.json
. Instead you can now control this behavior directly with code by settingscreenshotOnRunFailure
tofalse
within the new Screenshot API. Fixes #1140 and #1754. -
trashAssetsBeforeHeadlessRuns
has been renamed totrashAssetsBeforeRuns
in our configuration. Fixes #1754. -
videoRecording
has been renamed tovideo
in our configuration to be clearer and prevent confusion about recording to our Dashboard. Fixes #562. - Cypress no longer copies screenshots and videos to artifacts for CircleCI. Copying artifacts should be left up to the user to handle themselves in their
circle.yml
file. Fixes #1592. - The standard output has been redesigned to better visualize spec files running in isolation and to be more visually appealing. This may break any specialized logic written that expected the standard output to be structured in a specific way or contain specific words. Fixes #1588.
-
cy.screenshot()
no longer takes a screenshot of the runner by default. Instead it will hide the runner, remove application scaling and then scroll to take a full page picture of your application. -
before
andafter
hooks within a support file now run before/after every spec file, instead of only once before/after the entire run. #681
Features:
- There is a new
cy.task()
command for executing any arbitrarynode
code. - You can now run multiple specs by passing a glob to the
--spec
argument ofcypress run
. Fixes #263, #416 and #681. - There is a new Screenshot API and new
cy.screenshot()
options that allow you set defaults for how screenshots are captured, whether to scale your app, disable timers and animations, or which elements to black out in the screenshot. You can also set defaults for whether to automatically take screenshots when there are test failures or whether to wait for the Command Log to synchronize before taking the screenshot. Fixes #1424. -
cy.screenshot()
can now be chained off of commands that yield a DOM element and will only take a screenshot that element. - During install of cypress, the Cypress binary is now downloaded to a global cache. This prevents multiple projects from downloading the same Cypress version. Fixes #1300.
- The seeded
example_spec.js
file has been replaced by anexamples
folder with several spec files. This more closely reflects the recommended use of Cypress - as smaller groups of tests split among many files that will now be run in isolation. The tests were also updated from ES5 to ES6. You can see all changes in thecypress-example-kitchensink
repo Fixes #1460. - Cypress now watches all the
plugins file
‘s entire dependency tree to make iterating on plugins easier. Fixes #1407. - Videos will now be saved locally with a filename named after the associated
spec
file that it represents. Fixes #980. - The Test Runner now displays
skipped
tests differently thanpending
tests. #244. - Standard output now displays the number of
skipped
tests within the summary output duringcypress run
. #1559. - The url to view the run in the Dashboard is now printed to output during
cypress run
. #494. - We now print the browser and browser version run in the output during
cypress run
. #833. - The build number and url to CI for tests run within Drone are now captured and displayed on the run within the Dashboard. #1709.
Bugfixes:
- Cypress no longer crashes when attempting to proxy a WebSocket connection that fails. Fixes #556.
- Asserting that an attribute equals a falsy value no longer fails when the value was falsy. Fixes #831 and #1491.
- Snapshots now ignore stylesheets with
media="print"
. Fixes #1568. - Fixed issue where the Cypress
window
was being returned instead of AUT’swindow
. Fixes #1436. - The
close
event now properly fires onfile
when manually closing the browser. Fixes #1560. -
cypress.env.json
is now being watched for changes. Fixes #1464. - Fixed issue when using TypeScript that caused namespace errors to be thrown. Fixes #1627.
- Fixed error message on
.type()
and.clear()
when typing into non-typeable elements or clearing non-clearable elements to accurately list the elements allowed. Fixes #1650. - Added Chrome flag
--disable-blink-features=RootLayerScrolling
to prevent the application under test from “shaking” in recent versions of Chrome. Fixes #1620. - Fixed issue where some TTY characters were not properly formatted in the terminal for Windows during
cypress run
. Fixes #1143 and #1550. - Removed an extraneous error display from Electron during
cypress run
about a “transparent titlebar” setting. Fixes #1745.
Misc:
- We are now aggressively turning on colors when running in CI. If you’re using Jenkins and do not have an ANSI color plugin installed, you can turn off colors with the
NO_COLOR=1
environment variable. Fixes #1747 and #1748. - When running
cypress run --record
on forked PR’s, we now detect that the Record Key is missing and do not fail the build. We will display a warning, but continue running the tests. Fixes #1193. - Searching in the Test Runner now filters out any non-matching folders. Fixes #1706.
- Duplicate, subsequent logs in the Command Log are now collapsed and can be expanded to view all logs. Fixes #1580.
- We now throw a descriptive error if an alias using
.as()
was defined starting with the@
character. #1643. - We now pass the
--disable-device-discovery-notifications
flag automatically. This should prevent Chromium browser from automatically trying to communicate with devices in your network, such as printers, while running tests. Fixes #1600. - We now pass any reporter errors along and provide a stack if a custom reporter you’ve provided does not exist. Fixes #1192.
- You can now pass a normal object to
cypress.open()
orcypress.run()
through the Module API, just as you would from the command line. #1442. - Added type definitions for
Cypress.off
andCypress.log
. Fixes #1110 and #1591. - Update type definitions for
cy.screenshot()
to reflect new changes to command’s options. Fixes #1753. - The type definition for
.filter()
now correctly supports a function argument. - The type definition for
.scrollIntoView()
no longer errors when passed aduration
option. Fixes #1606. -
NODE_OPTIONS
environment variables now print within thecypress:cli
logs when running inDEBUG
mode. Although usingNODE_OPTIONS
themselves should not be used due to #1676. Fixes #1673. - Cypress will error and exit with status 1 if no specs were found during
cypress run
. Fixes #1585. - We are now counting and aggregating the stats at the end of test runs separately from Mocha. Cypress considers a test to be the
it
and any accompanyinghooks
that run before or after a test. Cypress will correctly associate failures in those hooks to the test itself. We believe this more accurately models and just “makes sense”. Fixes #1163. - The minimum viewport size has been lowered from
200
pixels to20
pixels. Fixes #1169 and #1444. - Internal changes to our API structure and communication. Fixes #1170, #1413, #1415.
- We output a much more complete test results object when using cypress as a module. Fixes #1248.
- Added keywords to Cypress npm package. Fixes #1508.
- Centered the animating icon in the Test Runner when ‘running’. Fixes #1695.
- We made some changes to internal references of
headed
andheadless
to be more specific and instead referencerun mode
andinteractive mode
. Fixes #1140. - The test name text is now selectable inside the Command Log. Fixes #1476.
- Minor improvements to contributing docs and scripts. Fixes #1665.
- We now collect Semaphore CI params and provide URL’s to click into the builds from the Dashboard. Fixes #1785.
- Config overrides coming from the CLI or environment variables are now validated the same way as if they’ve been set in
cypress.json
. Fixes #1783. - There is a better / more helpful experience around passing unknown options to the CLI. Fixes #837.
- Display an empty message when there is no commit information on recorded runs. Fixes #1809.
Documentation Changes:
- New
cy.task()
doc - New
Screenshot API
doc - Update
cy.screenshot()
doc to include new accepted usage and options - Update
Installing Cypress
doc to include new options for Cypress binary caching - Updated
Writing and Organizing Tests
to include newly seededexamples
folder - Updated
cypress run
spec args - Updated
Dashboard Service
- Updated
Launching Browsers
to include our disabling of device discovery notifications - Updated
Preprocessors
to reflect all waysclose
event could be triggered - Updated use of “running headlessly” to more accurate “during
cypress run
“
2.1.0
Released 3/1/2018
Bugfixes:
- Prevent a bug with
node-sass
on OSX + Windows when localnode
version does not match bundlednode
when importing components directly in spec files. The underlying issue was because we forgot to updateBuildkite
andAppveyor
when we upgradedElectron
in2.0.0
. Fixes #1387 and #1390.
Features:
- The Selector Playground has been updated to automatically prefer
data-cy
,data-test
ordata-testid
attributes when providing the unique selector for an element. Additionally it now exposes a public API that you can use to control how it determines which selector to use. Fixes #1135.
Documentation Changes:
- Added
Selector Playground Guide
- Added
Selector Playground API
- Updated
Best Practices
- Updated
FAQ
- Updated
Introduction to Cypress
2.0.4
Released 2/25/2018
Bugfixes:
- The
cypress
npm package now has the correctengines
set inpackage.json
. This was accidentally getting overwritten and caused errors whenengineStrict
was set in environments usingnode
older than8.2.1
. Fixes #1373.
2.0.3
Released 2/21/2018
Bugfixes:
- The runner no longer appears to “hang” if a
before
hook fails in a test with siblings. Previously the test would never generate astatus
and look pending forever. This was a visual bug only. Fixes #1343. - The Desktop GUI properly renders folders that contain specs in Windows now. Fixes #1335.
Misc:
- The viewport dropdown helper in the Runner now displays string quoted JSON instead of an object literal. This better matches how you should write those options in
cypress.json
. Fixes #1350.
2.0.2
Released 2/17/2018
Bugfixes:
- Fixed more edge cases where legitimate JavaScript code was being modified unexpectedly by the
modifyObstructiveCode
configuration. We’ve tightened up the RegExp even more and added 40 popular JS libraries to test against to ensure they are not modified. Fixes #1334. - Fixed an edge case when hooks such as
beforeEach
orafterEach
threw an identical error message, Cypress would hang indefinitely and never finish running the tests. Fixes #674. - Fixed bug when
Errors
that threw with no arguments:throw new Error()
and had their messages appended would duplicate the message over and over again. Fixes #1338.
2.0.1
Released 2/16/2018
Bugfixes:
- Using
cy.contains()
with a RegExp argument is now properly escaped. Fixes #1322. - Fixed a runaway RegExp causing large
.js
files to take dozens of seconds to process. This was a regression caused by2.0.0
with the newmodifyObstructiveCode
option. We’ve optimized the RegExp and the performance is back to being almost identical to transparently passing responses through. Fixes #1330.
2.0.0
Released 2/15/2018
Breaking Changes:
- The built in default
Electron
browser has been bumped from version53
to59
. This version represents the version ofChromium
that Electron is using. In other words, runningcypress run
(or viaElectron
) will be like running your tests inChrome 59
now. Although it is unlikely this would actually break any of your tests - it is technically possible they could behave differently. Fixes #895 and #891 and #823 and #860 and #1011 and #1252 and #1276. - We are now detecting and automatically stripping code that obstructs Cypress from being able to test your application. Specifically, we are removing JavaScript code that tries to prevent clickjacking and framebusting. We have written very conservative rules that do their best to only strip these specific JS snippets, but it is technically possible that it may unintentionally rewrite valid JS if they match the RegExp patterns. There is a new configuration option called
modifyObstructiveCode
that istrue
by default. If you are experiencing problems after upgrading, you can turn this off and this will disable modifying your JS code. If you were using Cypress and upon visiting your website you would experience seemingly “random” redirects - these problems should now be eliminated. Fixes #886 and #1245 and #1064 and #992 and #692 and #352. - We are now clearing the browser’s disk cache each time it opens (before any tests run). This means that any files that have been cached from
Cache-Control
headers will be cleaned and removed. In the future, we will expose a newcy.clearCache()
method to provide finer grained control of clearing the cache on a per test basis. But for now, this is an improvement. Fixes #1124. - The
--spec
option is now normalized against the current working directorycwd
instead of the project that you are running Cypress in. That means passing a path from the command line to a spec file will now work even when the project path is notcwd
. Fixes #1159.
Bugfixes:
-
blacklistHosts
would occasionally not work if you were blacklisting a host that had previously cached a file. In this case, the browser would serve it from disk and not make an actual HTTP request. This issue has been solved by clearing the cache when the browser opens. Fixes #1154. -
blacklistHosts
is now correctly accepted via the--config
CLI flag. - Spies and Stubs created with
cy.stub()
andcy.spy()
will now retry their assertions when utilized from an alias. Fixes #1156. - Basic auth is working again in Chrome 63 and Chrome 64. We “for real” fixed it this time by adding auth headers automatically at the network proxy layer and bypassed the browser altogether. We automatically apply auth headers if you provide a username/password in the URL of a
cy.visit(url)
. We also added a newauth
option to specify theusername/password
usingcy.visit(url, options)
. All of the requests that match the origin of the URL will have theAuthorization: Basic <...>
headers added. Fixes #1288. - Fixed domain parsing failures when
local
orlocalhost
was not used as atld
. Fixes #1292 and #1278. - Removed the flag
--disable-background-networking
from the Chrome launch args to fix problems in CI that would throttle XHR callbacks by up to 20-30 seconds. Fixes #1320.
Misc:
- We now properly display nested objects and arrays that come from
cypress.json
in the Settings tab in the Desktop Application. - There’s now a proper “empty view” when you go to setup your project to record on our Dashboard and you have not created any Organizations. Fixes #1306.
- Removed the message about private projects requiring a paid account in the future. There will be a free tier including private projects. Fixes #827.
- We moved the location of the browser’s disk cache. That means that if you’ve been using Cypress for a really long time - you may have built up quite a large existing cache (in the hundreds of
mb
). Before upgrading, you should open the browser and then manually clear the Cache. Or - if you have already upgraded to2.0.0
delete the following folders:- OSX:
~/Library/Caches/Cypress
- Linux:
~/.cache/Cypress
- Windows:
%APPDATA%\Cypress\cy\production\browsers
- OSX:
1.4.2
Released 2/4/2018
Bugfixes:
- Fixed not being able to visit subdomains when using 2nd level sub domains. Fixes #1175 and #600.
- Fixed not being able to visit private TLD’s from the public suffix such as
github.io
,gitlab.io
orherokuapp.com
. These now all work correctly. Fixes #380 and #402 and #802 and #493 and #1161. - Fixed not being able to visit URLs that used
*localhost
such ashttp://app.localhost:8080
. Fixes #451. - Mochawesome now works correctly and outputs files in all versions. Fixes #551.
- Mochawesome will exit correctly with code
1
when a hook fails. #1063. - Fixed some incorrect typings with TypeScript. Fixes #1219 and #1186.
- Fixed bug with custom 3rd party Mocha reporters relying on
test.titlePath
being a function. Fixes #1142. - Fixed typo in
cypress.schema.json
. Fixes #1167. - Fixed typo in CLI deps error about Docker. Fixes #1136.
- Prevent
NODE_ENV
from being set toundefined
when parent process did not have it defined. Fixes #1223.
Misc:
- We have begun to aggregate failures and other stats ourselves instead of relying on Mocha reporters. Fixes #1141.
- Added TypeScript
should/and
autocomplete and typings for Cypress events. Fixes #1187 and #1132. - Upgrade deps. Fixes #1174.
1.4.1
Released 12/26/2017
Bugfixes:
- Using
DEBUG=cypress:*
now correctly outputs all debugging information on OSX and Linux. Previously output other thencypress:cli
was ignored due to the CLI ignoringstderr
from the binary. Fixes #921. -
stdout
is now captured correctly in Windows when recording to the Dashboard. Fixes #977 and issue #711. - Windows now forcibly displays colors correctly to the terminal. Fixes #1127.
Misc:
-
TTY
is now handled correctly for Linux and OSX. This means that CI providers which turned off colors due toTTY
being false will now display colors again such as TravisCI. Fixes #1126. - We now handle Xvfb exiting with a non zero status code and display that error to you. This should help with situations where Xvfb is misconfigured on the system. Fixes #1113.
- We’ve added debug output for Xvfb when
DEBUG=cypress:xvfb
is enabled. Helpful when diagnosing problems with Xvfb. Fixes #1128. - We’ve added more TypeScript documentation for
cy.*
methods. Fixes #1117. - When developing on Cypress, we now start the process through the CLI to bring it into parity with how it works when used in production. Fixes #838.
- Upgraded various CLI dependencies that were flagged for security warnings. There wasn’t an actual security problem - just static analyzers complaining. Fixes #1103.
1.4.0
Released 12/19/2017
Features:
- There is now a Search Bar in the Desktop GUI that enables you to filter the list of specs. Helpful for projects with a ton of spec files. Fixes #1098.
Bugfixes:
- The seeded
example_spec.js
file no longer fails in Windows on thecy.exec()
test. It now conditionally runs a command appropriate for Windows. Fixes #1097. - Trying to log in to Cypress no longer causes the app to crash. This area has had many more tests added. Fixes #1093.
- Some minor improvements to TypeScript definitions around
.then()
. Fixes #1084. - The Selector Playground now works correctly in the Electron browser. Fixes #1086.
1.3.0
Released 12/17/2017
Features:
- Plugins now emit a
before:browser:launch
event exposing you the browser that will be launched and its launch arguments. This enables you to modify the arguments prior to launching the browser. You can also use these arguments to modify how Chrome runs and to also test Chrome extensions. Fixes #691 and #298. - We have launched a “CSS Selector Playground”, a new UI button in the Test Runner that enables you to highlight elements in your application and receive a unique selector. You can also find elements by their text content. These mimics
cy.get()
andcy.contains()
behavior. Additionally you can copy the generated Cypress command to your clipboard or output the generated selector to your console. This feature is in beta. It only works in Chrome (not in Electron). We are aware of some bugs in it, but it is good enough for use and feedback. Please check out issue #917, watch an animated gif demonstration, and leave any feedback you have there. Fixes #917.
Documentation Changes:
1.2.0
Released 12/14/2017
Features:
- Plugins can now return a
Promise
and modify the yieldedconfig
to set new configuration values and environment variables. Fixes #1042 and #909 and #576. - There is a new
userAgent
option incypress.json
. This enables you to change theuserAgent
of the browser for the entire browsing session. Fixes #364. - There is a new
blacklistHosts
option incypress.json
that allows you to block requests made to those hosts. Blocked requests will respond with a503
status code. This is useful for blocking 3rd party domains like Google Analytics. We have added a new ‘Stubbing Google Analytics’ recipe demonstrating this. Fixes #442. - Added chai assertions in TypeScript to generate autocompletion. Fixes #1073.
Bugfixes:
- Updated TypeScript definitions to more accurately match the current Cypress API. Fixes #1050. Also note that if you were extending Cypress in TypeScript the
Chainer
interface changed. Please read #1048#issuecomment-351891910 to understand what you will need to update.
Misc:
- Renamed
environmentVariables
toenv
in the Desktop GUI. Fixes #1052. -
Cypress.config()
now returns a complete set of configuration values. Fixes #509. - Added TypeScript typings for bundled Cypress tools like
$
,_
, etc. Fixes #1046. - Some error messages were made more passive. Fixes #1025.
Documentation Changes:
- Added
Configuration API
- Added
Recipes
- Updated
Configuration
- Updated
Environment Variables
- Updated
Using Cypress FAQ
- Updated
Plugins Guide
- Updated
Writing a Plugin API
1.1.4
Released 12/6/2017
Bugfixes:
- Fixed an issue causing
Chrome
to timeout when attempted to be run through our docker containers. Fixes #1031. - Several TypeScript typings were added, updated and fixed. Fixes #1006.
- Using a regular
http://
URL now works when using theCYPRESS_BINARY_VERSION
flag to point the binary at an external location. Fixes #1001. - File watching is fixed (again) when changing between specs. Fixes #1018.
Misc:
- There is now a new
CYPRESS_SKIP_BINARY_INSTALL
flag you can pass duringnpm install
which skips the binary installation after thecypress
npm module completes its installation. Fixes #1005. - We now launch Chrome with
--no-sandbox
and--disable-gpu
options in Linux. We will soon release a new plugin event that enables you to modify the browser arguments we use by default. This shouldn’t cause issues with existing Linux users, and instead it should fix many CI setups that were using our Docker containers or your own home grown installed Chrome setup. Fixes #1021 and #1020. - Removed several aliases from our browser detector. These were not implemented properly and not needed - and thus only caused indirection. Fixes #1023.
1.1.3
Released 12/3/2017
Bugfixes:
- JSON fixtures with unicode escape sequences are now parsed correctly. Fixes #964.
- The default
browserify
plugin no longer fireswatched:file:changed
twice leading to an uncaught exception that was popping up in the console. Also fixed a minor state bug in thebrowserify
package. Fixes #968. - Cypress no longer reports
Electron
as the browser that ran in the Dashboard Service when a different browser was run. Fixes #854. - Invalid cookie values no longer crash Cypress. Fixes #962.
Misc:
- We are now bundling our own
TypeScript
definitions with thecypress
npm module. You no longer have to install@types/cypress
anymore. We’ll continue to keep these updated with API changes. Fixes #856. - Uncaught exceptions originating from your application code and/or test code are now distinctly and clearly indicated in the error message. We included a link to our docs to educate you on how you can optionally disable Cypress from catching these. Fixes #825.
-
cy.visit()
now accepts{ failOnStatusCode: false }
which enables you to visit pages that respond with a non2xx
status code. This brings it into parity withcy.request()
. Fixes #421 and #574. - The contributing Readme’s have been updated and improved for each package. Fixes #995.
- Added utility methods
Cypress.platform
andCypress.arch
for returning the underlying OS information. Uses node’sos
module under the hood. Fixes #824 and #675.
Documentation Changes:
1.1.2
Released 11/26/2017
Bugfixes:
- Fixed a regression caused by
.type()
adhering tomaxlength
incorrectly. Special character sequences were not respected. Now.type()
works with special characters and implements a complete fix formaxlength
. In addition to it working, it now fires all applicable browser events without modifying the actual input value. Fixes #955. - Errors coming from plugins now display correctly in the Test Runner. Fixes #945.
Documentation Changes:
- Added ESLint, Docker, and TypeScript to Plugins
- Added recipe for TypeScript with Browserify
- Added recipe for TypeScript with Webpack
- Added recipe for Direct Controlling AngularJS
- Added recipe for E2E API Testing
- Added more video tutorials
- Improved displaying list of Tutorials, Recipes, Applications, and Docker examples
1.1.1
Released 11/20/2017
Bugfixes:
- Fixed a bug swallowing plugin errors due to undefined
reject
function. Fixes #934. -
.type()
now respects themaxlength
attribute and will not type beyond it. Fixes #928.
1.1.0
Released 11/19/2017
Summary:
- We have officially launched the new Plugins API interface. This adds a
cypress/plugins/index.js
file to new and existing projects. Using this file will enable you to modify the internals of Cypress running in the backgroundnode
process. This means you will be able to usenode
APIs that are executed outside of the browser. - We have currently added only one event for modifying the test file preprocessor, but this paves the way for adding many more event types. You can now modify every aspect of how files are sent to the browser.
- We have extracted the default Browserify preprocessor into its own package -
@cypress/browserify-preprocessor
. This is bundled with Cypress, but it is extracted so it can be used / modified by you to change the default options we pass to Browserify. Additionally, you can swap out this preprocessor for something else entirely.
Features:
- There is now a Plugins API interface. Partially addresses #684.
- We have added the first Plugin API event called:
file:preprocessor
. Fixes #580 and #581. - You can now customize the default Babe; configuration options for the Browserify preprocessor. Fixes #343 and #905.
- CoffeeScript 2 is supported via modifying the default options for the Browserify preprocessor. Fixes #663.
- You can swap out or extend the default preprocessor to do exotic things like compile ClojureScript into JavaScript. Fixes #533.
- We have created a
@cypress/webpack-preprocessor
preprocessor npm package for you webpack users (because we are nice ゚リノ). Fixes #676.
Bugfixes:
-
cy.contains(selector, regexp)
now works as intended. Fixes #801. - We no longer format fixtures in any capacity. This fixes a bug with improperly formatting fixtures in Windows. You should handle formatting fixtures yourself. Fixes #884 and #902.
-
cy.viewport()
resolves if only width or only height changes. Fixes #873. - Cypress now auto reloads when spec files are modified in Windows. Fixes #712.
Misc:
- There is a new
--global
option useful withcypress open
to force Cypress to open in global mode. This is helpful when you have multiple nested Cypress projects but only want to install Cypress once in the root project. Fixes #889. - The module API accepts
reporterOptions
as an object literal like it does for theenv
andconfig
properties. Fixes #899.
Documentation Changes:
- Created “Testing React TodoMVC” tutorials
- Created “Variables and Aliases” core concept
- Created “Conditional Testing” core concept
- Created “Plugins” guide
- Created “List of Plugins”
- Created “Writing a Plugin” API
- Created “Preprocessors API”
- Updated “Using Cypress FAQ”
- Updated “Best Practices”
1.0.3
Released 10/29/2017
Features:
- The Test Runner now enables you to collapse folders when displaying a list of specs. Fixes #760. Contributed by @metcorne.
Bugfixes
- The
onChange
event callback for React now works (again) oninput
typenumber
oremail
. Fixes #816 and #770. - Fixed error when recording and failing to parse the git commit message. Fixes #847 and #841.
- Using a single space on:
cy.type(' ')
now works. Fixes #807. Contributed by @tejasbubane. -
cy.spread()
can now be used on a collection of DOM elements. Fixes #735. Contributed by @verheyenkoen. - CLI shows help message when it is invoked with an unknown command like
$(npm bin)/cypress foo
. Fixes #641.
Misc:
- Enable passing
CYPRESS_RECORD_KEY
without using the CLI by invoking the binary directly. Fixes #820. - Cypress binaries can now be pointed to a staging environment with
CYPRESS_ENV=staging
. Fixes #813. - The Test Runner displays the scrollbar correctly when the update banner is displayed. Fixes #803.
- The branch name is now properly collected when recording in Buildkite CI. Fixes #777.
- You can install the Cypress binary from any URL or file path using the
CYPRESS_BINARY_VERSION
environment variable. Closes #701.
Documentation Changes:
- Created “Conditional Testing” core concept
- Created “Key Differences” core concept
- Updated “Best Practices”
- Updated “FAQ Usage”
1.0.2
Released 10/13/2017
Bugfixes:
-
cy.type
now correctly fires change events on React 16. Fixes #647. - Fixed some problems serializing objects during domain change caused by circular references. In this case
zone.js
was the culprit. Fixes #741. Contributed by @MariMax.
Misc:
-
cy.scrollTo
now logs its coordinates when options are used. Fixes #725. Contributed by @sirugh. - You can now use environment variables that have a
=
character as values. Fixes #620. Contributed by @HugoGiraudel. - There is now a new
videoUploadOnPasses
configuration option incypress.json
. Turning this off will only compress and upload videos on failures. This only affects projects which are setup to record to the Dashboard. Fixes #460. Contributed by @carlos-granados.
Documentation Changes:
1.0.1
Released 10/10/2017
Bugfixes:
- Prevent error during verification in the CLI on Linux / OSX. Also makes terminal colors work again. Fixes #717 and #718.
1.0.0
Released 10/09/2017
Summary:
-
1.0.0
marks our transition out of a private beta and into a public beta. We’ve lifted all the restrictions for using Cypress. It is now accessible to everyone. Until we are out of beta, the Dashboard Service will continue to be free. - We will continue to follow
semver
from this point on (and also a bit more rigorously). - Cypress is now open source! This project is licensed under the terms of the MIT License.
- We have a Contributing Guideline to help contributors get started as well as issues labeled
first-timers-only
for those wanting to contribute right away. - You can now use the Test Runner application without logging in. Some areas of the application still require logging in through GitHub, like the ‘Runs’ tab and viewing the project’s ‘Record Key’. The only places where login is required is when it interacts with our external servers. Naturally these places are optional and will not affect the local test writing + running experience.
- We’ve removed the requirement of filling out an early adopter form and approval for logging in with GitHub to Cypress.
- www.cypress.io has an all new design to help new visitors get started quickly and understand our future pricing more clearly.
- We are still updating the docs to reflect the
1.0.0
release.
Features:
- Windows is now supported. We have been running it successfully on EC2 and all of our example projects are also running in CI with AppVeyor. It is still super beta (we’re aware of a couple issues already) and we’re still updating our own infrastructure to manage and test it as comprehensively as we do OSX and Linux. We are only building a 32bit version of Windows, but will soon be building a 64bit as well. As of today the Windows binary is about 2x the size of what it will be. Unzipping takes a long time, we are sorry. Fixes #74 and #444.
Misc:
- Added the
Beta
flag everywhere (since we are still technically in beta). - Reduced the frequency the app checked for updates. Fixes #713.
- The CLI now sends
arch
parameter to the download server so we can build and serve multiple binaries for Windows + Linux.
Documentation Changes:
- Updated “Installing Cypress”
- Updated “Writing your First Test”
- Added a 10 minute Getting Started video that Andrew Van Slaars created.
0.20.3
Released 10/06/2017
- Improved verifying the binary for the first time after an
npm install
. Fixes #709.
0.20.2
Released 10/06/2017
Possibly Breaking Changes:
-
cy.exec()
now trims output by default. That means if you were using aneq
assertion the output will no longer have a trailing newline character\n
. It’s unlikely you are doing this, but it is possible you may need to update your assertions to remove this character. Fixes #697.
Bugfixes:
- Handle errors gracefully when Electron window has been closed before paint events happen. Fixes #705.
- Basic auth now works again. Fixes #573.
-
cy.exec()
now properly sources each time it is invoked instead of only once. Fixes #694.
Misc:
-
cypress open
now accepts the--project
flag which enables you to use a root level Cypress installation and point to multiple sub projects. Fixes #661. - Prevent newer versions of Chrome from prompting you to save passwords and suppressed other extension related popups for Windows. Fixes #704.
0.20.1
Released 09/17/2017
Features:
-
cypress run
now supports a--headed
option so the Electron browser will display instead of running headlessly. This matches what you can already do in the GUI. Fixes #657.
Bugfixes:
- Using Cypress on nested projects now correctly works. Fixes #635.
- Using
cy.type
on Angular 2 apps now works. We’re now firing thekey
property when typing. We’ve properly mapped all the special keys too. -
onBeforeLoad
now gets invoked when overridingcy.visit
. Fixes #656 and #640. - Using multiple
cy.visit
back to back which only change thehash
now properly wait for thehashchange
event to occur before moving on. Fixes #652. - CLI now displays the correct overridden
CYPRESS_BINARY_VERSION
on first open. Fixes #659. - Fixed the incorrectly spelled chainer
descendents
. It is now correctly spelled asdescendants
. Fixes #642. - The visibility algorithm has been considerably improved. Should fix most if not all visibility problems. We accounted for CSS transforms, translations, and added a new branch of logic for
position: fixed
elements which should be much more accurate. Fixes #631. - The CLI now treats
-h
and--help
andhelp
as valid commands. Fixes #645.
Misc:
- You can now pass an object literal as
config
when using Cypress as a node module. Fixes #639. - Passing
--reporter
can now reference an absolute path instead of just relative. Fixes #658. - The algorithm that ensures an element is not covered now calculates this at the center coordinates instead of the top left. This should yield more accurate results, be closer to the default expectations of users, and bypass fractional pixel problems we were having. Fixes #655.
- Improved crash reporting when the binary throws an uncaught error.
Documentation Changes:
0.20.0
Released 09/10/2017
Summary:
-
0.20.0
is our biggest technical release ever. It accounts for more than 2,000 commits. It’s full of breaking changes we wanted to land prior to having our public1.0.0
release. - You can now install Cypress as a real
npm
module, and evenrequire
it in your node files. - We rewrote the entire driver (we’ve all been there) and converted all 2,500+ tests to be run within Cypress itself.
CLI Changes:
- You now use
npm
to manage Cypress versions like every other dev dependency. - Running
npm install --save-dev cypress
will automatically download the CLI + binary. - There is no longer a separate
cypress install
step, but this command still exists if you want to reinstall the binary for whatever reason. - No need to use
cypress-cli
anymore to manage Cypress versions. You will need to uninstall thecypress-cli
by runningnpm uninstall -g cypress-cli
. - The
cypress
module can berequired
in your own node projects to programmatically control Cypress the same way you would from the command line. - We’ve updated the installation experience to account for running locally and in CI so it doesn’t generate a ton of logs in
stdout
. - The
CYPRESS_VERSION
environment variable is gone because now the version of the binary is controlled by the npm module version. If for some reason you want to download the binary of a different version you can use the newCYPRESS_BINARY_VERSION
environment variable - but you’ll get a warning message when the versions don’t match. - If you install cypress globally using
npm install -g cypress
we will warn you that you should check this in as adevDependency
but Cypress will continue to work in “global mode”. - Cypress now verifies it can run on your system prior to actually running. It’ll do this for each new version the first time you try to use it. Errors it receives from attempting to run will bubble up nicely, so you’ll get output for things like missing linux dependencies instead of absolutely nothing like before.
- We have better error handling and messaging around Xvfb failures.
- There is a new
–browser
option that lets you change the browser that runs from the command line. This works the same way as changing the browser in the GUI, with the exception that any browser other than the defaultelectron
browser will not record a video. This is solvable but requires more work. - Whenever you encounter errors in the CLI we’ll output helpful debugging information at the bottom of each error.
- You can use the new environment variable
DEBUG=cypress:cli
to see debugging output from the CLI.
Breaking Changes:
- We’ve removed the undocumented
cy.chain()
command. You should be able to safely remove this from your code. Fixes #456. - Updated
Cypress._
to use lodash instead of Underscore. Fixes #548. - If any of an element’s parent’s overflow is ‘hidden’, we now calculate if the element is outside of the boundaries of that parent element and validate visibility assertions accordingly. This may cause some tests that were previously passing to now accurately fail. Fixes #410.
-
.select()
should now look for the trimmed value inside of an<option></option>
. This may change the content argument required to select the option you intended in your.select()
command. Fixes #175. - When passing the option
{ force: true }
to.click()
and.type()
, we no longer attempt to scroll the element into view. We’ve also disabled the check that the element is in view before clicking or typing. Fixes #553 and #537. -
Cypress.Dom
has been renamed toCypress.dom
. -
Cypress.Log.command
has been renamed toCypress.log
. -
chai-jQuery
assertions no longer change the subject when usingprop
,attr
, andcss
with the 3rd argument (which acts as equality check). Fixes #605. - We now throw when a value other than
cy
is returned from a test or command function. Fixes #463. - Returning a promise in a custom command while also invoking cy commands now throws. Fixes #435.
-
cy.then()
will now only pass its subject through when its callback function returnsundefined
. Previous it would pass the subject onnull
values as well. -
cy.contains()
can no longer be chained on subjects which aren’twindow
,document
orelement
. This brings it into parity with the new custom command rules and makes it much less “magical”. It enforces you to use it in a much clearer way when querying the entire document. - Removed
Cypress.addParentCommand()
,Cypress.addChildCommand()
, andCypress.addDualCommand()
in favor of the new custom command interface.
Features:
-
chai-jQuery
assertions have improved error messaging, and have had their internal double assertions removed, and can now be made on raw DOM objects. Fixes #605. -
chai-jQuery
assertions now throw a nice error message when you’re asserting on a non DOM object. Fixes #604. - New
.trigger()
command. Useful for triggering arbitrary events. Fixes #406. - New
cy.scrollTo()
command. Useful for having a container scroll to a specific position. Fixes #497 & #313. - New
.scrollIntoView()
command. Useful for scrolling an element into view. Fixes #498 & #313 & #519. - Input ranges are now more easily testable using the new
.trigger()
command. See our new recipe for details on how. Fixes #287. - Testing drag and drop is now possible using the new
.trigger()
command. See our new recipe for details on how. Fixes #386. - Updated
.click()
command to accept more position arguments. Fixes #499. - Added support to
.type()
for inputs of typedate
,time
,month
, andweek
. Fixes #27. - You can now pass a browser option to
cypress run
as--browser <browser name>
. This enables you to run the same set of browsers when running from the CLI as when you’re running from the GUI. Fixes #462 and #531. -
cypress open
no longer opens a detached process by default. Insteadcypress open
now accepts a new flag--detached
, which replicates this behavior. Fixes #531. - We have all new docker examples you can check out.
- The
cypress
npm package now checks the currently installed version oninstall
andrun
and does not re-install Cypress if it is already installed. Fixes #396. - We’ve added a new
Cypress.Commands
interface to handle adding your own custom commands. Fixes #436. - You can now overwrite existing commands with
Cypress.Commands.overwrite
. - We removed an artificial delay that was being set in between commands. This means test commands now run faster.
- You can now disable Cypress global exception handlers for your application. Fixes #254
- Uncaught errors appearing in your spec files or support files are now properly caught, have the right exit code, and display correctly. Fixes #345
- Cypress will now scroll past multiple elements that cover up an element to be interacted with. It also now factors in elements with
position: sticky
. Fixes #571 and #565. - Cypress now scrolls all parent containers (not just
window
) when attempting to check an element’s actionability. Fixes #569. - Using Chai.js’s
assert
interface now works correctly in your specs. - Screenshots are now taken during each runnable that fails. Errors in tests will happen there. Errors in hooks will also happen there. Previously a screenshot would only happen after everything (including hooks) ran. Fixes #394
-
cy.screenshot()
now synchronizes its state with the reporter. This means you should see error messages (on the left side) on automatic screenshot errors. - Using mocha’s async
done
callback now works properly. - You can now programmatically intercept and potentially turn off uncaught application errors from failing your tests.
- You can now programmatically control whether you accept or cancel
window.confirm()
calls from your application.
Dependencies:
- Updated
Cypress.Promise
(which is Bluebird) from version2.9.25
to3.5.0
- Updated
chai
from version1.9.2
to3.5.0
- Updated
sinon
from version1.x
to3.2.0
- Updated
jQuery
from version2.1.4
to2.2.4
. - Removed
chai-jQuery
and rewrote it from scratch.
Deprecations:
- The
cypress-cli
npm package has been deprecated. Fixes #316. - The interface for writing custom commands has been deprecated. Please read our docs on the new custom commands interface. Fixes #436 and #465.
- There are no more global, in-app updates. Versioning should be primarily controlled via
npm
like every other package / dependency in your project. For users not usingnpm
you can manually download new versions of Cypress when they’re released.
Bugfixes:
- Fixed busted internal timers that caused random timeouts, proxy errors, incorrect delays, and long pauses when loading the GUI. Fixes #572.
-
cy.route()
now matches requests opened with lowercase methods. Fixes #607. - Fixed regression where multiple uses of
cy.server()
in abefore
hook was throwing an error. Fixes #80 and #510 and #595. - When editing
cypress.json
file, the dead browser page no longer appears. Fixes #492. -
.type()
should now work on inputs regardless of capitalization oftype
attribute. Fixes #550. - Fixed issues where
.type()
was not appending text properly. Fixes #503 and #568. - Fixed issue where
.type()
withtype="email"
inputs were throwing an error. Fixes #504. - Fixed issue where using
.type()
on an input with atype
defined in uppercase (input type="TEXT"
) would throw an error and not type. Fixes #550. - Fixed issue with
.clear()
andtype="number"
inputs. Fixes #490. - Fixed issue where
cy.exec()
was failing when running Cypress in docker. Fixes #517. - Cypress CLI no longer requires
git
to install. Fixes #124 - Improved the reporter’s responsive design so controls still show at narrower widths. Fixes #544.
- Commands text will no long cut off into ellipses when the Command Log is set to a wider width. Fixes #528.
- Fixed issue where setting
fixturesFolder
tofalse
would throw an error. Fixes #450. - Fixed issue where Cypress hanged due to Xvfb permissions. More intuitive output is given during install failures. Fixes #330.
- The checks used to determine an element’s actionability are now run synchronously. This solves some circumstances where the element could have moved or otherwise change between the checks. Fixes #570.
- Fixed issue where clipped elements with
overflow-y: hidden
were falsely passing as “visible”. Fixes #563. - When using
.select()
on a select with multiple options with the same value, we now properly setselectedIndex
andselectedOptions
on theselect
. Fixes #554. - Fixed issue where changing any spec file (renaming, adding, deleting) would remove the highlighted styling of the currently active spec file in the Test Runner. Fixes #547.
- We now get the absolute paths of styles to use when displaying snapshots. This will fix situations where some stylesheets were improperly referenced during the snapshot, so did not display styles correctly. Fixes #525.
- Fixed issue where commands would retry and potentially exceed their timeout values during page transitions. Fixes #594
- Fixed issue where server routes were lost after page load if not initiated by a
cy.visit()
command. Fixes #177 - Using mocha’s
done
callback now works correctly. We’ve improved mocha’s handling of uncaught exceptions and properly associate them to test failures. -
cy.viewport()
is now synchronized with the UI so that it does not resolve until the DOM has re-rendered using the dimensions. - “outer assertions” now are correctly retried by previous commands. Fixes #543.
- The example_spec from the kitchen-sink will never accidentally be seeded when running
cypress run
on a brand new project.
Misc:
- We now display a warning in the console when returning a promise from a test and also invoking a Promise or cy commands. Fixes #464.
- Reduced the number of internal Cypress network requests in the “Network Panel” of Dev Tools. Fixes #606.
- We’ve moved our entire codebase into one into a private “Monorepo”. This is in anticipation for going open source (making the GitHub repo public) and should make it easier for everyone to contribute to our code. Fixes #256.
- When element’s are not visible due to being covered by another element, the error message now says what element is covering what element. #611
- Improved the calculations to calculate an elements visibility. Additionally updated error messages to be clearer whenever an element isn’t considered visible. Fixes #613
- The “Can’t start server” error displayed in the Desktop-GUI no longer prevents you from interacting in the Desktop App. It now displays as a warning. Fixes #407.
-
cy.focused()
now automatically retries until the element exists in the DOM. This makes it behave the same ascy.get()
Fixes #564 and #409. - We now support per-project
state.json
. Fixes #512. - We can now handle multiple projects per server. Fixes #512.
- The Test Runner can now have projects added by being ‘dragged’ in. Fixes
. - The Test Runner update window now has messaging about
package.json
versioning. Fixes #513. - The Test Runner now accounts for cypress being installed per project as npm module. Fixes #500 and #514.
-
cypress install
-d
option. Fixes #389. - Exposing Cypress Binary should no longer be necessary when cypress is locally installed. Fixes #379.
- Added an ‘App Data’ option in the Desktop App that displays app data. Fixes #475.
- When
cy.spy()
orcy.stub()
are never called, the error now displays a clearer, grammatically correct error. Fixes #520. - Detection of installed browsers has been improved. Fixes #511.
- When commands are clicked on and logged into the console from the Command Log, they now display their ‘yield’ instead of ‘return’, since they really yield instead of return. #612
- The build process of the driver has been modernized. Fixes #429.
- XHR’s from your application are no longer forcefully aborted between tests.
- Better error handling when running commands outside of a test.
- URL changes from navigation events or hashchanges now display more accurately.
-
cy.go()
now snapshots before and after the navigation event. - Page load events no longer forcibly
null
out the current subject. This was very unexpected and difficult to debug. Now stale elements or other objects from previous pages are yielded to you. - Using an array of the same alias in a
cy.wait()
now yields you those XHR’s in the order they were requested. Previously it was based on when the responses were returned. - Returning
null
from a.then()
will now change the subject to that. Previously returningnull
would not cause subject changes. - We now no longer remove spies, stubs, or routes at the end of the very last test. This enables you to continue to manually use your app and have Cypress continue to instrument it.
- Updated a few things to more aggressively cause GC.
- Onboarding dialogs will never show up again once they are dismissed. Fixes #522.
-
window.alert()
andwindow.confirm()
now generate a page event in the Command Log (including the message). -
cy.spy()
andcy.stub()
now have a.log(bool)
method to disable their calls from generating a Command Log. Useful when your spies or stubs are called an excessive number of times. - Improved command subject validation error messages.
- Improved the element detachment error messages (when you try to interact with an element that’s become stale / detached from the document).
- We finally have partial iframe support. You can at least now
cy.wrap()
iframe elements and interact with them using Cypress commands. More work needs to be done to “switch into” and back “out of” iframes. But we’re getting there. - Scaffolding new projects no longer generates a
default.js
file. - Scaffolded
index.js
andcommands.js
have had their content updated to point to the custom commands API. - You can now call
.focus()
and.blur()
oncy.window()
. - The
CYPRESS_DEBUG
env option has been removed in favor of thedebug
module andDEBUG=cypress:*
usage. - Attempting to run
cypress run
on a project without acypress.json
now errors instead of scaffolding and running the kitchen sink.
Documentation Changes:
Note: we are still updating all of the docs to reflect all the 0.20.0 changes.
- New “Catalog of Events”
- New “Cypress.Commands”
- New “Cypress.log”
- New “.trigger()”
- New “cy.scrollTo()”
- New “.scrollIntoView()”
- Updated “Installing Cypress”
- Updated “Writing Your First Test”
- Updated “Testing Your App”
- Updated “Command Line”
- Updated “Debugging”
- Updated “Assertions”
- Updated “Interacting with Elements”
0.19.4
Released 06/18/2017
Bugfixes:
Fixed .type()
not firing input
event for React on versions 15.6.x. Fixes #536.
0.19.3
Released 06/14/2017
Bugfixes:
- Server’s that send
Content-Encoding: br
no longer cause Cypress to fail due to incorrect decoding. Cypress now strips encodings it cannot accept. Fixes #535.
0.19.2
Released 04/16/2017
Features:
- You can now run your tests in the Electron browser that comes built with Cypress. You will see it as an option in the browser dropdown. This is the same browser that Cypress uses when running
cypress run
. This is useful for debugging issues that only occur during headless runs. Addresses #452. - New traversal commands
.nextAll()
,.nextUntil()
,.parentsUntil()
,.prevAll()
, and.prevUntil()
have been added. Addresses #432.
Bugfixes:
- An error is now thrown if an
undefined
value is mistakenly passed intocy.wait()
. Previously, it would set the command timeout to an unimaginably large number of ms. Fixes #332 - Fixed issue where the contents of
state.json
were emptied, which would cause a crash and loss of state information. Fixes #473 and #474. - We no longer write the chrome extension within
node_modules
, and instead write this to the proper OS specificappData
folder. Fixes #245 and #290.
Misc:
- Error handling for invalid arguments passed to
cy.wait()
have been improved and will now suggest valid arguments that are acceptable. - Browsers in the browser dropdown now have colored icons, which help visually distinguish the variants of Chrome.
- Increased timeout for browser to make a connection when running during
cypress run
from 10 seconds to 30 seconds. - Internally refactored how browsers are added and spawned in preparation of us adding cross browser support.
- Switching specs in the GUI now closes the browser and respawns it and refocuses it.
0.19.1
Released 03/09/2017
Features:
- Added
Cypress.version
property. Fixes #404. - Selecting
<option>
inside<optgroup>
now works with.select()
. Fixes #367.
Bugfixes:
-
EMFILE
errors have been fixed. These were being caused due toulimit
being too low on your OS. This should fix the file watching problems people were having. Essentially we just replacedfs
withgraceful-fs
and crossed our fingers this works. (It did on our machines). Fixes #369. - Now you can select the error text in the GUI. Fixes #344.
- Cypress now correctly re-bundles files even when
watchForFileChanges
is set tofalse
. Fixes #446 and #347. - Fixed file watching when changing the
integrationFolder
to something other than the default value. Fixes #438. -
.select()
now works on options that have the same value. Fixes #441. - Cypress no longer crashes when you click links in the on-boarding screen called “To help you get started…”. Fixes #227.
- The
example_spec.js
file that gets seeded on a new project no longer fails oncy.readFile()
. Fixes #414.
Misc:
- We now preserve the Test Runner’s position and sizing after it’s closed + reopened. Fixes #443.
- We now ignore watching
node_modules
,bower_components
and a few other folders to reduce the number of watched files. Fixes #437.
0.19.0
Released 02/11/2017
Notes:
- We have updated all of the docs related to these changes. The CI Docs got a much needed facelift.
- There is a new docs section related to the Dashboard and the new features.
Overview:
- We have officially released our Dashboard which is our service that will display recorded runs.
- This service has now been fully integrated into the Desktop Application. There is a new on-boarding process that helps you setup projects for recording.
Breaking Changes:
- We have done our very best to create as little breaking changes as possible.
- You will need to download a new cypress-cli - version
0.13.1
. - Older CLI versions will continue to work on
0.19.0
except for thecypress open
command - and will we print a warning to nudge you to upgrade. - Newer CLI versions will not work on versions of Cypress <
0.19.0
(but we don’t know why this would ever even happen).
Features:
- There is a new Dashboard service that displays your recorded runs.
- The Dashboard enables you to view your recorded runs, manage projects, create organizations, invite users and set permissions.
- Projects are either public with their runs being publicly viewable by anyone, or private which restricts their access to only users you’ve invited. All existing projects were set to private by default.
- When you invite users (from the Dashboard) we will automatically whitelist them. This means you can invite all of your teammates (or anyone else). They can start using Cypress without talking to us.
- We now list all of the recorded runs directly in the Test Runner under a new
Runs
tab. Fixes #236. - Your list of projects in the Test Runner now displays their last recorded run status - passing, failing, pending, running, etc.
- We’ve changed the “Config” tab to now be called “Settings”. We added two new sections to the “Settings” tab which displays your
projectId
and your Record Key. These sections do a much better job explaining what these are and how you use them. - You no longer have to use
cypress get:key
to get your Record Key. We now display this in your “Settings” tab and also in the Dashboard. - Projects will no longer automatically acquire a
projectId
when being added. There is now a very explicit opt-in process where you setup your project to record. This should make it much clearer what’s going on behind the scenes. -
cypress run
now behaves likescypress ci
previously did and downloads + installs Cypress if it’s not already installed. -
cypress ci
now works in OSX, and also works in Linux in Desktop flavors (like Ubuntu).
Misc:
-
cypress run
will now download and install Cypress if it is not already installed. - We renamed
CYPRESS_CI_KEY
TOCYPRESS_RECORD_KEY
. This makes it clearer what this key actually does - and the fact that it can be run anywhere irrespective of CI. We still look for the old named key but will print a warning if we detect it. - We print a warning when using an older CLI tool version. Fixes #424.
- We’ve improved many of the error messages related to recording runs. Fixes #423.
-
cypress ci
has been deprecated. You now usecypress run –record –key <record_key>
. The key you used to pass tocypress ci
is the same key. We’ve consolidated these commands into justcypress run
which makes it simpler and clearer. Their only difference is that passing--record
tocypress run
will record the build to our Dashboard. Fixes #417.
0.18.8
Released 02/05/2017
Overview:
- We have officially implemented our Sinon.JS integration: adding
cy.stub()
,cy.spy()
,cy.clock()
, andcy.tick()
. We’ve matched Sinon’s APIs and addedsinon-as-promised
andchai-sinon
. In addition we’ve fixed Sinon performance issues, and improved the display of assertion passes and failures. - These new APIs will work well in both
unit
tests andintegration
tests.
Features:
- You can now use
cy.stub()
andcy.spy()
synchronously. These both match the Sinon API identically. We will displaystub/spy
calls in the Command Log and provide the call count, arguments, context, and return values when you click on the log. Stubs are automatically reset between tests. Fixes #377. - We’ve added our own special aliasing flavor to
cy.stub()
andcy.spy()
. You can use the.as()
command and we will associate spy and stub invocations (the same way we do with XHR aliasing and route matching). - We’ve added
cy.clock()
andcy.tick()
which are both asynchronous methods to modify timers in your application under test. We automatically apply clock (even if you invoke it before your firstcy.visit()
) and will automatically reapply it after page load.cy.tick()
will enable you to control the amount of time you want passed in your application. This is great for controlling throttled or debounced functions. -
sinon-as-promised
is automatically applied under the hood which extends Sinon and provides the.resolves(...)
and.rejects(...)
APIs which makes it easy to stub promise returning functions. - We support and display multiple sub spies when using Sinon’s
.withArgs(...)
function.
Misc:
- We’ve enhanced
chai-sinon
by improving the output during passes or failures. Fixes #31. - We’ve ripped out Sinon’s argument serialization in favor of our own.
- We no longer send Sinon to the remote application under test. In other words, you’ll no longer see
sinon.js
being sent as a network request. - Deprecated the undocumented
cy.agents
function, but it will continue to work and will be officially removed later.
0.18.7
Released 01/30/2017
Bugfixes:
- Fixed regression in
0.18.6
that caused Cypress to fail when switching spec files whenbaseUrl
was set incypress.json
. Fixes #403.
0.18.6
Released 01/29/2017
Features:
- We now launch Cypress tests directly to the
baseUrl
to avoid an initial page refresh when encountering the firstcy.visit()
command. This should help tests run faster. Fixes #382.
Bugfixes:
- Uninstalling the last used browser no longer causes the Test Runner to error and hang. Fixes #371.
- Fixed issue where
stdout
would not be displayed on a completedcypress ci
run. Fixes #398. - Fixed a longstanding issue in Cypress where logging in from another computer would kill the session on all other computers, and prevent you from accessing
cypress get:key
(amongst other things). Fixes #400.
Misc:
- We now validate all of the configuration options set in
cypress.json
to ensure it has valid types. Fixes #399. - We now validate that
baseUrl
is accessible prior to running tests. This prevents a common situation where you may forget to boot your web server and have instantly failing tests. Fixes #383. - We now show the entire scaffolded tree of files when adding a brand new project. Fixes #401.
- We display errors coming from
babel
with more helpful information now. - Changed the Test Runner to use
JWT
for authorization. You will have to log in again.
0.18.5
Released 01/08/2017
Features:
- You can now disable
videoCompression
by passingfalse
incypress.json
or env variables. In very long runs and on CPU throttled instances compression can take a considerable amount of time, possibly as much as 50% of the time spent running actual tests. Fixes #372.
Misc:
- Improved performance when running
cypress run
by caching the last bundled spec. This prevents having the same spec file rebundled each timecy.visit()
caused a full page navigation. You should see a moderate improvement in test run time. Fixes #370. - We are now capturing
stdout
and several other properties for use + display in our Dashboard oncypress ci
runs. - Enable
cy.fixture()
to send an encoding for images other than forcing the default encoding ofbase64
. Fixes #373. - Enable
cy.route()
to pass anencoding
parameter when usingfx:fixture
syntax. Fixes #374.
0.18.4
Released 12/28/2016
Bugfixes:
- Prevent
cy.url()
from accessing the URL during transition phase and throwing an error. Fixes #356. - Stubbed functions now serialize correctly when switching domains on a
cy.visit()
. Fixes #354. - Fixed a handful of scenarios and edge cases where cookies were not properly synchronized between external requests and the browser. This led to situations where cookies were either duplicated on requests, or were not sent. Fixes #357 and #361 and #362.
Misc:
-
cy.request()
now favorsbaseUrl
config over remote origin when you do not pass a fully qualified URL. Fixes #360.
0.18.3
Released 12/18/2016
Features:
- There is now a
cy.log()
command for displaying an arbitrary message and args. Useful for providing context while testing and debugging long tests. Fixes #342.
Bugfixes:
-
cy.title()
now uses thedocument.title
property as opposed to querying for<title>
elements in the<head>
. Fixes #351 and #331. - We now exit correctly (with status of 1) in the case of headless renderer crashes. Additionally we capture these errors properly, explain what happened, and link to external error document to suggest fixes. Fixes #270 and #348.
Misc:
- Improved headless performance, and added optimizations for early and often GC.
0.18.2
Released 12/15/2016
Bugfixes:
- Under the hood
cy.visit()
now sets anAccept: text/html,*/*
request header to prevent some web servers from sending back404
in the case where they required this header. Only a small % of servers would ever do this, butwebpack-dev-server
was one of them. Fixes #309. -
cy.request()
now sends anAccept: */*
request header by default too. Fixes #338.
Misc:
-
cy.request()
now includes more debugging information (related to headers) in the error output. Fixes #341. - When
cy.request()
times out, we now output much better error messages including information about the request sent. Fixes #340.
0.18.1
Released 12/11/2016
Notes:
- There is a new recipe showcasing these new features.
- We are adding several other recipes to show examples of all the ways you can use
cy.request()
to improve your tests.
Features:
-
cy.request()
can now have its automatic redirect following turned off by passing{followRedirect: false}
. Fixes #308. -
cy.request()
now has aqs
option that automatically appends query params to theurl
property. Fixes #321. -
cy.request()
now follows redirects exactly like a real browser. Previously if youPOST
ed to an endpoint and it redirected to aGET
thency.request()
would not follow it due to themethod
changing. It now follows method changing redirects by default. Fixes #322. -
cy.request()
now accepts theform
option which will convert thebody
values to urlencoded content and automatically set thex-www-form-urlencoded
header. This means you can now usecy.request()
to bypass your UI and login with standard form values. Fixes #319. - When
cy.request()
fails, it now outputs the full request / response information. This behaves more similar tocy.visit()
failures. Fixes #324. -
cy.request()
now prints all of the underlying HTTP request / response information into the Dev Tools’ console (when clicking on the Command Log). This means that you will see everything you would normally see from theNetwork
tab as if the request were made from the browser. We even print redirect information. Fixes #325.
Bugfixes:
- Cypress’ internal
babel
will no longer attempt to load your project’s.babelrc
. This helps avoid potential version conflicts. Fixes #312. - We no longer watch the
supportFile
while runningcypress run
. Fixes #329. -
watchForFileChanges
is now correctly respected in regards to watching all files, including thesupportFile
. Fixes #336. - There is no longer an error when scaffolding a new Cypress project. Fixes #326.
- The Runner UI no longer appears to be “running” when there is a spec bundle error in the
supportFile
. - Cypress now correctly exits during
cypress run
inlinux
when the browser fails to connect. Fixes #333. - Cypress now correctly exits during
cypress run
inlinux
when there is a spec bundle error. Fixes #337. - Cypress now retries up to 3 times for the browser to connect during
cypress run
. The warning / error messages were also updated to be clearer. Partially addresses #334.
Misc:
- Deprecated
failOnStatus
property forcy.request()
and renamed tofailOnStatusCode
. Fixes #323. - Removed the
cookies
option fromcy.request()
because cookies are now always get/set on requests. This option really never made any sense to have. Fixes #320. - Better data reporting when recording builds in CI.
- We now collect “global” errors that may prevent any tests from running. We will be displaying these in our future CI platform.
0.18.0
Released 11/27/2016
Notes:
- We’ve created a new example recipes repo to show you common testing scenarios including how to use the new module support.
Summary:
- We’ve added automatic ES2015+, module, JSX, and CJSX support to all test files. This means you can use
require
,import
, orexport
declarations to load other files. You can also use this to import your own application specific JavaScript modules and write unit tests for them. More of these details are yet to come. See this issue. - You can now use your regularly installed
node_modules
in your project to do things like utilizinglodash
for utility functions or extendingchai
with assertion plugins. - Because we’re now processing the spec files prior to handing them off to the browser, this means we will display problems like syntax errors when something in the processing goes wrong. Additionally, we print these out during
cypress run
, so you’re not stuck wondering what went wrong.
Breaking Changes:
- Previously, we auto-magically included all files within
cypress/support
. This has now gone away and we’ve simplified this to automatically including a singlecypress/support/index.js
file. That single file acts as the entry point meaning you shouldimport
orrequire
the other support files you’d like to include. Although this is still “automatic” it’s much less magical and we’ll be updating all of our docs to reflect this. The purpose ofcypress/support
hasn’t really changed, just the implementation of it has. We will automatically seed acypress/support/index.js
file for you (even on existing projects). The file location ofcypress/support/index.js
can be changed with the newsupportFile
option in yourcypress.json
. This feature can also be turned off by specifyingsupportFile: false
.
Features:
- We now support ES2015+, modules, and JSX in all spec files. Fixes #246.
- Spec files may now be written as
.js
,.jsx
,.coffee
, orcjsx
files. - Test files with JS syntax errors are now handled and we provide a GUI that points to the exact line/column number. Additionally we print these out during
cypress run
and exit the process withcode 1
. Fixes #293.
Misc:
- We improved the logic around when and if we scaffold files on a new project. We’re much smarter about this and not generating these forcibly every time. Fixes #285.
- Simplified handling of support files and made them less “magical”. Fixes #286.
- Renamed
supportFolder
tosupportFile
incypress.json
. We will automatically rename yourcypress.json
if this property was present on update.
0.17.12
Released 11/21/2016
Bugfixes:
- You no longer have to log in again after updating. Fixes #305.
- Updating in app now works again. Sorry about that. Fixes #304.
- Headless frame rate is now correctly set to
20
instead of resetting back to60
. Fixes #303. - We now automatically drop frames that the CPU cannot keep up with while video recording during
cypress run
. Previously we would buffer all frames in memory and it was possible to exhaust all memory due to the way that streaming backpressure works. Fixes #302. - Fixed an edge case in the
driver
that could lead to memory leaks. This happened when Command Logs updated from previously run tests. Normally, in headless mode, we automatically remove references to purge memory after each test, but when logs were updated after this, their references were merged back in again and held onto forever. If you were seeing long Cypress runs die or eventually halt, this was likely the cause. We did extensive memory regression analysis on Cypress and could not find any more memory leaks. Fixes #301.
Misc:
- Improved
cypress run
andcypress ci
headless output. Fixes #306. - Improved performance by preventing
snapshots
from being taken during headless runs.
0.17.11
Released 11/16/2016
Roadmap:
- The changes in version
0.17.11
below are in preparation for Cypress¬タル platform service: a portal where screenshots, videos, config, and logs of your builds are accessible.
Overview:
-
cypress ci
now uploads build assets to our servers after a test run completes. Additionally, it tracks theconfig
settings used during the build and tracks each individual test failure. - If you do not want these assets to be tracked by Cypress, you need to switch to using
cypress run
. We will happily remove any build assets that are accidentally uploaded to us during the update transition.
Features:
- We now record videos during a headless run with both
cypress ci
andcypress run
. Fixes #229. - After completing
cypress ci
, we now upload build assets (such asscreenshots
andvideos
) to be used in our upcoming admin interface. This will enable you to review assets without having to touch your CI server. Fixes #292.
Misc:
- We’ve redesigned the headless run
stdout
to give you more details of the run, the stats after the run, what screenshots were taken, the video that was recorded, compression settings for the video, uploading asset progress, etc. - Screenshot names now include their parent titles, and invalid file system characters are scrubbed. Fixes #297.
- We no longer artificially restrict the environment
cypress ci
can run in. It can now run anywhere. Fixes #296. - We removed scaffolding any directories on a new project (during
cypress run
). Fixes #295. -
cypress run
no longer prompts the user for any kind of interaction, thus enabling you to use this in CI if you choose to do so. Fixes #294. - There is a new configuration property called:
(This was changed totrashAssetsBeforeHeadlessRuns
trashAssetsBeforeRuns
in3.0.0
) that is set totrue
by default and will automatically clear out screenshots + videos folders before each run. These files are not deleted, they are just moved to your trash. - There are several new configuration properties for video recording:
videoRecording
,videoCompression
, andvideosFolder
.
0.17.10
Released 11/07/2016
Bugfixes:
- Fixed switching between two different spec files from the desktop app causing
document.domain
to be wrong. Fixes #276. - Fixed inserting the string
null
intocy.request()
urls when providing abaseUrl
incypress.json
while origin could not be determined. Fixes #274. - Fixed incorrect error message on reverse visibility assertions. Fixes #275.
Misc:
- We’ve improved the way we inject content into
<html>
responses by filtering the underlying HTTP request headers. We no longer inject content into templates which were loaded via XHR. Fixes #257 and #288.
0.17.9
Released 10/22/2016
Bugfixes:
- Cypress now applies cookies to the browser which were cleared between redirects. Fixes #224.
- Snapshots now work even when
<html>
tag has invalid attributes. Fixes #271. - Cypress no longer crashes on initial
cy.visit()
when the 3rd party web server never ends the response. Fixes #272.
Misc:
- Changed default
responseTimeout
from20000
to30000
. - Changed default
pageLoadTimeout
from30000
to60000
. - The internal Cypress proxy now forcibly responds to requests taking longer than
responseTimeout
. Currently this sends backtext/html
with theETIMEDOUT
error, but this likely needs to be configurable. The reason we are now forcibly applying timeouts is to preventsocket pooling exhaustion
where tests are running and a 3rd party server never responds to the request.
0.17.8
Released 10/13/2016
Bugfixes:
- Fixed
opener of undefined
errors due topage load
events causing snapshots prior to theload
event of the remote application. Thanks to everyone who helped pitched in on this one! Fixes #258. - Cypress now correctly sets cookies with
expirationDate
in the past. Chrome did not handle these cookies as documented and our code did not take this into account. We also added a lot moree2e
tests around this behavior. Fixes #266. - We are now taking additional precautions to prevent Cypress from trashing the wrong folder during an upgrade (with an open project). This was actually fixed in
0.17.7
but the problem was is that during an update, the new version (which was fixed) was still being passed the wrong arguments from the older (broken) application. We’ve now upgraded0.17.8
to detect this, and just use the expected default install location of Cypress. If you’re concerned, just close your currently open project before updating. Fixes #265.
Misc:
- When an in app update fails in
linux
we now provide instructions on how to manually update Cypress. - We now properly take the
maxAge
cookie flag into account and give it preference over theexpires
flag as per the cookie spec.
0.17.7
Released 10/12/2016
Features:
- There is now a new
chromeWebSecurity
option you can set incypress.json
to turn off Chrome’s Web Security features. We’ve written a brand new reference that details why and how you could use this. Cypress Web Security. This option can be used for accessingcross origin
<iframes>
or if your application needs to test navigation across super domains. Fixes #262.
Bugfixes:
- We now capture
cross origin
errors correctly instead of these showing asUncaught DOMExceptions
in the console. Fixes #261. - We no longer trash the wrong folder on OSX in-app updates (when a project is open). Sorry about this! Fixes #260.
-
cy.visit()
urls with domain-like segments (which weren’t actually the domain) no longer cause Cypress to think you’re trying to navigate to a different superdomain. Fixes #255.
0.17.6
Released 10/04/2016
Features:
- Snapshots will now be pinned when clicking on a command in the Command Log. This enables you to inspect the state of the DOM when the snapshot was taken. We’ve given you a new series of controls for turning off the element highlighting and hitboxes. Additionally we’ve given you the ability to manually click through each named snapshot when there are multiple states (like before and after). Fixes #247.
Bugfixes:
- Fixed a regression where tests that failed outside of a hook would incorrectly indicate themselves as a
before each
hook. In addition, in the defaultspec
, reporter will now display the test name when a hook was the source of failure. Fixes #253. - Fixed a deployment bug in the
core-desktop-gui
. - We now prevent
cy.visit()
from accidentally snapshotting twice.
Misc:
-
cy.request()
andcy.visit()
now correctly sendUser-Agent
headers based on the current open browsing session. Fixes #230.
0.17.5
Released 10/02/2016
Features:
- We’ve added
JUnit
as a valid built-in reporters. Fixes #178. - You can now add or write your own custom reporters. This means you can
npm install xyz-mocha-reporter
and we’ll automatically correctlyrequire
that package. Alternatively you can write your ownxyz-custom_reporter.js
file. Fixes #231. - The
reporter
can now be resized. We persist this state locally so it should “stick” between browser launches / app restarts. Fixes #204. - Cypress now “remembers” the last browser you had open and will suggest opening that whenever a project is opened. Addresses #193.
- Instead of seeing
Script error.
- cross origins script errors are now handled specially and we throw a very long and exciting error explaining what just happened. Fixes #241. - When uncaught errors are thrown in hooks we now indicate Mocha’s behavior as part of the error - that it is skipping the remaining tests in the current suite. Fixes #240.
Bugfixes:
- The reporter now more intelligently scrolls to prevent commands from being cut off. Useful in screenshots / video recording. Fixes #228.
- We’ve improved the logic of how snapshots are restored so that it does not break the CSS when there were full page navigations in the test and the CSS changed. Fixes #223.
- Iframes are now correctly handled when we restore snapshots. Previously, we removed iframes which would change the page layout and the hitboxes’ coordinates we drew were wrong. Now we insert iframe placeholders that prevent the page layout from changing. Fixes #234.
- Snapshot hitboxes no longer incorrectly draw for elements that are hidden. Fixes #251.
- Fixed a bug that caused commands to time out on subsequent tests whenever there was an uncaught error + an assertion conflict. Fixes #238.
- Fixed an edge case where assertions would incorrectly associate to a previously run assertion. Fixes #252.
- Cypress commands now correctly execute in
after
andafterEach
hooks on a failed test. Previously they would only run on passing tests. Fixes #203.
Misc:
- We’ve bypassed Mocha’s default uncaught error handling and replaced it with something much better - actually using the thrown error instances instead of creating a new arbitrary one. This means you’ll see better stack traces on uncaught errors. Fixes #193.
- We’ve bypassed Mocha’s default uncaught error handling in a
hook
. Normally this immediately ends the run. Instead we are skipping the remaining tests in the current suite. This prevents skipping potentially dozens or hundreds of tests downstream that are typically unrelated to the hook failure. - We’ve updated
cypress-cli
package to0.12.0
. You will need to download this new CLI version if you want to pass--reporter-options
. - Bumped the internal version of
mocha
from2.2.1
to2.4.5
.
0.17.4
Released 09/12/2016
Breaking Changes:
- Using subsequent
cy.visit()
‘s in the same test will not necessarily force a full page refresh. If all that changed was the hash of a url, then the hash changes will take affect without a full page refresh. This matches the behavior of a real browser. Previouslycy.visit()
always forced a full page refresh and this was not correct.
Features:
- Using
cy.visit()
now acts exactly how modifying the URL in a real browser works. This means that if you visit a url with a hash in it, instead of forcing a full page refresh, it will now modify the hash route as if you had manually changed it. This more accurately reflects real user behavior. Previously this was impossible to do with Cypress other than manually alteringwindow.location.hash
.
Bugfixes:
- Fixed a regression in
0.17.2
which caused separate tests that were visiting the same URL not to actually visit the new URL and eventually time out. We’ve updated some of our internal QA processes around this because we rarely have regressions and they are a pretty big deal. Fixes #225. - Fixed displaying
(null)
contentType when acy.visit()
returned a404
status code. We now only displaycontentType
when one exists.
0.17.3
Released 09/11/2016
Features:
- When
visible
assertions such asshould('be.visible')
fail we now print the reason Cypress thought the element was invisible. Matches what Cypress prints out when attempting to interact with invisible elements. Fixes #221.
Bugfixes:
- Prevent
Host
header from having its port appended when request was for port80
or443
which lead to 3rd party reverse proxy problems such as withzeit.co
hosting. Fixes #222. - Send valid http response errors, and display new lines correctly. Fixes #218.
- Correctly inject on
5xx
http response codes. Fixes #217. - Correctly inject on
4xx
and other bad http response codes when using Cypress as the file server. Fixes #219. - Correctly inject on
gzip
errors from 3rd party servers doing unintended things. Fixes #220.
0.17.2
Released 09/06/2016
Notes:
- After this update if you are seeing
<iframe>
origin errors please let us know by opening an issue. We will screen-share with you to diagnose the issue. We’re no longer aware of any situation where this should happen, so if you’re experiencing these bugs, please help us track them down.
Features:
- Attempting to
cy.visit()
a nontext/html
resource will now throw a specific error message instead of bombing on page injection with an<iframe
> origin error. You have to visit actualhtml
, you cannot visit something like a.json
or.png
. If you’re wanting to visit an API route on your back end that does something like set cookies (thus avoiding loading your UI) you can just usecy.request()
for this since it will now automatically get and set cookies under the hood. Fixes #211.
Bugfixes:
- Fixed a regression in
0.17.1
that was incorrectly settingCache
headers. This could cause a situation where you received an<iframe>
origin error. Additionally we now setNo-Cache
headers whenever we inject content, but otherwise respect the headers coming from web servers. When using Cypress as the file server, we setetags
but prevent caching. - Most likely fixed a bug that was crashing Cypress due to
Cannot set headers after they've been sent
. We were unable to write a test for this since we could not recreate the error, but analyzed how it may happen and fixed the code there. Open an issue if you see this error, it will be obvious since Cypress will literally crash. - We stopped minifying
vendor.js
(for real this time). More optimizations to come around this. - Prevented accidentally setting
domain
cookies when they were reallyhostOnly
cookies, thus duplicating the number of cookies sent on requests. Kudos to @bahmutov for finding this one. Fixes #207. - Fixed some edge cases in
cypress-core-extension
where it threw errors when attempting toexecuteScript
on a tab withabout:blank
orchrome://
urls. - We’ve fixed some underlying issues with
cy.go()
duringcypress run
. It always worked fine in real Chrome. Previously there were some situations where it would not navigate forward / back correctly.
Misc:
- No longer force
cy.visit()
to navigate toabout:blank
prior to navigating to the real url. Fixes #208. -
cy.writeFile()
can now accept an empty string. Fixes #206. - Improved error messages for
cy.readFile()
andcy.writeFile()
. - The full file path is now included in console output for
cy.readFile()
andcy.writeFile()
. - The Kitchen Sink and
example_spec.js
have been updated to reflect the newest changes and features of0.17.1
.
0.17.1
Released 08/31/2016
Features:
- You can now pass keyboard modifiers such as
ctrl
,cmd
,shift
, andalt
to.type()
. In addition we’ve added support for not “releasing” these keys so they can affect other actions such as.click()
. Addresses #196. - You can now type into the
<body>
ordocument
as opposed to previously having to target a valid focusable element. This is useful in situations where you’re testing keyboard shortcuts and do not want to target a specific element. Addresses #150. - There is a new command
cy.readFile()
that reads files on your file system and changes the subject to the contents. Addresses #179. - There is a new command
cy.writeFile()
that creates and/or writes contents to files on your file system. Addresses #179.
Bugfixes:
-
defaultCommandTimeout
now works correctly. The driver was still referencing the oldcommandTimeout
value. - The
__cypress.initial
cookie should now be removed during anycy.visit()
, which should fix some edge cases with the proxy accidentally injecting content when it shouldn’t. We also added a ton more e2e tests covering these edge cases and other behavior. - The proxy now restricts its injection to only
Content-Type: text/html
headers so it will not accidentally inject into the wrong responses.
Misc:
- All
cy.fixture()
extensions are now supported and Cypress will no longer throw on extensions it doesn’t recognize. For known fixture extensions we’ll continue to apply a defaultencoding
and for everything else it will default toutf8
. Fixes #200. -
cy.fixture()
now acceptsencoding
as a 2nd optional argument. - We now display a keyboard ‘modifiers’ column when clicking on a
.type()
in the Command Log.
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 on HTTPS 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 of HTTP 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 acy.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 usecy.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 a
4xx
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
todefaultCommandTimeout
. 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.16.5
Released 07/31/2016
Bugfixes:
- Force exit codes that are
null
to0
. Fixes #184.
0.16.4
Released 06/17/2016
Bugfixes:
- Fixed regression caused by
0.16.2
where a failedcy.contains()
would not be canceled and would continue to run and display failed assertions in between test runs (without a full page refresh). Fixes #174.
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 usingregex
. 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 atabindex
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 ofglob
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 aurlMatchingOptions
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.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 settingscreenshotOnHeadlessFailure
tofalse
in your configuration. - Added new
screenshotsFolder
configuration option with default ofcypress/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 theresponse
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 additionalstderr
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.
0.16.1
Released 05/22/2016
Features:
-
Cypress.Cookies.debug()
now works again. Additionally it provides much more feedback than it used to. -
Cypress.Cookies.debug(true, {verbose: false})
option has been added to remove verbose cookie object logging.
Bugfixes:
- Copy / Paste now works when logging in on OSX. Fixes #145.
- Grammar: ‘Login -> Log in’. Fixes #146.
- Cypress now uses the body instead of headers to send external requests. Fixes #148.
- When
.then()
throws this no longer prevents the next test from issuing any commands. Fixes #149.
Misc:
0.16.0
Released 05/17/2016
Notes:
- Updating through the Desktop App in Linux does not work. To update please run
cypress install
from the command line. - We are still updating the docs to reflect all of these changes.
- All users must LOG IN AGAIN and re-add their projects. Sorry, we’ve changed the way we store local data.
Overview:
-
0.16.0
marks a significant change for Cypress. Before this we only issued commands using regular JavaScript and coordinated these with the back end server which is running. As of0.16.0
we are now tapping into the underlying browser automation libraries which enable us to exceed the limitations of the JavaScript sandbox. This means we have total control over the browser for more powerful automation tooling. The downside is that we have only implemented these APIs for Chrome, and therefore running on multiple browsers will no longer work. This is a temporary setback as we’ll be adding driver support for all of the other browsers over a period of time. You can read more about our browser management here.
Breaking Changes:
- Running tests in Cypress now requires either Chrome, Chromium, or Canary to be installed on your OS environment. We intend to expand support for more browsers in the future, but for now, only these 3 are supported.
- Removed support for
Cypress.Cookies.get
,Cypress.Cookies.set
andCypress.Cookies.remove
. - Changed return of
cy.getCookies()
to return an array of cookies, each with properties include name, value, etc. - Changed return of
cy.clearCookies()
to return null (previously was returning Cookie that was cleared). -
Cypress.Cookies.debug()
has been temporarily disabled and will be re-enabled later. - Browsers are spawned in a Cypress specific profile so that we can maintain a clean state apart of your regular browsing usage. You will notice that your extensions are no longer installed. This is on purpose. 3rd party extensions can often get in the way of Cypress and cause failures. However, developer specific extensions for Angular, Ember, and React do not cause any issues but you’ll want to reinstall them. You only have to install them once and they will persist.
- The
whitelist
callback function ofCypress.Cookies.defaults()
now receives acookie object
instead of just thecookies name
as a string.
Features:
- When a project is initially run from the desktop app, you can now choose to run Cypress in a select number of browsers including: Chrome, Chromium, or Canary (depending on what’s installed on your OS).
- Browser sessions are spawned independently of your existing profiles and we’ve disabled things like password saving / prompting, JavaScript popup blocking, and other features which get in the way of testing. Read more here
- We automatically spawn Chrome in a custom theme so you can visually distinguish the difference between browser sessions spawned with Cypress vs your normal sessions. We know this may feel a little jarring because you’re used to running Cypress alongside your other tabs. You will now see 2 chrome icons in your dock and you’ll need to switch between them. We know this is problematic and confusing and we’re looking into changing the icon of the Chrome running Cypress so it’s easier to tell the Chrome sessions apart.
- Added new commands to handle getting, setting, and clearing cookies:
cy.clearCookie()
,cy.getCookie()
, andcy.setCookie()
. - All the
cy.cookie
commands have been upgraded to take new options and can do much more powerful things outside of the JavaScript sandbox. - Upgraded the Chromium version running headlessly and in CI from
47
to49
. - There is a new
cy.exec()
command that can execute any arbitrary system command. Additionally there is a newexecTimeout
configuration option which is set to60s
by default. Fixes #126. - There is a new
numTestsKeptInMemory
configuration option that controls how many test’s snapshots and command data is kept in memory while tests are running. Reducing this number will reduce the memory used in the browser while tests are running. Whatever this number is - is how many tests you can walk back in time when inspecting their snapshots and return values. Addresses #142.
Bugfixes:
- Cypress taskbar icon now displays correctly in OS X dark theme. Fixes #132.
- Fixed issue where server error’s stack traces were being truncated in the Desktop app rendering them impossible to debug. Fixes #133.
- woff Fonts are now properly served from a local file system when using Cypress’ web server. Fixes #135.
- When an element’s center is not visible the error message now includes the stringified element in question, and not
undefined
. - Typing into an
input[type=tel]
now works. Fixes #141. - XHR’s which have their
onload
handler replaced afterXHR#send
is called is now properly accounted for. Fixes #143.
Misc:
- XHR requests for
.svg
files are no longer shown in the Command Log by default. Addresses #131. - Improved error when
cy.request()
fails. The request parameters are now included in the error. Addresses #134. - When running a project in the new Cypress browser environment, if a new tab is opened, a message now displays discouraging the use of multiple tabs while testing. Addresses #9.
- When navigating directly to
localhost:2020
outside of the new Cypress browser environment, a message now displays discouraging running tests outside of the new Cypress browser environment. - If, for whatever reason, Cypress cannot communicate with the automation servers, your testing session will immediately end and you’ll have the ability to re-spawn the browser.
-
cy.fixture()
now has a default timeout ofresponseTimeout
which is20s
. -
cy.fixture()
can now properly time out and accepts anoptions
argument that can override its default timeout. - Improved initial Desktop Application startup performance by about
1.5s
. - We now correctly store local data in each operating system’s correct
Application Data
area. This will be more resilient to upgrades in the future. - Running Cypress in a linux VM on VirtualBox no longer displays “black screens”.
- Our internal proxy no longer strips
HttpOnly
cookie flags. - Improved command errors and normalized many of them. Fixes #137.
- JavaScript popup blocking is now disabled and will not interfere with running tests. Fixes #125.
- We now capture synchronous errors from XHR
onreadystatechange
handlers.
0.15.4
Released 04/22/2016
Notes:
Breaking Changes:
- You can no longer improperly use
.its()
and.invoke()
. Using.invoke()
on a non function property will result in an error that tells you how to write it properly using.its()
.
Features:
- Our chat has now been directly integrated into Cypress’s nav. Clicking on the
chat
icon will immediately display the current gitter chat log. - Added a new link to Options dropdown in Desktop app for “Chat” that goes to our chat.
-
.its()
and.invoke()
now support dot separated nested properties. - Using
.its()
on a function will now allow you to access its properties instead of automatically calling a function. Fixes #122. - Error messages and command messages for
.its()
and.invoke()
have been improved. - Adding an attribute called
data-cypress-ignore
to an element will prevent the internal Cypress proxy from rewriting any of its content or attributes.
Bugfixes:
- During
cypress run
, windows created withwindow.open
will no longer physically display. They are now correctly headless. Fixes #123. - The auto generated
example_spec.js
no longer errors oncy.visit('app/index.html')
since that file would likely not locally exist.
Misc:
- Better error handling of unauthorized users attempting to login to Cypress with improved Login documentation.
0.15.3
Released 04/10/2016
Features:
- Cypress will now display the resolved configuration values when you open a project. This tells you the source of all config values.
- The latest version of the Cypress CLI now accepts passing arguments to
cypress open
. Example:cypress open --config waitForAnimations=false --env foo=bar,baz=quux
. This enables you to set and override localcypress.json
configuration and additionally set environment variables. -
Environment Variables that match any configuration keys (such as
pageLoadTimeout
orwatchForFileChanges
) now override their values. So, if youexport CYPRESS_WATCH_FOR_FILE_CHANGES=false
it will turn off this configuration option. Also note that we’ll automatically normalize environment keys so:CYPRESS_pageLoadTimeout=100000
andCYPRESS_PAGE_LOAD_TIMEOUT=100000
will both be correctly handled. We’ll also coerce values intoBoolean
orNumber
correctly. - Cypress now correctly proxies WebSockets that are pointed at the local Cypress server (typically
localhost:2020
). Because most users use Socket.io, when Socket.io could not correctly connect over WebSockets it would fall back to XHR polling. You may notice many less XHR requests in your command log (which is the intended behavior). - The tray icon in OSX will now change colors. It will turn blue when you’re running a Cypress project and red on any kind of failures such as syntax errors in
cypress.json
. It will turn back black when nothing is actively running. - The title of your project is now the title of the browser tab (so you can easily tell Cypress tabs from one another).
- There is now a link to our chat in the navigation of the web app.
Bugfixes:
- The
-s
or--spec
option now works correctly. You now must pass a relative or absolute path to your spec file. This is much less confusing, allows you to easily autocomplete entries from bash, and will supportunitFolder
later when it’s added. Assuming you want to run a spec file that is located incypress/integration/foo_spec.js
you would pass:cypress run --spec 'cypress/integration/foo_spec.js'
. Previously you could just pass--spec foo_spec.js
which now no longer works (and was broken anyway). Fixes #120.
Misc:
- Open sourced another core repo: Cypress Core Test Runner which makes up the Cypress Desktop Application.
- Improved the error message displayed to users on Windows attempting to download the Cypress Desktop app.
0.15.2
Released 04/03/2016
Features:
- The error message when Cypress detects that a test has ended early (there are still commands left in the queue) now displays a list of these commands with a much improved explanation.
- There is now a new configuration option:
watchForFileChanges
that, when set tofalse
in thecypress.json
, will prevent Cypress from attempting to watch for file changes and restart your tests. - You can now set the default
reporter
incypress.json
for use duringcypress run
or in CI.
Bugfixes:
- The
–reporter
CLI option is now working again. - the
teamcity
reporter is now also working again.
Misc:
- Updated favicon + logo mark
0.15.1
Released 04/01/2016
Features:
-
cy.go()
andcy.reload()
now accept a timeout option. Also, these commands would previously time out after the defaultcommandTimeout
of4000ms
, but now they will timeout afterpageLoadTimeout
of30000ms
.
Bugfixes:
- When an integration test file is unable to run and the
integrationFolder
is not the default path, the UI error now properly prints the integration test file’s path by stripping offintegration
in the path. Fixes #117. -
Cypress.Dom.isHidden()
will now throw error when it isn’t passed a DOM element.
Misc:
- Renamed configuration option
visitTimeout
topageLoadTimeout
. You don’t need to change anything. If you were specifically settingvisitTimeout
in yourcypress.json
file it will be transparently rewrittenpageLoadTimeout
on the next server boot. This option was renamed because now multiple commandscy.visit()
,cy.go()
, andcy.reload()
all depend on this timeout option. - The Cypress tray icon has been updated. It’s much better now.
0.15.0
Released 03/28/2016
Overview:
- As we get closer to a public release we’ve decided to focus on onboarding new users and new projects. We’ve made several breaking changes to help with this process.
Features:
- There is now an
example_spec.js
file that is scaffolded on new projects. This allows new users to instantly see Cypress successfully running on an example project and will answer many questions on writing your first tests. Thisexample_spec.js
file contains every single Cypress command and has approximately 70 tests. - Added a welcome dialog for new projects that explains how Cypress scaffolds out its folder structure. This dialog will only display if Cypress detects that you haven’t written any tests or changed the initial
example_spec.js
file. The welcome dialog will no longer display after you’ve changed or added any tests. - Added the ability to click on file/folder links from within the Cypress webapp that will spawn your OS file/folder finder and show you where the files are located in your project.
- There is now a default
cypress
folder that contains your test files, afixtures
folder with an example fixture, and asupport
folder with example support files. Insidecypress
there is anintegration
folder that will contain your integration tests. - You can now turn off
supportFolder
andfixturesFolder
by passingfalse
incypress.json
. This will automatically remove the folders the next time you open your project in Cypress. Fixes #102. - Restyled the tests list.
Breaking Changes:
- Cypress no longer looks at your
tests
directory for test files. Now, by default, it looks in thecypress/integration
directory. - We’ve removed the configuration option
testFolder
and renamed it tointegrationFolder
inside of thecypress.json
. - We’ve renamed the
cypress
npm package to becypress-cli
. You’ll see a giant deprecation warning until your scripts have been updated to referencecypress-cli
.. You can also uninstall thecypress
npm package. - Added new
fileServerFolder
configuration option that can mount a directory other than your project root when using Cypress as a web server.
Misc:
- Using
.hover()
will provide a detailed error message with a link for working around hover constraints. Addresses #10 - Internal routing errors in Cypress are now gracefully handled with
x-cypress-error
andx-cypress-stack
set on response headers. - Updated all of the repo names to be modular.
What you need to do:
- We did not write an automatic migration from
tests
->cypress
- You need to manually move your existing test files from
tests
intocypress/integration
. - Come into the chat if you have any problems or need help.
More Info:
- Why did you change the default test folder to be
cypress/integration
. - We are adding support for unit testing in the near future and decided that there needs to be a separation between
unit
andintegration
tests. The actual runner will handle these two sets of specs very differently. It’s important to make the change now so when we do add support for unit tests, you only have to create aunit
folder inside of yourcypress
folder.
0.14.3
Released 03/20/2016
Features:
- Added
cy.getCookies()
command for easy chain-ability. Fixes #103. - Cypress now outputs its version when passed the
--version
argument - If you are not logged in on OSX, Cypress now issues a native system notification indicating to you that Cypress is running in your tray (many users often complained they could not tell Cypress was actually running)
Bugfixes:
- Handle clearing cookies better when they are created on a path other than
/
. Fixes #104. - Issuing Cypress Commands inside of a Promise now works. Fixes #111.
- ‘Add Project’ dialog is no longer lost on blur. Fixes #115.
- Desktop windows that are transparent no longer lose their box shadow.
Misc:
-
cy.visit()
callback functions:onBeforeLoad
andonLoad
are now invoked with the current runnables context instead of withcy
. This makes accessing properties in your tests much easier.
0.14.2
Released 03/14/2016
Bugfixes:
- Chaining more cy commands after using
cy.wrap()
now works. Fixes #114. - Cypress now handles events property when a DOM element is removed during a
.click()
event. As per the spec, ifmousedown
causes element removal thenmouseup
andclick
andfocus
events will not be fired. Additionally if removal happens duringmouseup
thenclick
event will not be fired. Also updated theonConsole
groups to only display and indicate the events which actually fired. Fixes #109.
Misc:
- Removed
fa-refresh
icons next to suites and tests until this behavior has been reimplemented due to ID removal. - Removed resetting the runnable timeout when a
page load
event resolves. This prevents an edge case where the next test may show as timed out duringcypress run
.
0.14.1
Released 03/13/2016
Features:
- Project ID’s and
cypress.json
are now only generated once you start your Cypress server. Previously they were created initially when you choose the project folder. This now means you won’t have to cleanup excess files if you accidentally select the wrong folder. Additionally you can now use Cypress 100% offline. Previously the GUI would block until the project had an ID but this restriction has been lifted.
Bugfixes:
- The proxy server can now correctly proxy content on a
ipv6
host only. We had to patch node core to get this in, as by default node prefersipv4
. We now concurrently test all hosts viadns.lookup
to find the first one that responds. This updated behavior now matches how other clients, likecurl
, and browsers resolve hosts. Fixes #112. - Simplified how Cypress stores projects and fixed some edge cases where Cypress would send an outdated Project ID.
- Prevent server from opening and immediately closing + re-opening when project is missing a Project ID and one is generated.
- Using Cypress as a file server and serving a file that’s part of a folder that has a name containing a space now works. Fixes #113.
- The existing
.cy
cache and settings are now correctly copied again after an app update.
Misc:
- Projects without an ID now error correctly when running in CI.
- When Cypress cannot proxy http content due to a software error it will attach a
x-cypress-error
andx-cypress-stack
to the HTTP request for easy inspection and debugging. - Cypress will now output its internal logger directly to the console when
CYPRESS_DEBUG
env var is set. - Replaced Ruby / Compass with
node saas
.
0.14.0
Released 03/08/2016
Summary:
- This update represents mostly a lot of internal structure changes. We swapped out the underlying Desktop architecture and refactored all of the back end code to prepare for an open source release.
- If you choose to install Cypress from the CLI Tool you must update to the latest version
0.9.1
. Just runnpm install -g cypress
and then you can runcypress install
. You don’t need to do anything if you update from within the Test Runner itself.
Features:
- The Desktop App has been re-skinned with misc GUI enhancements such as help text, popovers, clearer errors, better loading indicators, etc.
- The Desktop App’s file size is now much smaller and unzips much faster. In the next release there will be a special
CI
build which removes the need to run Xvfb. - Test IDs have been removed. You will no longer see Cypress insert IDs into your test files. This was a feature we implemented on day 1 - the idea being we could track test performance and do regression analysis. Unfortunately, it will be a long time before we actually implement the data science to make this happen. For the time being, IDs presented unnecessary technical complexity and challenges with no real upside. We recommend you remove all of your existing IDs. We’ve added a new command to the CLI tool that can do this in one shot.
cypress remove:ids
You may see IDs be reintroduced at a later time when we provide analytics. -
.then()
now supports atimeout
option. Fixes #110. - All error messages from using the CLI have been rewritten and improved.
- Cypress will now automatically prompt you to add a project when using
cypress run
on a project that has not yet been added. - Domain cookies are now proxied better. There’s still more work to do before they are 100% fixed but now most typical domain cookie scenarios should ‘just work’.
- We’ve put together a new example repo called The Kitchen Sink. It demonstrates usage of every single Cypress command.
Bugfixes:
- Using
cypress run
in OSX now works again. - Added fs polling support to fix issues where Cypress would not detect file changes.
- Tests should reload inside of Cypress faster when they are changed.
- Better error messages when a command times out waiting for a promise to resolve. Fixes #108.
-
cy.viewport(ipad-2)
now displays by default in portrait. Landscape orientation is now properly landscape. Fixes #100. -
.click()
will now properly click within an element’s bounding box when aposition
option is passed and the calculated coordinates are a fraction. This previously forced the click to happen outside of the element. Fixes #99. -
clientX
andclientY
event properties are now correctly calculated for elements when the page is scrolled. Fixes #98. -
.check()
and.uncheck()
now correctly filter down the subject when a value is passed as an option. Fixes #94. - The Test Runner will now display your email address when you have not set a name in GitHub.
Misc:
- Improved element display in Command Log when multiple elements are part of an assertion. Fixes #96.
-
cy.reload()
now returns the window object of the newly reloaded page. Fixes #105.
Known Issues:
- Clicking the ‘reload’ icon next to a test that does not have an ID will not work anymore. We’re reworking this feature to work without the presence of IDs.
0.13.9
Released 01/28/2016
Bugfixes:
- Prevent regression with not automatically scaling the viewport to fit into the window size
Misc:
- Update links to match new documentation
-
.debug()
has been zipped up - it no longer logs confusing debugging information and now logs information about the previously run command. -
Cypress._
,Cypress.$
,Cypress.Promise
,Cypress.Blob
,Cypress.moment
utilities have been moved off ofcy
and are now attached toCypress
. This is much more consistent with how thecy
andCypress
APIs work. You can continue to use these objects off ofcy
but this has been deprecated and you will see a warning message.
0.13.8
Released 01/24/2016
Features:
- Added
cy.reload()
command which does a full page refresh. This is the same as the user hitting the ‘Reload’ button. Additionally it matches the same argument signature aswindow.location.reload
.
Bugfixes:
- Fixed situation where
cy.viewport()
would not restore correctly between tests. Previously this would cause subsequent tests to be issued at the modifiedcy.viewport()
. Now viewport is automatically restored to the settings in yourcypress.json
file.
Misc:
- Using
.its()
on a function or.invoke()
on a property now logs a deprecation warning. In the next major release this will become a full error. It is valuable to make a distinction whether you’re operating on a property vs a function, and this change improves overall readability with less confusion. - Cypress deprecations and warnings are now prefixed with:
Cypress Warning:
to indicate this message is coming from Cypress
0.13.7
Released 01/17/2016
Bugfixes:
- Prevent error during element stringification on
<svg>
. Fixes #93. - Clarified on errors related to not being able to run in CI. Previously there was a “catch all” error indicating your Cypress API Key was invalid. This was oftentimes incorrect. More specific errors have been added.
-
.type()
has been upgraded to handle current selection ranges. Previously if an<input>
had a selection range as Cypress began to type, this would be ignored. Cypress now takes this into account and will type over any selected text (as native typing would do).
Misc:
- All Cypress related services have been updated to use HTTPS. We are forcing HTTPS redirects for everything except for
api.cypress.io
, which would be a breaking change. By the next minor release we will force that as well. Once we make this change we will remove all versions below0.13.7
. So make sure you are not locking the Cypress version when running in CI. We periodically remove old Cypress versions which have security flaws and this is an example of one.
0.13.6
Released 01/09/2016
Features:
- All commands now retry if 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()
andcy.route()
now take an optionalonAbort
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
Released 01/03/2016
Features:
- Added new command:
cy.go()
which acceptsback
,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
Released 12/31/2015
Features:
- Added
waitForAnimations
andanimationDistanceThreshold
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
per60fps
. 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 about32ms
. If your app does not use animations you may wish to turn off this behavior in yourcypress.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 fromforce404: true
to becomeforce404: false
. In other words, Cypress will no longer forcibly send XHR’s to 404 status when these XHR’s do not match any existingcy.route()
. This change better aligns with predictable usage for most Cypress users.
0.13.3
Released 12/25/2015
Notes:
- Merry Christmas everyone ;-)
Features:
- Overhauled the entire subsystem dealing with an element’s visibility state. Previously we were 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 havedisplay: none
,visibility: hidden
, or whether an element is considered hidden because its effectivewidth
orheight
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
, orhistory.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 ofStatus
, which indicates whether a route is stubbing matching XHR’s.
0.13.2
Released 12/20/2015
Notes:
- Docs have been updated for
cy.wait()
,cy.route()
andcy.server()
to reflect these changes.
Features:
- Added
responseTimeout
configuration value. -
cy.wait()
has been upgraded to now use two separatetimeout
values. In previous versionscy.wait()
used thecommandTimeout
and would automatically time out if the XHR did not achieve a response in that time frame. Nowcy.wait()
will go through two independent timeout phases. At firstcy.wait()
will wait for an XHR to be requested which matches its route. It will wait up to the value configured withrequestTimeout
(default 5000ms). After it sees a matching request it will then go intoresponse
waiting mode. It will wait up to the value configured withresponseTimeout
(default 20000ms). Whency.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
andresponseTimeout
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 fromcy.server()
andcy.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. Changedcy.request()
to now useresponseTimeout
configuration value. - Updated many error messages to be more consistent.
- Added special error messages when elements cannot have actions applied to them with a suggestion to use
{force: true}
.
0.13.1
Released 12/11/2015
Notes:
- We are aware of issues running in CI with Linux builds, and are working through those issues.
Bugfixes:
- Prevent headless / CI from throwing errors on
history.pushState
andhistory.replaceState
. - Prevent edge case where
aliasing
in the Command Log was aliasing the wrong command - Prevent XHR’s from throwing errors on
arraybuffer
content. Properly setxhr.responseBody
forXML
,blob
, andarraybuffer
. - Headless running is now fixed in OSX. This was due to a bug with app signing + unzipping via the CLI.
0.13.0
Released 12/9/2015
Summary:
- Though it may not look like much, this upgrade was a long time in the making. There were limitations in the way we were currently handling headless / CI builds which restricted our ability to make updates or fix bugs. Additionally CI runs would randomly crash for no good reason. We decided to split out the headless / CI process into its own independent Chromium application which is now independently controlled, and is much more reliable. This upgrade enables us to handle CI features coming down the pipe and was necessary for moving forward.
Features:
- Upgraded
Chromium
for headless and CI runs from41
to45
. - You will now see better stack traces and errors during
cypress run
/ in CI. No moreundefined is not a function
errors. - Ported all links to use the new Cypress CDN.
- Documentation to CLI.
Bugfixes:
- New chromium upgrade prevents synchronous XHR freezes.
- New chromium upgrade fixes situation where extremely long CI runs would sometimes randomly crash.
- Fixed problem with rewriting content on elements which contained
<svg>
elements.
Breaking Changes:
- Temporarily ignoring the
--reporter
option for headless / CI runs. Currently it is locked to thespec
reporter, which is the default. This will be fixed in the next few patch releases. -
AccessingThis is fixed inwindow.history.go()
,window.history.back()
,window.history.forward()
will throw an error duringcypress run
/ CI. This is a regression that will be fixed - hopefully very soon.0.13.3
- While this new Chromium application passes our internal tests, it may crop up other regressions we aren’t aware of. If you’re experiencing different behavior in CI vs running locally in Chrome, this may be an indication of these.
0.12.8
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 adescribe
orcontext
block instead of theit
. 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
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
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 toCypress.env
which provides access to configuration values.
Bugfixes:
- Setup/Teardown code was not properly running on nested Mocha
before
hooks which caused the error:The XHR server is unavailable or missing...
. Fixes #80 and #86. - Prevent accidental mutation of
cy.server()
options whency.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
anddomain cookies
flawlessly. As it stands Cypress is prone to errors in complex setups.
Misc:
- Exposed
visitTimeout
andrequestTimeout
configuration. - Increased
visitTimeout
from20s
to30s
. -
.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
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
.
0.12.4
Released 11/19/2015
Features:
- There is a new
Cypress.Cookies
interface which enables you toget
,set
, and evenpreserve
cookies throughout your test. Useful to preserve cookie-based sessions between your tests. Documentation is written here.
Bugfixes:
- Removed problematic
content-security-policy
headers - Fixed situation where Cypress was not injected correctly when
<head>
tag had attributes - Prevent fixtures from being accidentally overwritten and having their content blanked out. There was a very subtle chance due to node’s async file writing that as a file was being written with a formatted fixture, that another call to the same fixture would read in at that exact moment. If this happened the 2nd read would resolve with zero bytes, which would then end up rewriting the file back with zero bytes.
Misc:
-
alerts
are automatically accepted now and a message logs to the console. - Added retina favicon. Fixes #83.
- Removed nested
cypress
object in thecypress.json
. Existingcypress.json
files are transparently rewritten on the next server boot, so you can check in the modifiedcypress.json
and all will be well. Fixes #82. - Improved performance of formatting fixtures.
0.12.3
Released 11/04/2015
Bugfixes:
- Prevent
.pause()
from actually pausing duringcypress run
. - Fix for
cy.request()
SSL issues when host certificates were self signed.
0.12.2
Released 11/01/2015
Features:
- There is now a
cy.cmd
andcy.command
method which enables you to invoke commands by their string name. This is most useful when using namespaced custom commands. SoCypress.addParentCommand("dashboard.setSlider", ...)
can be accessed bycy.cmd("dashboard.setSlider", arg1, arg2)
. (Docs have not been written yet). -
Environment Variable
support has been added and can be accessed in your tests withCypress.env
. The docs have been written Environment Variable and here.
Misc:
- The URL property on all XHR’s is now completely decoded, even on URLs which were originally encoded. The reason is for easier assertions and debugging. This URL property is specific to Cypress and does not actually affect the underlying XHR.
0.12.1
Released 10/28/2015
Bugfixes:
-
cy.route()
will no longer throw that a response is needed when usingcy.server({stub: false})
. - Applying server defaults to
Cypress.Server.defaults({})
now works as documented. -
onRequest
andonResponse
can now be correctly set as permanent server defaults. - XHR URL is now decoded to make assertions easier. Fixes #75.
0.12.0
Released 10/23/2015
Summary:
- XHR handling has been rewritten to be much more flexible, extensible, and future-proof.
Breaking Changes:
- The object you receive after waiting on an XHR alias is now different. Previously this was a
FakeXMLHttpRequest
object which came from Sinon.js. Now it is a specialXMLHttpRequest
object which comes from Cypress. You may need to rewrite some of your assertions but we’ve tried to keep the signatures as close as possible. - The XHR’s URL property will now always return you a
Fully Qualified Domain Name
including the origin, port, host, etc. Previously the URL property represented whatever the XHR was opened with. We’ve worked around this difference by when checking whether an XHR should be stubbed, the origin is tested both as present and omitted.
Deprecations:
- Accessing
requestJSON
orresponseJSON
on XHR objects is deprecated, and will be removed in the next version. Accessing those properties will throw a warning which explains how to rewrite these. -
cy.respond
is temporarily deprecated because the semantics of how this works is completely different and will require more work (mentioned later on) before this can be re-enabled again.
Features:
- All XHR’s (regardless of whether they are stubbed or not) are now logged in the Command Log. Stubbed XHR’s display as “XHR Stub” vs vanilla “XHR”.
- Stubbed XHR’s will now show up in the
Network Tab
in Dev Tools. In other words they will really go out and you’ll be able to inspect them just like regular XHRs. - Regular XHR’s can now be aliased and waited on without actually being stubbed by passing
{stub: false}
to thecy.route()
. - XHR’s will continue to work correctly even after a test ends. In previous versions, due to replacing the entire XHR object, your application would not work correctly after a test ended. This prevented you from “navigating around” and working with your app after the tests end.
- Servers can now be disabled in the middle of a test. Previously once a server was started all XHR’s would be stubbed.
- You can now disable the force sending of
404
to all XHR’s which are not stubbed. This allows you to mix and match, enabling some requests to be stubbed and others to hit your server and respond normally. - The default XHR configuration can now be overwritten in a single area.
- Many new configuration options are available for controlling how XHR’s are stubbed.
- XHR’s now include an
Initiator
stack regardless of whether they’re stubbed. TheInitiator
stack includes the stack which caused the XHR to be created and sent. - The
onConsole
information related to an XHR has been updated to make it easier to understand why a route was or was not stubbed, and its associated request and response headers. - Response headers on XHR stubs will now automatically set their
Content-Type
based on the stub response. Previously this would always set to theContent-Type
toapplication/json
. Now if you force a response to be text or html, theContent-Type
response header will be set appropriately. - You can now force other additional response headers to be sent on stubbed XHRs.
- XHR’s now snapshot twice - when the request is made and when the response is returned.
- Removed sending
sinon
on everycy.visit()
. - The XHR object which is returned to you to via
cy.wait()
is now more consistent with other return values such ascy.request()
. It should be much easier to work withrequest body
,request headers
,response body
andresponse headers
.
Bugfixes:
- Routes no longer display as duplicated in between test runs when
cy.server()
is started prior to acy.visit()
and you cause a full page refresh, which caused all routes to be re-bound. - Any issues related to
requestJSON
orresponseJSON
being duplicated are now fixed. Fixes #65. - Fully Qualified XHR’s which should be proxied are now correctly transparently rewritten to prevent CORS problems.
-
cy.route()
-onRequest
andonResponse
callbacks are now called withcy
as the context. - Whitelisting assets which should never be stubbed has been improved. Now
.jsx
templates pass-through correctly. - CORS Network Errors are now correctly caught.
Misc:
- All
ng
based commands now display in the Command Log. - The built in XHR response delay has been removed since now all requests really go over the HTTP stack, which inherently has its own delay. You can still optionally force responses to be delayed by a set amount.
Almost there:
- Support for the native
fetch
object. - Configuration to automatically force Cypress to wait for outstanding XHR’s (like it does for other Page Events). This would mean when testing more traditional apps without XHR stubbing, commands would automatically wait until all outstanding XHR’s complete. The internal retry loop needs to be rewritten to make this possible, but the XHR architecture is now there.
0.11.13
Released 10/08/2015
Bugfixes:
- Prevent rejected promise from causing error about invalid API key during a CI run.
Misc:
- Better error handling of rejected promises.
0.11.12
Released 10/07/2015
Features:
- Snapshots can now be named and a command can have multiple snapshots.
- Multiple snapshots are now cycled automatically on hover, and the name of the snapshot is displayed.
- Most of the action commands now take multiple snapshots (giving you a precise look at an action prior to it happening, and then afterwards).
Bugfixes:
- Fixed situation where an
Uncaught Error
was not being properly handled. Cypress would incorrectly continue to retry commands instead of canceling them, which lead to incorrect errors downstream in other tests. - Fixed situation where an error being thrown from an XHR was being improperly handled (in a slightly different way than the problem above).
- Stopped sending CI data when
cypress run
was issued.
Misc:
- CSS Improvements
0.11.11
Released 10/04/2015
Bugfixes:
- Snapshots of
.type()
and.select()
are no longer incorrect due to taking snapshots too early. Fixes #22. - Passing
{force: true}
to.blur()
now logs correctly in the Command Log.
Misc:
- Added delays on some tooltips.
- The URL will now highlight in a yellow background during a revert DOM snapshot.
- Moved snapshot message to be affixed to the bottom of the remote app in preparation for cycling through multiple snapshots.
- Cleaned up the URL by removing some unused content.
0.11.10
Released 10/04/2015
Features:
-
.blur()
now accepts{force: true}
which removes error checking such as validating the element is urrently in focus.
Bugfixes:
-
.pause()
is now noop duringcypress run
orcypress ci
.
Misc:
- Removed
cy.inspect
command. - Added Cypress logo to nav.
- CSS changes.
0.11.9
Released 10/03/2015
Features:
- Added
.zip
as acceptable fixture extension. Content is sent back asbase64
. - Added docs to nav, consolidated
organize
intotests
. - Added favicon.
- Added tooltips everywhere.
- Created new debugging command:
.pause()
which will pause executing commands and allow you to resume or step into the next command one at a time. - You can now stop and restart tests from the UI.
- Added
cy.Blob
utilities forblob
/string
/base64
conversion. Useful for manually handling uploads.
Bugfixes:
- “Cannot revert DOM while tests are running” now removes itself correctly.
- Aliased DOM objects are now correctly stored on the test’s
ctx
as instances of your jQuery (if one exists).
Misc:
- Updated UI styles / tests list / run all.
- Fixed alt tray icon so it shows up correctly on click.
0.11.8
Released 09/25/2015
Features:
- Added
cy.request()
command which can issue XHR requests. The request is generated outside of the browser, and bypasses all CORS restrictions. Great for talking to an API for seeding, querying, building, etc.
Bugfixes:
- Prevented edge case with
cy.fixture()
where it would not be able to be canceled without throwing an unhandled rejection error.
0.11.7
Released 09/25/2015
Bugfixes:
- The debug window now works again.
- Changed
Linux
build strategy which fixes not saving the internal.cy cache
. Also fixes not being able to update from the GUI. Fixes #66.
0.11.6
Released 09/25/2015
Bugfixes:
- Viewport is now properly restored to the default width / height on subsequent runs. Previously it would retain the last viewport size used until there was a new viewport command.
-
cy.should('contain', '…')
now correctly escapes quotes and single quotes. - Assertion messages are no longer truncated, and instead will scale down by reducing the
font-size
andline-height
after they exceed 110 characters. So you’ll now always see the full assertion message. - Fixed some scenarios where assertions would not be logged as a child command.
- Assertions based around the
window
ordocument
object no longer cause Chai to bomb on formatting their object structures (due to cylic references) and instead now will show up as<window>
and<document>
.
Misc:
-
cy.window()
now logs out to theCommand Log
and additionally verifies upcoming assertions. -
cy.document()
now logs out to theCommand Log
and additionally verifies upcoming assertions. - Removed
numElements
label on assertions which indicated the number of elements found if > 1. This was annoying and redundant since the inked command already had this number.
0.11.5
Released 09/20/2015
Features:
- The
Linux
version of Cypress now works correctly for GUI Desktop versions (tested on Ubuntu Desktop). Previously it would only worked duringcypress run
in server versions. Thetray
used in OSX does not work with theLinux
, so inLinux
we just use a standard window + menu. - Added Desktop Icon.
Bugfixes:
- Cypress now forces the initial
cy.visit()
not to be cached by the browser. This was incorrectly being cached which meant when you changed thecy.visit()
it would not actually go out and fetch the new contents. Previously you had to checkDisable Cache
in theNetwork Tab
inside of Chrome to prevent this bug. Unfortunately this has a significant performance drawback. If you use acy.visit()
before each test you will notice a degrade in performance because this request is no longer cached. This is a temporary problem until Cypress implements a more sophisticated caching strategy which optimizes these concerns. There is a lot to improve in this arena but it will take more time before it’s implemented. -
.should()
will no longer throw an error when it is used as aparent command
and has a callback function signature, and that callback function throws outside of an assertion. Instead now it logs correctly, handles the error, and displays this error for you.
Misc:
- Many additional tests added to the multi-os deployment process.
- When Cypress opens other windows they are now auto-focused.
0.11.4
Released 09/17/2015
Features:
-
.should()
now accepts a callback function which will be retried until it does not throw. The callback function will be retried in the exact same way as passing regular string-based chainers to.should()
. Having a callback function gives you an opportunity to massage the expected subject such as comparing multiple elements, creating an array of text or classes, etc.
Deprecations:
-
cy.wait(function)
has been deprecated and you can safely rename this command to.should()
.
Misc:
- All of the docs surrounding assertions,
.should()
, and.and()
have been updated to reflect the new API.
0.11.3
Released 09/16/2015
Features:
- When XHR’s are aborted Cypress will display the stack trace indicating where in your app the XHR was aborted. Additionally it will display as
(aborted)
in the Command Log.
Bugfixes:
- XHR’s will no longer be ended early and display no status as if there was no response. Fixes #63.
- XHR’s which are aborted no longer cause an
INVALID_STATE_ERR
to be thrown. Fixes #62 and #34. - Cypress will no longer incorrectly revert to a previous test run’s snapshot when tests are re-run.
0.11.2
Released 09/14/2015
Bugfixes:
- Prevented bug where the assertion message:
expected <x> element to exist
would log over and over again when Cypress retried querying for a DOM element.
Misc:
0.11.1
Released 09/14/2015
Bugfixes:
- Utilizing
cy.server()
across multiple tests before acy.visit()
now works correctly. As a side effect now Cypress will rebind both theserver
and allroutes
whenever the remote window is reloaded (for whatever reason) - even during a test itself. This means you can navigate between pages without ever having to restart the server or routes (they 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.11.0
Released 09/13/2015
Summary:
- This release marks a major change in the underlying algorithms used to prevent testing flake. It is a major goal of Cypress to combat and prevent all test flake. These algorithm changes go a long way towards making this a reality, and have been months in the making.
- Cypress can now predict upcoming assertions and modifies its behavior until the intended state has been reached.
- Command options
exist
/visible
/length
have been deprecated, these were confusing and limiting, and the same result can now be achieved using normal assertions. The end result is much more robust and much easier to understand.
Features:
- Commands which precede assertions will now look downstream at those assertions and not resolve until their subject’s state passes all assertions. Previously this was sort of implemented using Command Options and the
eventually
flag, but now this is the default behavior. Command Options only worked on DOM-based subjects, and now the new assertion verification works on everything else (including RL-based commands, etc). What this means is that Cypress can predict what you are requesting and automatically modifies its behavior until this state is reached. This prevents test brittleness / random test flake. Additionally this removes ever having to usecy.wait(Number)
orcy.wait(Function)
(though this is still a valid command). As a side effect, you will now see commands + their assertions in the spinning pending blue state. When assertions fail their associated command also fails at the same time. This visually represents the coupling between these two concepts. Another side effect is thattimeout
options do not need to be provided on the succeeding assertions, and can instead just be provided on the proceeding command. All of the coupled assertions will automatically be retried to the maximumtimeout
setting. Fixes #43. - Action commands will now insert an artificial delay after resolving to enable modern JavaScript frameworks time to flush their run loops. snapshots are delayed until after the action, resulting in more accurate snapshots because JavaScript frameworks would not process these DOM events until
N
milliseconds after they occurred. This has the unfortunate side effect of decreasing performance by about 5-10% but the end result is that it is much easier to debug and Cypress is less prone to flake caused by modern JavaScript frameworks. This change comes after collecting many data points and this was one of the easiest changes that help reduce flake. For users that don’t use the latest and greatest JavaScript frameworks, this action delay can be reduced throughcypress.json
which may speed up large test suites. - Aliasing custom commands now intelligently figures out where to apply the alias without being specified inside of the actual custom command.
- The algorithm for replaying aliased commands is now much more accurate, handles stale element references better, and will not replay commands which have a side effect (like action commands). The end result is Cypress will now almost always find the desired element by determining the minimum number of re-queries and is not susceptible to stale element references. Additionally using assertions on aliased elements now works (where previously using a Command Option on an alias would just be ignored. This was very difficult to implement but should be 100% solid. Fixes #36.
- Assertions which actually produced 2 assertions (under the hood) such as
should('have.attr', 'href', '/users/1')
will now only log the 2nd assertion, unless the first fails. - Previously using
eventually.have.length
was impossible (and this would throw an error), but now this works as you’d expect with the defaultshould('have.length')
.
Bugfixes:
- Aliased commands now correctly output a command log again when they are replayed.
- Assertions that involved an
{exp}
property are no longer incorrectly substituted with the#{this}
subject. - Removed special logic for Angular which tapped into its digest cycle for queueing commands. This had unpredictable results when there was n
interval
set, and is now superseded by the new queueing system anyway (which is more performant). -
Sinon's
formatting of failedspy
orstub
calls is horrendously non-performant and would sometimes choke the CPU for several seconds. This formatting has been completely removed and will be replaced by something less outrageous later on. At the moment you can still use the built in Cypress debugging (clicking on a command log, etc) to see what the actual values were. Fixes #18.
Misc:
- The internal retry loop of Cypress now runs at
60fps
, instead of20fps
. - Cypress overrides chai’s default inspection function for DOM elements meaning instead of seeing
{ Object (0, length, ...) }
you will now ee the nicely formatted Cypress DOM element like:<button#primary.btn-large>
. - Cypress now overrides chai’s
match
chainer and provides a specific error message when a nonregex
value is provided. Fixes #58. - Cypress now handles
length
andexist
assertion chainers in a very specific way, providing a detailed message on failure, and utomatically slices out any stale element references. - The
contain
assertion chainer fromchai-jquery
has been extended to match the same selector logic ascy.contains()
- meaning it now checks thevalue
ofinput[type=submit]
. - Tweaked the label for displaying the number of elements a command resolved with (now displays 0 differently than > 1).
- Removed the
eventually
flag in assertions as now this is the default behavior on normal assertions. - Deprecated all Command Options. You will see a very nice and simple error message explaining how to convert these to assertions.
-
.within()
can now be silenced with{log: false}
. - Many error messages have been rewritten to be much more fluent and easier to understand.
Other News:
- Cypress is currently seeking to raise a Series A. This will enable us to grow the team and speed up development but seeking it has come at a ost for current development speed. If you have any VC connections please send them our way.
0.10.8
Released 08/21/2015
Features:
- Reporters in CI can now be specified.
- Added
teamcity
reporter.
0.10.7
Released 08/16/2015
Features:
-
port
can now be specified as a CLI argument and will override any values stored incypress.json
.
Misc:
- When running through the CLI, Cypress will now display an error if the server’s port is currently in use. Previously this would not output an error and the process would just hang.
0.10.6
Released 08/15/2015
Bugfixes:
- Fixed edge case where Cypress would not correctly handle
POST
orPUT
requests with a JSON body. These requests would just hang and eventually time out.
Misc:
- Project ID’s can be programmatically set now.
0.10.5
Released 08/13/2015
Bugfixes:
- Running a specific test won’t open/close immediately when starting up (fixes weird flickering effect).
-
.check()
and.uncheck()
commands will now correctly “end” even if they werenoop
due to the element already being in a checked or unchecked state.
Misc:
- Currently running tests now displays a spinner to indicate they are currently running.
- Optimized performance of command lists.
- Commands which were silenced with
{log: false}
will now always display in the Command Log if they were part of a replayed chain of commands due to an alias reference becoming stale. Previously they would not display which was very confusing. - Sinon.JS is no longer minified.
0.10.4
Released 08/11/2015
Bugfixes:
- The OSX Cypress App was not being properly signed (since 0.10.0) due to an oversight in our deployment process. This has been fixed now and additional checks have been added to ensure the deployed version is properly signed. Updating within the app was unaffected. This bug only effected fresh downloads from the internet.
- Errors / crashes encountered when updating to newer versions through the app should be fixed now.
0.10.3
Released 08/10/2015
Bugfixes:
- Cypress Errors in
hooks
(beforeEach
, etc) will no longer cause Mocha to fire itsend
event thus ending the entire run. In CI, this would cause the test suite to end early. Uncaught Mocha errors will however continue this behavior. Cypress does not yet have a “skipped” visual state for tests which were skipped, so at the moment it may look a little strange and unpredictable.
Misc:
- Tweaked clicking algorithm to re-verify an elements visibility anytime the click retries its
retry
logic. Previously this check only happened once at the beginning of the click. - In CI, the window size (not the viewport) has been changed from
1024x768
to1280x720
. This will only affectscreenshot
artifacts which are taken automatically withcy.screenshot()
(coming soon) or whenever a test fails (also coming soon).
0.10.2
Released 08/10/2015
Bugfixes:
- Memory optimizations in CI.
- Reduce noise in logs.
- Prevented external
NODE_ENV
mutations causing problems in CI.
Misc:
- Better error tracing.
0.10.1
Released 08/07/2015
Bugfixes:
- Fixed missing dependency for CI.
Misc:
- Cypress now logs out your project’s API key on a failed CI run.
0.10.0
Released 08/06/2015
Summary:
- Cypress is now able to run all the tests, run in the terminal, and includes support for Linux and CI. Additionally, most of the functionality of he GUI Desktop App can now be accessed through command line arguments.
- Because each operating system requires a specific build of Cypress - a new CLI tool has been created which abstracts away these differences and orchestrates the Desktop App regardless of which OS you are running.
- This CLI tool is now published on NPM, though the documentation still needs to be written.
- There is now a download service to access the latest version of Cypress and previous versions.
- Cypress aims not only to make it easier to write tests, but after you build a test harness, it will make it easier to dive into failed tests (hat run in CI). This release paves the way for providing after-run results and allowing you to dive into those failures.
Breaking Changes:
- Due to security upgrades, adding projects in previous versions will no longer work. Upgrade and everything should be okay.
Features:
- The latest version of Cypress can be downloaded here: http://download.cypress.io/latest.
- Cypress can alternatively be downloaded / installed / managed through the CLI utility.
- Cypress can now be run through the terminal.
- You can now run all of your tests inside of the GUI App.
- You can use the CLI tool to run Cypress in CI. The documentation for this needs to be written, but it will be very simple to do. You will robably only have to write 2 lines in your CI scripts to run Cypress.
- You can configure CI to use any reporter built into Mocha, and additionally we are adding JUnit XML output (for Jenkins) as a built in default.
- You can write your own custom reporter which Cypress can use in CI.
- Console output from your apps is suppressed while running in the terminal.
Bugfixes:
- Several security problems with projects have been closed in preparation for running in CI.
- Extensive memory profiling has been done and Cypress has implemented several strategies for aggressively causing garbage collection. The ebugging tools (which allow you to walk back in time through DOM snapshots, or access objects from previous tests) could exhaust all available emory in previous versions. This likely never affected most users, but if a user ran 1000’s of tests (which have been written in Cypress) it ould bomb. Now Cypress only stores data for up to 50 tests, and will begin purging data past that. When run in the terminal, Cypress doesn’t apply any of its debugging tools, so CI will be unaffected.
- Several instances of memory leaks were plugged up.
Misc:
- Everything except for the
cypress driver
is now minified. - Some users have reported problems upgrading previous versions. This is because we changed the name from “cypress” to “Cypress” including some inaries. If your upgrade does not finish you can redownload the latest version of Cypress or use the CLI tool to reinstall it.
- Our build and testing processes have been upgraded to accommodate Linux builds.
- Sinon.JS object formatting during errors has been suppressed (when using spies/stubs) due to its horrendous performance when comparing deeply nested objects. This means you won’t see the (mostly) useless error output from Sinon, but given Cypress debugging tools you can still inspect objects and figure out what went wrong.
0.9.6
Released 07/27/2015
Bugfixes:
- Fixed server crash on improperly handled proxy error.
- Upgraded logic to redirect back to the Cypress client app on manual URL changes.
0.9.5
Released 07/14/2015
Features:
-
.click()
,.type()
,.clear()
,.select()
,.check()
,.uncheck()
now will wait for the subject to automatically become visible instead of throwing immediately if the element is not in a visible state.
Misc:
- Swapped out ugly nonsense
refresh
icon tosquare-o
to represent a test which has not run yet.
0.9.4
Released 07/06/2015
Features:
-
cy.contains()
,cy.get()
, andtraversal commands
will now all log out heir last known$el
on failure. This means the$el
will be highlight during Command Log hovering, and will display in the console on click. his should make debugging failed DOM based commands much easier. Fixes #52.
Bugfixes:
- Fixed edge case with
cy.contains()
and command optionsvisible
andexist
where it would always fail ven though the matched element was in the correct state.
Misc:
-
cy.contains()
now throws when provided the command option:length
because it will only ever return 1 element.
0.9.3
Released 07/06/2015
Features:
- Proxied jQuery:
$
ontocy
ascy.$
and specific class methods:Event
,Deferred
,ajax
,get
,getJSON
,getScript
,post
. - Proxied
moment
ontocy
ascy.moment
. - The URL will now automatically be restored when hovering over the Command Log to indicate the state of the URL at the time the command ran.
-
.click()
now accepts an optional:position
argument (center
,topLeft
,topRight
,bottomLeft
,bottomRight
). Center is still the default. -
.click()
now accepts an optionalx
andy
coordinate argument, which is relative to the top left corner of the element. Fixes #50. - Click docs have been updated to reflect these changes.
Bugfixes:
-
onBeforeLoad
andonLoad
callbacks tocy.visit()
are now invoked withcy
as the context. - Cypress logo now displays in
About Page
.
Misc:
- Internal refactoring to
Cypress.Mouse
.
0.9.2
Released 07/04/2015
Features:
- Added
About
page in desktop application annotating the current version. -
cy.fixture()
now supports these additional extensions:.html
,.txt
,.png
,.jpg
,.jpeg
,.gif
,.tif
,.tiff
. - Image fixtures will be sent back as a
base64
string. - HTML fixtures will be prettified and saved back over the original.
Misc:
- Added more tests around various areas of the desktop application and ID generator.
0.9.1
Released 07/03/2015
Features:
-
cy.viewport()
can now accept anorientation
when providing apreset
. Valid orientations arelandscape
andportrait
.
Bugfixes:
- The scaffolded
spec_helper.js
now correctly returns its object literal in theonConsole
callback. -
.type()
now correctly logs its message to the Command Log when provided options. -
.type()
has been upgraded to handle situations where as it’s typing, 3rd party code mutates the value either synchronously or asynchronously. The caret is automatically moved to the end position matching browser behavior.
Misc:
- Deprecated
Cypress.command
, instead useCypress.Log.command
to output a Command Log. Updated scaffolding on new projects to reflect this change. -
cy.contains()
now outputs much more explicit error messages when given command options. Fixes #49. -
cy.route()
no longer validatesresponse
value when{respond: false}
is passed in as options. Fixes #48. -
.invoke()
and.its()
will now log out the $el if it’s a DOM object, which will now correctly highlight the $el during a command revert. Additionally if these commands have been called on a DOM object, theironConsole
message will include the DOM objects.
0.9.0
Released 07/02/2015
Summary:
-
cy.viewport()
is a new command which will resize the viewport to a specified width and height. There is ow a defaultviewport
size of1000x660
.
Features:
- Your application’s viewport dimensions will now automatically scale to fit regardless of your screen’s size. This enables you to test resolutions larger than what your screen is capable of displaying. Additionally this fixes edge cases caused when there was a difference in viewports between users.
- The viewport’s dimensions will now dynamically display accurately as they are changed in the header area.
- The viewport’s scale will now dynamically display accurately as it is changed.
- Each command will automatically restore the viewport to the dimensions at the time the command was issued. In other words, scrolling over each command will restore exactly what Cypress “saw” when it issued the command.
- Several common viewport presets have been added for convenience
Misc:
- Cypress now requires a viewport to be issued at all times. By default it is
1000x660
but can be changed in yourcypress.json
file with he keys:viewportWidth
andviewportHeight
.
Bugfixes:
- Scrollbar styling is no longer hijacked by Cypress.
Misc:
- Updated remote application iframe styles.
0.8.1
Released 06/30/2015
Bugfixes:
-
.select()
will now fire afocus
event on the<select>
even if the window isn’t in focus. -
.click()
has been upgraded to be more intelligent about firingfocus
events, and now takes into account the previously focused element. -
.type()
and.clear()
will not issuechange
events orfocus
events unnecessary when chaining together multiple actions which do not change the element or cause it to lose focus. Fixes #47.
0.8.0
Released 06/26/2015
Summary:
-
.type()
now implements all DOM events to simulate every aspect of typing on a real keyboard. - All of the type docs have been updated to reflect these changes.
Features:
-
.type()
now outputs “Key Events Table” which is aconsole.table
of every key typed, thecharCode
, all vents that fired, and whether any werepreventedDefault
. -
.type()
now accepts the following special character sequences:{selectall}
,{del}
,{backspace}
,{esc}
,{{}
,{enter}
,{leftarrow}
,{rightarrow}
. -
.type()
implementscursor
andselection
andrange
accurately like a real keyboard. -
.type()
now fires change events exactly like real browsers when{enter}
is used. -
.type()
will firetextInput
andinput
events exactly like a real browser. Fixes #7. -
.type()
now follows all of the spec in regards topreventingDefault
on any event that would insert a character such askeydown
,keypress
,textInput
. -
.type()
events should be100%
identical to real browserKeyboardEvents
includingcharCode
,which
,keyCode
,data
, etc. -
.type()
now inserts a small delay10ms
between each keystroke to simulate a real user typing. -
input
events are now correctly fired when.select()
chooses an<option>
. -
change
events are now fired exactly how a browser does (when an input loses focus and its value has changed since its last focus event). You’ll see these fire after you use.blur()
directly, or use anotheraction command
on another element.
Bugfixes:
- Using
.type()
in aninput[type=number]
will no longer prepend the value. Fixes #26. -
[contenteditable]
elements can now be focused and blurred. -
aborting
during.click()
/.dblclick()
now correctly cancels remaining queued click/dblclick events.
Misc:
-
console.groups
are now collapsed by default. -
.type()
now validates the chars and will throw on anything other than a string or finite number. -
.type()
now throws on empty strings. - Removed several libs that used to handle typing simulation and rewrote typing from scratch.
0.7.6
Released 06/23/2015
Bugfixes:
- Prevent infinite loop due to a trifecta of rare circumstances with
.click()
. Clicking will now retry sync after it attempts to scroll past the element covering up the desired clickable element. Fixes #46.
0.7.5
Released 06/19/2015
Bugfixes:
-
.click()
now takes into account being covered by a fixed positioned element and will increase the window’s scroll offset to account for this. There are still more improvements to be made before this is bulletproof though. -
cy.contains()
could potentially resolve to a null subject if the matching content was split across multiple nested children elements. This has been fixed and contains will now return the first, deepest element which contains text potentially spread over multiple text nodes and/or children elements.
0.7.4
Released 06/18/2015
Misc:
- Attempting to
.click()
a select element will now throw an error. The error guides you to using the.select()
command, as that is the command you should use to change a<select>
value. -
cy.route()
responses are now validated. If responses arenull
orundefined
Cypress will throw a very specific error message. - Cypress will now display
cypress.json
parse errors when attempting to boot a project when there is a syntax error incypress.json
.
0.7.3
Released 06/17/2015
Features:
-
.select()
will now output a command log. -
.select()
will now haveclick
/focus
events fired on itself and the selected options (as per the pec). -
.select()
is now inline with the otherAction
commands and will retry until the element naturally becomes selectable.
Bugfixes:
-
Action
command options are now properly formatted, instead of sayingObject{4}
they will display the overridden default options - ie:force
,timeout
,interval
. - Sending
{force: true}
toAction
commands will no longer error out if the element is not visible. Forcing the action to take place now correctly removes all error checking prior to issuing the action and events.
Misc:
- Removed stack traces on
AssertionErrors
in the console since those come fromchai
and are basically useless.
0.7.2
Released 06/17/2015
Bugfixes:
- Removed factoring in the total time a test has been running when determining when its command timeout. This fixes a bug where commands down he chain would timeout earlier than their specified
{timeout: num}
option.
0.7.1
Released 06/16/2015
Bugfixes:
- DOM commands which can retry now correctly support
{timeout: num}
options which will raise the timeout beyond the standardcommandTimeout
romcypress.json
. -
<script>
,<img>
,<video>
commands or any other element which supportscrossorigin
attribute now are proxied correctly. Thecrossorigin
attribute removes sending cookies with the HTTP request and now there is a fallback to figure out theremoteHost
even in this situation.
Misc:
- Support for redirects with status code
303
.
0.7.0
Released 06/15/2015
Features:
- Cypress now has first class support for
fixtures
(official docs coming soon). - Introduced new
cy.fixture()
command. - Fixtures support
json
,js
, andcoffee
files with image support coming soon. - Fixtures are automatically validated, with error messages propagating up to the client.
- Fixtures are automatically formatted / indented for easy debugging.
- Example fixture is automatically created with every project.
- Example support files are now automatically created with every project.
-
cy.route()
now accepts an alias as its response. -
cy.route()
additionally accepts a specialfixture:
orfx:
keyword which automatically loads the fixture as the response.
Bugfixes:
- Clicking giant yellow CypressError now displays associated XHR error in the console.
Misc:
- RegExp arguments are now properly formatted in the Command Log.
- Update
bluebird
to2.9.27
. - Update
glob
to5.0.10
.
0.6.14
Released 06/11/2015
Features:
- Command logging has been upgraded to support “page events”, which are different than commands. Now events which happen (XHR/page load/url change/spies/stubs/mocks) log out visually differently and do not use a command number. This should be easier to parse what was a real command and what was a page event.
- When the url changes this is now logged as a page event, and its
onConsole
logs what caused it to change.
Misc:
- Internal refactor / improvements to support long lived runnable objects to work with page events.
- Request Commands (now page events) have now been renamed to ‘XHR’.
-
cy.document()
now returns the raw document object instead of a jQuery wrapped document object. - When
.its()
or.invoke()
fails it will include the current subject n theonConsole
log. -
cy.wait()
now logs out when its referenced aliases, and itsonConsole
output displays the XHR return values. -
cy.hash()
andcy.url()
no longer pass the return value as the command log’smessage
, which made no sense and was unlike every other command.
0.6.13
Released 06/09/2015
Bugfixes:
- Traversal methods now correctly return their
$el
even when{log: false}
option is passed.
Misc:
-
.type()
now works withcontenteditable
attributes.
0.6.12
Released 06/09/2015
Bugfixes:
- When Cypress detects a
page loading
event it will now clear out the subject so the next commands cannot reference previous page DOM elements. -
.check()
and.uncheck()
will no longer output additional error’d commands when their associatedclick
fails.
Misc:
-
.type()
,.clear()
,.check()
,.uncheck()
now all take{force: true}
options to force the click to happen and skip additional clickable checks. - Now when you click the giant yellow failure messages if the error is a
CypressError
instead of logging nothing it will now find the command associated to that error and display the same message as if you clicked the failed command.
0.6.11
Released 06/08/2015
Bugfixes:
-
.clear()
and.type()
no longer output additional error’d commands hen their associatedclick
fails. - Changed scrolling elements into view to use top strategy instead of bottom which fixes times where the middle of an element was not yet in he viewport. Fixes #42.
Misc:
-
.submit()
now errors if it’s been called on >1 form element. Fixes #41. - Coordinates and hitboxes are now logged and displayed on
.clear()
and.type()
.
0.6.10
Released 06/06/2015
Bugfixes:
- Improved clicking algorithm to reduce edge cases where element could not be clicked but should have been able to be clicked.
Misc:
-
.click()
accepts{force: true}
which will force it to issue the click event and bypass checking to ensure element is physically clickable. - Elements which are children of a container with
overflow
are automatically scrolled prior to a click (which is an abstraction around real user behavior). - Elements that are covering up an element you targeted for
.click()
are now logged out in the command console. - All elements are now logged out as real DOM elements instead of jQuery wrapped elements. This has several upsides. Chrome will allow you to immediately interact with these elements, drilling into their contents, displaying the element box model on hover, etc. This prevents you from having to expand the jQuery elements and click “Reveal in Elements Panel”.
0.6.9
Released 06/06/2015
Bugfixes:
- Custom commands no longer error out if they are the very first
cy
command.
0.6.8
Released 06/05/2015
Features:
-
cy.clearCookie()
andcy.clearCookies()
have been added as new commands. - Cypress will automatically clear all cookies before each test run.
- Named the spec + app iframe so that inside of Chrome Dev Tools the iframe selector will clearly distinguish which iframe is your application versus Cypress.
Bugfixes:
- Hitbox is no longer covered up by element layers on DOM revert.
- Finally tracked down and fixed edge case causing empty view to display when tests were not empty. Fixes #13
Misc:
-
cy.visit()
now accepts{log: false}
to prevent logging out (useful in custom commands). -
cy.contains()
is now scoped by default to the<body>
instead ofdocument
which prevents it from returning elements in thehead
liketitle
.
0.6.7
Released 06/04/2015
Features:
- When reverting the DOM, associated command elements are now automatically scrolled into view.
- Hitboxes are now displayed on the screen based on the actual coordinates where an
action command
event took place. - Click events now display event information about the
mousedown
/mouseup
/click
default action + propagation in the command console. - Preventing default action on
mousedown
will no longer give focus as per the spec. - Click events are now issued in the exact center of an element (taking into account 2d transforms) and provide the coordinates in the command console and in the actual event
- Click events now take into account whether the associated element is being covered up by another element, and will retry or fail with an exact error message if the click was unable to be issued due to this reason.
- Click events will now intelligently provide
focus
to the first focusable element on the stack at the click coordinates, or will givefocus
to the window. - Click events will issue the click to the topmost element based on the click coordinates and not necessarily to the element you requested to e clicked (which simulates exactly how a real click works). If this happens it is noted in the command console and provides the
Actual Element Clicked
.
Bugfixes:
- When hover over commands element layers (2d transforms like rotation) are now taken into account and displayed correctly.
- There was a bug when checking / unchecking
:checkbox
where it did not properly receive focus.
Misc:
- Click events are now replicated almost identically to the W3C click spec. They should behave for all intents and purposes, identically to real clicks in the browser.
0.6.6
Released 05/31/2015
Bugfixes:
- Fixed regression related to
cy.visit()
not re-visiting when current match matches remote url.
0.6.5
Released 05/23/2015
Features:
- When Cypress detects a regular HTTP page loading event (where we’re leaving the current page and requesting a new one) it will now insert a
loading
command which indicates to the user Cypress has stopped running commands until the new page loads. - If for some reason this new page errors Cypress will display the initial 500 error messages just like
cy.visit()
. - Cypress now waits
20s
(which matchescy.visit()
) for the new page to load instead of4s
previously.
Bugfixes:
-
.submit()
will actually submit the form for real now, instead of just firing the submit event. Now it’s been upgraded to be able to be canceled or have its returnValue set to false and will not submit the form. Don’t ask how I missed this one. I as once a young naive programmer who trusted the DOM not to be the abomination it actually is.
Misc:
- No longer send back a 500 message when initial response status code is 4xx.
0.6.4
Released 05/21/2015
Bugfixes:
- Host header HTTPS protocol handling fixed.
- Incorrectly handling query params on redirects fixed.
- Other header edge cases fixed.
0.6.3
Released 05/20/2015
Misc:
- Cypress should work with self signed SSL certificates now.
0.6.2
Released 05/20/2015
Bugfixes:
- Using the
length
option inquerying
ortraversal
commands now logs out in the Command Log. Fixes #40. - Other scenarios are fixed where command options would show incorrect number of object keys due to a bug in underscore’s
reduce
with an object that has alength
key. Fixes #35.
0.6.1
Released 05/15/2015
Bugfixes:
- Using the
length
option in traversal commands works properly now. Fixes #38. - Command logging now works even if no
cy
commands have been issued. Fixes #37.
Misc:
- Removed cy proxy commands:
each
,map
. These didn’t really “fit” into the concept of a command, and with.invoke()
or.its()
they’re accessible anyway, so nothing is really lost.
0.6.0
Released 05/14/2015
Features:
- Pushstate application routing now works 100% reliably with NO hacky overrides in all browsers.
- All incompatible
a
/link
/form
elements are transparently rewritten to be compatible including FQDN and protocol-lesshref
/src
. - Cookies are automatically cleared between page refreshes, during app startup, and leaving the test page.
- 3rd Party cookies are now additionally cleared. All cookies are now accessible to the client in preparation for
cy.clearCookies()
. - Manual navigation after tests run now works reliably.
- Navigating between full page refreshes during tests now works reliably.
Bugfixes:
- Server-side redirects are now completely transparently handled and supported.
- URLs are no longer altered in any weird way.
- Problematic
headers
are now automatically stripped from remote responses. - 3rd party
headers
are now properly proxied onto all responses. - Custom headers and other headers “of interest” are rewritten for transparent compatibility.
-
gzip
compression now handled and proxied correctly.
Misc:
- Completely overhauled the URL and proxy system used to serve remote applications.
- Drastically simplified the architecture required for proxying.
- Improved reliability for displaying the remote url.
- Namespaced all cypress internal routes.
- Many internal development / debugging processes improved.
- Added 100+ new tests surrounding serving remote content and processing requests.
- Renamed all remaining old references to
eclectus
. - All responses are now streamed using
content-encoding: chunked
.
0.5.15
Released 05/07/2015
Bugfixes:
- Reverted
window.location
overrides. This broke things in unexpected ways and after further testing would not have worked onFirefox
andIE
. It’s back to the drawing board (but I have some ideas). Apps usingpushState
routing are broken again.
0.5.14
Released 05/06/2015
Features:
- Cypress now works with JS applications that use
pushState
andreplaceState
routing (commonly known asHTML5 History
) without having to change any application code. - Cypress now always updates the remote URL whenever your application changes its URL through the vast variety of ways it can do this.
Bugfixes:
- Removed
iframe
andlink[rel=stylesheet]
elements during DOM revert. - Server instrument now correctly displays the number of responses their corresponding routes have had.
- Spies/Stubs/Mocks instrument now correctly displays the number of calls their corresponding methods have had.
- When users navigate between pages with commands, like
.click()
, Cypress now correctly waits until the age has finished loading before running more commands. Previously this waited for theunload
event, which did not fire synchronously, and ow we bind tobeforeunload
which does. Additionally Cypress checks to ensurebeforeunload
did not return a non-undefined value.
Misc:
- More changes to prepare for server adapters,
0.5.13
Released 05/04/2015
Features:
- New
cy.message
andcy.msg
commands in preparation forcypress-ruby
,cypress-node
,cypress-*
packages/gem to talk directly to your back end.
Bugfixes:
- Using
querying
ortraversal
commands will no longer throw a 2nd command error when using improper sizzle selectors. - Argument formatting display for command messages is fixed. There were instances of leading commas, or no commas on some commands.
Misc:
- Changed default port from
3000
to2020
to avoid standard port conflicts with commonly used back ends. Afterall, using Cypress is testing with 2020 vision. ;-) - Updated
bluebird
to2.9.25
. - Began implementation in preparation for cross browser testing coming sometime relatively soon.
0.5.12
Released 04/30/2015
Features:
- Introduced new command option
length
which cues Cypress into not resolving matched elements until their length matches the option provided.
Bugfixes:
-
cy.respond
will not resolve until all of the queue’d XHR’s have resolved.
Misc:
- Cypress now throws on
.should()
if any DOM member isn’t in the DOM, except forexist
assertions. - Cypress now throws on
eventually.have.length
assertions. Use implicit{length: n}
command options instead. - Cypress overrides chai
exist
assertion to really mean: “does this subject exist in the document?”
0.5.11
Released 04/29/2015
Bugfixes:
- Fixed missing
aliasType
from primitives and some DOM aliases, which prevent the background color from displaying in the UI.
Misc:
- Optimized performance for hovering / exiting commands. Heavily reduced the CPU on revert / restore the DOM.
0.5.10
Released 04/28/2015
Features:
-
cy.server()
now accepts adelay
option which will delay all responses to requests (including 404) based on the value in ms -
cy.server()
now accepts arespond
option which can turn off automatic responding to requests. -
cy.route()
now accepts adelay
option which overrides the delay option set incy.server()
to just matched requests. -
cy.route()
now accepts arespond
option which will turn off automatic responding to just matched requests. - Fixes #14.
-
cy.wait()
now accepts an alias property calledrequest
. Example:cy.wait('@getUsers.request')
which ill resolve once the XHR is initially requested, before it is responded to. This allows you to test things when a request is in flight. - Added
cy.respond
command which will respond to all pending requests when{respond: false}
is set in theserver
orroute
. -
.debug()
now displays pending requests and completed requests. - The command UI now displays pending requests as a
pending command
.
Misc:
- Updated
sinon
to1.14.1
.
0.5.9
Released 04/26/2015
Features:
- Added
.spread()
method which spreads an array as individual arguments to a callback function,like.then()
. - During an update Cypress will now display the updating message in the same coordinates as when the app was open by clicking the tray icon.
- After an update Cypress will now open back up and show itself in these same coordinates.
-
cy.wait()
can now accept an array of route aliases which will wait until all have completed. This array of resolved XHRs will become the next subject. - Each time an alias in used with a
cy.wait()
, Cypress will not resolve until the Nth request matching the outing alias responds. Fixes #4. -
cy.get()
has been upgraded to accept a routing alias. By default it will yield the last matched request, but also supports special alias properties which return a different request or potentially an array of requests.
0.5.8
Released 04/24/2015
Features:
-
.as()
can now alias primitives and objects other than routes or DOM. -
.as()
automatically assigns this alias torunnable.ctx
which makes it available synchronously. -
.as()
blacklists several reserved words and will throw if you attempt to alias as one of them. -
cy.get()
can now accept all alias types and will display the labels in the UI differently based on the alias type. - Cypress now displays a message when the Desktop App update is actually being applied instead of doing nothing and looking like it’s crashed.
Bugfixes:
-
.as()
now throws on empty strings or non string arguments. - Desktop App debug logs no longer sort in the wrong direction.
- Permissions are now restored during a cypress update for the
logs
andcache
. - Prevent 3rd party windows from gaining focus over main window.
Misc:
- Removed
cy.assign
, this has been folded into.as()
. - Updated
chokidar
to1.0.1
.
0.5.7
Released 04/23/2015
Features:
- The insanity that is URL parsing to figure out absolute, relative, absolute-path-relative, http, sub domains, and local files should work in most cases. In other words, Cypress has implemented the vast majority of url parsing based on the w3c URL spec.
Bugfixes:
- Prevent reverting the DOM while tests are running. Fixes #28.
- Fix edge case with forced focusing / blurring an element when document is not in focus and the element is no longer in the DOM.
- Visiting relative paths which are served from your file system works again.
- Visiting absolute paths in the iframe now displays the correct URL in the address bar again.
0.5.6
Released 04/22/2015
Features:
- Cypress now detects the difference between a forced async
done
test timeout vs a regular command timeout, and will throw the appropriate message indicating whether the user forgot to invokedone
or whether the timeout happened due to a command.
Bugfixes:
-
cy.visit()
now properly times out when theload
event does not occur within the time out window. - If a page loads after a
cy.visit()
times out it will no longer cause an exception in theonBeforeLoad
handler.
Misc:
- Increased
cy.visit()
timeout from 15s to 20s. -
cy.visit()
now throws a custom error message when it times out (instead of an incorrect / confusing default Mocha timeout message). - Using a
debugger
while running a test will no longer always cause the test to time out (yay!). - Override default Mocha timeout handling, replaced with custom logic. Removes many bizarre edge cases.
0.5.5
Released 04/20/2015
Features:
- When main app window comes into focus, it will automatically focus other peripheral windows.
- Added explicit error message when using child commands on a subject which has been detached or removed from the DOM.
- Cypress now detects when an async test is passed and not all commands have finished running. It will throw an explicit error message in this situation.
Misc:
- Error messages no longer break within words.
0.5.4
Released 04/20/2015
Features:
- Enhanced
.should()
to accepteventually
flag to automatically retry assertions until timeout is reached.
Misc:
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 tocy.contains()
. Fixes #24.
Misc
- Improved
onConsole
message forcy.focused()
when no element was returned. Fixes #23.
0.5.2
Released 04/17/2015
Bugfixes:
- Fixed missing files from deployment. Added tests around this.
0.5.1
Released 04/16/2015
Misc:
- Updated dependencies:
bluebird
,fs-extra
,sinon-as-promised
. - Updated
nw
to0.12.1
.
0.5.0
Released 04/15/2015
Misc:
- Snapshot source code.
0.4.7
Released 04/15/2015
Misc:
- Added automated functional NW tests during deployment in preparation for
0.5.0
release.
0.4.6
Released 04/11/2015
Features:
- Added “invisible” icon to a command when its matched element(s) are invisible.
- Running a single test will now automatically expand to display its commands.
- Any failing test will now automatically expand to display its commands.
- Failing tests which become passing will automatically collapse again.
0.4.5
Released 04/10/2015
Features:
- Added
cy.wrap()
command.
Bugfixes:
- Improved options logging and argument logging for all commands. Fixes #8.
0.4.4
Released 04/09/2015
Features:
Misc:
- Improved error messages for traversal failures. Errors now include the parent context DOM element. Fixes #11.
- Improved error messages for invalid
cy.route()
arguments. Fixes #20.
0.4.3
Released 04/09/2015
Features:
- Added functionality which enables
cy.server()
andcy.route()
to be created prior tocy.visit()
. The server and routes will apply to the next page which is visited. This allows you to stub requests which happen on page load. Suggested in #17. -
cy.visit()
now takes an optionalonBeforeLoad
callback option which is invoked when your page begins to ender but prior to its load event.
Misc:
- Improved error message when attempting to use
cy.agents
or anything else which requires a remote sandbox. Fixes #12.
0.4.2
Released 04/09/2015
Bugfixes:
- Remove accidental
debugger
left inuncaught
overloads (used only in Dev). - Prevent memory leak with Cypress helper listeners on every re-run of the tests.
- Prevent memory leak with custom 3rd party Cypress listeners in spec windows on every re-run of the tests.
- Prevent error from being thrown when
.only
‘s are switched in between active test runs.
0.4.1
Released 04/08/2015
Features:
-
javascripts
files can now utilizesnockets
,browserify
, orrequirejs
.
Bugfixes:
- Handle
javascripts
and preprocess them as we do regular specs. Fixes: #15. - Fixed an edge case when writing a test with a
done
callback alongsidecy
commands. This situation would always cause a timeout after 30 seconds even though the test would pass.
Misc:
- Internally refactored Cypress for easier testability / debuggability.
- Organized files around in preparation for OS release.
- Added lightweight module system / optimized Cypress listeners to prevent duplicated events.
- Changed url strategy for sending down
spec
files.
0.4.0
Released 04/02/2015
Features:
-
sinon-as-promised
is now a bundled extension. - tests without an
id
now run (with a random temporarily assigned id). - tests with a duplicate
id
to another test will now run (with a random temporarily assigned id). - tests or suites which are manually re-run from the UI now hide all of the other tests / suites.
Bugfixes:
- Fixed hook failure associated to wrong failed current test when
grep
was set. - Async tests which used a
cy
command and had adone
callback was always undefined. Now it’s back to real Mochafunction done(err)
. - Fixed bug in Mocha where it incorrectly associates
hook.ctx.currentTest
to the wrongtest
. Mocha Issue. -
cy.title()
no longer logs twice on a failure. - Fixed putting an
.only
on a large list of tests that would sometimes not clear the previous runnables in the UI.
Misc:
- Optimized first test run after hard refresh.
- Performance improvements on successive runnable iterations.
- Aborting currently running tests performance improvement.
- Live reload performance improvements when tests are changed.
- Added 100+ tests covering Runner + Reporter behavior.
- Aggressively cleaned up listeners after each test completion + run.
- Added additional
Cypress
events for 3rd party custom handling.
0.3.15
Released 03/28/2015
Misc:
- Drastically improved file watching on large projects with many tests. Instead of choking the CPU at nearly 100% indefinitely we now optimally watch the current working files for changes.
0.3.14
Released 03/27/2015
Bugfixes:
-
Socket.io
andchokidar
are now being cleaned up when a project is closed. Previouslychokidar
file watchers would stick around indefinitely causing a memory leak each time any project is closed and reopened.
0.3.13
Released 03/27/2015
Features:
-
cy.visit()
now detects a local url.localhost
,0.0.0.0
,127.0.0.1
can omit thehttp://
protocol.
Bugfixes:
-
cy.contains()
now properly escape quotes in the text. -
cy.visit()
now inserts a trailing slash intelligently into the correctpath
position (not after query params or hashes). -
cy.visit()
will no longer log 2 failed commands on error. - Hovering on commands which delay resolving their $el will now properly highlight again.
Misc:
-
.debug()
returns the current subject now. - upgraded jsUri to
1.3.0
. -
cy.visit()
now throws when url argument isn’t a string. -
Cypress.Log
instances now fireattrs:changed
event. Removedstate:change
event.
0.3.12
Released 03/26/2015
Bugfixes:
- Aliases which replay their commands will no longer break the current chain and therefore not unintentionally null our their subject for the ext command.
- Highlighting $el’s on DOM restore now works again.
- Asserting against
cy.focused()
will indent command logs now. - Prevent failed
.should()
andcy.to
from outputting a second error’d command log. - Removed memory leaks surrounding Mocha runner.
- Captured remote page uncaught errors again which fail corresponding tests.
- Captured spec iframe errors again and preserve their stack trace.
Misc:
-
cy.focused()
is now a parent command. - Memory usage improvements.
0.3.11
Released 03/25/2015
Bugfixes:
- Automatic command errors now properly show as errored commands.
-
.invoke()
now correctly checks for a subject before running.
Misc:
-
cy.Promise
(Bluebird) is now publicly available.
0.3.10
Released 03/24/2015
Bugfixes:
- Test duration is now correct and only updates when tests finish.
- Failing a hook will no longer continue to count the duration forever.
Misc:
- Bumped Mocha to 2.2.1
- Users now see a specialized error message when Cypress could not serve static files from the file system.
0.3.9
Released 03/24/2015
Features:
- Instead of waiting until commands resolve, commands are immediately inserted with a
pending
status. - Pending commands are now visually distinguishable.
- Created new
Cypress.Log
interface for greater control over the display of commands. - Available aliases are now logged in the console on
.debug()
.
Bugfixes:
- Allow projects to be scrolled when >4 are added.
-
.type()
accepts remaininginput[type=*]
that users can type into. - Cause + Effect commands are now logged in the correct order. IE, clicking something which causes another command to insert will be inserted correctly in the order they arrived
-
numRetries
is no longer shown in commands. -
.clear()
now logs a command. -
Promise.reduce
bugs are now fixed, causing events on a collection of elements in the synchronous wrong order. -
cy.chain
is now coercively returned instead ofcy
which prevents losing access to the subject in custom commands. - Trailing slashes are removed when serving initial files from the file system directly.
0.3.8
Released 03/22/2015
Features:
- Added icons + tray icons.
Bugfixes:
- Prevent cypress.app from showing in taskbar.
- Clicking on tray twice will toggle hide/show of app.
0.3.7
Released 03/21/2015
Features:
- Code Signed Mac App to prevent “Unidentified Developer” message on open.
0.3.6
Released 03/20/2015
Features:
- Added external link to changelog when checking for updates :-)
Bugfixes:
- Force trailing slash on all
cy.visit()
to fix relative linkshref="assets/app.js"
. - Fix sourceMappingURL browser bug
http:/localhost:4200/app.css.map
. - Fix test titles not being escaped due to refactoring.
0.3.5
Released 03/20/2015
Bugfixes:
- Fix missing
moment.js
frombower.json
. - Fix missing trailing slash from initial
cy.visit()
requests. - Fix missing
__initial=true
query param on initial redirects.
Misc:
- Updated $.simulate to 1.0.1.
0.3.4
Released 03/19/2015
Features:
-
.type()
now causes the subject to receivefocus
event. -
.type()
now causes previouslyfocused
elements to receiveblur
event/ - Typing
{enter}
now handles form submit logic as per the HTML spec.- Form with 1 input, no defaultButton.
- Form with 2 inputs, no defaultButton.
- Form with disabled defaultButton.
- Form with multiple defaultButtons.
- Correctly processes defaultButton click event, form submit event.
- Intelligently handle defaultPrevented events from descendants.
Bugfixes:
-
.clear()
now returns a promise.
Misc:
- Updated
bluebird
to2.9.14
.
0.3.3
Released 03/18/2015
Features:
- Filtered out Ajax requests for
.js
,.html
,.css
files by default. -
cy.server()
can configure whether this is turned on or off.
Bugfixes:
- Prevent
cy.server()
from slurping up Angular async template GETs.
Misc:
- Inlined Google Fonts into
vendor.css
.