3.0.2
Released Released on June 27, 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
EPIPEerrors when runningcypress runin 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 returntrueif 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
integrationFolderin Windows would lead to errors with plugins. Fixes #1704.Cypress no longer crashes when a 3rd party server sends invalid
gzipcontent. Also fixed issues with incorrectly gunzipping multibyte characters which would potentially lead to serving invalid HTML or JS. Fixes #1396 and #1756.The
--silentflag should now be respected duringnpm install cypresson 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
pluginsFilenow supports an absolute path instead of just a relative one. Fixes #1837.Fixed a regression introduced in
3.x.xwhere application code that usedsetTimeoutwith 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 runmode. Additionally we have optimized the code path to not read in the localstate.jsonunnecessarily. 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:launchwhen 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, and cypress cache clear. Fixes #1856.
We've added a new CLI flag:
--no-exitfor cypress 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
.npmrcfile. Fixes #1399 and #1853.Significantly improved the performance of taking screenshots. #1863.
The bundled version of FFmpeg has now been bumped from
3.x.xto4.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 installmessage 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.jswill save screenshots inside of this directory:cypress/screenshots/foo/bar_spec.js/*. Fixes #1826.Passing
foo/bar/bazas the fileName arg to cy.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
onAfterScreenshotandonBeforeScreenshotcallbacks ar enow invoked for failed tests. They include atestFailureproperty to distinguish between automatic ones and your own use ofcy.screenshot(). Fixes #2040.There's now an
after:screenshotplugin event you can use in yourpluginsFileto 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.browserobject which contains information about the currently running browser. Fixes #1919 and #1961.Added
Cypress.specobject 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: