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 the t.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 and attemptLimit - that allow you specify when TestCafe must stop.

    โœ… The attemptLimit variable determines the maximum possible number of test attempts. โœ… The successThreshold 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)