TestCafe v1.15.0 Release Notes
Release Date: 2021-07-08 // almost 3 years ago-
โจ Enhancements
โ Dispatch DOM events (PR #6103)
t.dispatchEvent(target, eventName[, options])
๐ The
t.dispatchEvent
method lets you interact with the page in ways that TestCafe does not support out of the box. To implement an unsupported user action, break it down into discrete DOM events, and use thet.dispatchEvent
method to fire them.โ >Internet Explorer does not support event constructors. As such, TestCafe cannot dispatch DOM events in this browser.
The following example fires a
touchstart
action on an element with the 'button' id:await t.dispatchEvent('#button', 'touchstart', { eventConstructor: 'TouchEvent' });
๐ Read the Custom Actions Guide for more information on DOM events and event constructors.
โ Quarantine mode customization (PR #6073 by @rob4629)
๐ New settings are available in quarantine mode. Quarantine mode repeats failing tests to help users get conclusive test results in sub-optimal conditions. TestCafe v1.15 adds two variables -
successThreshold
andattemptLimit
- that allow you specify when TestCafe must stop.โ The
attemptLimit
variable determines the maximum possible number of test attempts. โ ThesuccessThreshold
variable determines the number of successful attempts necessary for the test to pass.testcafe chrome ./tests/ -q attemptLimit=5, successThreshold=2
โ Password obfuscation (#6014)
๐ TestCafe reporters no longer receive the contents of
password
input fields, unless you explicitly specify otherwise. This improves security for users that store their test results online.๐ Support for non-HTML documents (#1471)
โ TestCafe now has the capability to proxy non-HTML documents such as XML and text files. Tests no longer hang upon redirection to a non-HTML address.
๐ Bug Fixes
- โ TestCafe doesn't raise an error if users specify the CDP port but do not enable concurrency (PR #6268).
- โ TestCafe incorrectly processes elements with negative tabIndex values (#4848).
- โ TestCafe incorrectly processes some eventListeners in multi-window mode (#5621).
- โ TestCafe incorrectly processes the <base> HTML tag (testcafe-hammerhead/#1965).
- โ
TestCafe doesn't intercept
Navigator.prototype
requests (PR testcafe-hammerhead/#2643 by @michaelficarra). - โ
TestCafe doesn't intercept
WorkerGlobalScope.importScripts()
arguments (testcafe-hammerhead/#2521). - โ A website parsing error causes test failure (testcafe-hammerhead/#2650).
- โ TestCafe stops recording test videos after you skip a fixture (#6163).
- ๐ Links with empty
download
attributes cause TestCafe to hang (#6132). - โ TestCafe reports incorrect line numbers (#5642).
- โ TestCafe incorrectly processes some for-of statements (PR testcafe-hammerhead/#2632).
- โ TestCafe sometimes directs window location queries to non-window objects (testcafe-hammerhead/#2611).
- ๐ Performance enhancement: obtaining element attributes (#6117)