8.2.0

Released Released on August 3, 2021

Features:

  • You can now cache and restore cookies, localStorage, and sessionStorage in order to reduce test setup times by using cy.session(). The session API is experimental and can be enabled by setting the experimentalSessionSupport flag to true in your Cypress config. See our blog and the cy.session() doc for more detail.

  • The logging experience around HTTP requests has been updated.

    • fetch requests are always displayed in the Command Log, regardless of if experimentalFetchSupport is enabled.

    • Duplicate logs for XHRs, fetches, and cy.intercept() have been consolidated - Fixes #14843.

    • The user experience around the information displayed in the console when clicking on cy.intercept() request logs has been improved.

    • Request logs now indicate if a request has gone to the origin or if it has been stubbed by displaying a filled or empty circle in the request log.

    • Request logs now display information about if the request and/or response was modified by a cy.intercept().

    • The tooltip displayed when mousing over a request log now displays information about the matched cy.intercept()/cy.route() rules.

    • Fixed an issue where pending request logs were not ended between tests. Fixes #14655.

  • There's now a Cypress.currentTest property to access name the currently executing test via Cypress.currentTest.title and Cypress.currentTest.titlePath. Addresses #2972.

Bugfixes:

  • A "removing cookie failed" error will no longer throw when cookies are cleared in Firefox. Fixes #6375.

  • Cypress no longer throws the error "cannot read property split of undefined" in certain circumstances when application errors are thrown. Fixes #17378.

  • Cypress now properly runs the final test when nested in a suite with a before hook. Fixes #9026.

  • Fixed a regression in 8.0.0 where an error would longer throw when there is no /etc/passwd entry for the current user, such as in some Docker and GitHub Action setups. Fixes #17415.

  • Cypress now throws if a function is incorrectly passed as the second argument to cy.wait(). Fixes #17436.