2.0.0
Released Released on February 14, 2018
Breaking Changes:
The built in default
Electronbrowser has been bumped from version53to59. This version represents the version ofChromiumthat Electron is using. In other words, runningcypress run(or viaElectron) will be like running your tests inChrome 59now. 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 is
trueby 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-Controlheaders 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
--specoption is now normalized against the current working directorycwdinstead 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 blocking 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
--configCLI flag.Spies and Stubs created with cy.stub() and cy.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 newauthoption to specify theusername/passwordusingcy.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
localorlocalhostwas not used as atld. Fixes #1292 and #1278.Removed the flag
--disable-background-networkingfrom 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.jsonin 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.0delete the following folders:OSX:
~/Library/Caches/CypressLinux:
~/.cache/CypressWindows:
%APPDATA%\Cypress\cy\production\browsers