6.2.0
Released Released on December 20, 2020
Features:
You can now listen to
before:run,after:run,before:specandafter:specevents in the plugins file when setting the experimentalRunEvents configuration option totrue. See thebefore:run,after:run,before:specandafter:specdocs for more information. Addressed in #9646, #14178 #14238 and #14263.The
Timed out retryingerror message now displays the amount of time Cypress retried. Addresses #5781.The RouteMatcher argument for cy.intercept() has a new
matchUrlAgainstPathproperty. When set totrue, Cypress will match the suppliedurlagainst incomingpaths. Addressed in #14241.
Bugfixes:
Passing a URL as a string or RegExp to cy.intercept() will automatically set
matchUrlAgainstPathtotrue. This means that the supplied string or RegExp will be matched against the path if matching against the URL fails. Fixes #9379 and #14256.Getting an alias of cy.intercept() using cy.get() will no longer always yield
null. Fixes #9306.cy.intercept() will now automatically responds to CORS preflight requests (HTTP
OPTIONSrequests) that match defined routes. Fixes #9599.Response errors from
forceNetworkErrorcan now be awaited using cy.intercept() and cy.wait(). Fixes #9062.Using cy.log() inside .then() no longer breaks the subject value in the command chain. Fixes #8084.
Using Cypress.Commands.overwrite to overwrite .then() now preserves the proper
thiscontext and sets aliases correctly. Fixes #5101.Using Cypress.Commands.overwrite to overwrite
cy.route()or cy.intercept() and wait on its alias now properly works. Fixes #3890 and #9580.Cypress no longer fails to find specs if you set the fixtures folder to be the same as the integration folder. Fixes #14226.
Cypress no longer fails to show error code frames if the spec filename has a space in it, fixes #7553.
Misc:
scrollBehavioris now an allowed type when passed as test configuration. Addresses #9643.The
FileObjecttype for the file argument of thefile:preprocessorevent now includes theEventEmittertype. Addresses #9276.
Dependency Updates:
Upgraded
electronfrom11.0.2to11.0.3. Addressed in #9409.