All Versions
151
Latest Version
Avg Release Cycle
16 days
Latest Release
23 days ago

Changelog History
Page 1

  • v1.16.1 Changes

    October 05, 2021

    🐛 Bug Fixes

    • ✅ Incorrect handling of the beforeInput Firefox event (#6504)
    • 💅 Incorrect handling of page styles leads to test failure in Safari 15 (#6546)
    • 💅 Incorrect stylesheet filtering procedure leads to client-side errors in IE11 (#6439)
  • v1.16.0 Changes

    September 08, 2021

    ✨ Enhancements

    👌 Support for JavaScript configuration files

    🔧 You can now store TestCafe settings in a js file. Configuration properties in JavaScript files can reference JavaScript methods, functions and variables, which makes it easy to create dynamic configuration files.

    Just export the JSON name/value pairs in the file:

    module.exports = {
        skipJsErrors: true,
        hostname: "localhost",
        // other settings
    }
    

    👌 Support for custom user variables in the configuration file

    🔧 TestCafe v1.16.0 and later supports configuration files with variable declarations. Users can reference variables from a configuration file in the tests that utilize that configuration file. To enable access to configuration file variables, import the userVariables object from the testcafe module at the beginning of the test script.

    🚚 This capability can come in handy if there's a single piece of data you want to use in multiple tests — for example, the website's URL. That way, if your website moves to a new domain name, you don't have to change your tests one by one.

    If you previously used environment variables to achieve the same goal, you might prefer the new method — it significantly simplifies the setup process, and allows you to commit the data to a version control system.

    Define your custom variables with the userVariables JSON object:

    {
      "userVariables": {
        "url": "http://devexpress.github.io/testcafe/example",
      }
    }
    

    ✅ Reference this variable in your test:

    import { userVariables } from 'testcafe';
    
    fixture `Test user variables`
        .page(userVariables.url);
    
    test('Type text', async t => {
        await t
            .typeText('#developer-name', 'John Smith')
            .click('#submit-button');
    });
    

    Other enhancements

    • 🆕 New option that disables thumbnail generation for test screenshots (PR by @taki-fw).
    • 🆕 New embedding-utils API method that retrieves information about skipped tests (PR by @flora8984461).
    • ✅ The Runner.filter function supports asynchronous arguments (PR by @eignatyev).
    • ✅ You can import the test and fixture objects directly from the testcafe module (PR #6338).

    🐛 Bug Fixes

    • ✅ TestCafe does not keep track of file changes in live mode (#6481).
  • v1.15.3 Changes

    August 19, 2021

    🐛 Bug Fixes

    • ✅ TestCafe throws an error if you use the 'all' alias in the command line to run tests in all installed browsers (#6456).
    • 🔧 TestCafe does not check if the configuration file exists (#6337).
    • ✅ TestCafe cannot disable HTTP/2 to avoid compatibility issues (testcafe-hammerhead/#2681).
    • ✅ TestCafe works incorrectly if you use extended Function objects (testcafe-hammerhead/#2439).
    • ✅ TestCafe processes a test application incorrectly if it uses the Immutable.js library (testcafe-hammerhead/#2669).
    • ✅ TestCafe adds an element incorrectly into a nested body element (PR testcafe-hammerhead/#2682).
  • v1.15.2 Changes

    August 11, 2021

    🐛 Bug Fixes

    • ✅ TestCafe fails to emulate the tab action if a page contains a cross-domain iframe (#6405).
    • 🔧 TestCafe ignores the quarantine mode options if you specify the configuration file (#6420).
    • ✅ TestCafe test fails if you specify a custom option as a command line argument (#6426)
    • The ERR_HTTP2_GOAWAY_SESSION error occurs randomly when you use HTTP/2 protocol (testcafe-hammerhead/#2653).
    • ✅ TestCafe fails if a page contains overridden getters for target elements (testcafe-hammerhead/#2662).
    • ✅ TestCafe incorrectly processes scripts that destruct empty elements (testcafe-hammerhead/#2670).
  • v1.15.1 Changes

    July 28, 2021

    🐛 Bug Fixes

    • ✅ The Element.getAttribute method returns an incorrect value (#5984).
    • ✅ TestCafe test fails when you forget to include the await keyword before the assertion statement (#4613).
    • ✅ TestCafe fails to focus an element inside a shadow DOM (#4988).
    • ✅ TestCafe fails to focus SVG elements (#6262).
    • ✅ TestCafe raises the blur event when you focus a non-focusable element (#6236).
    • ✅ TestCafe test hangs when you click a link within a cross-domain iframe (#6331).
    • ✅ TestCafe loads the Babel compiler libraries multiple times (#6310).
    • ✅ TestCafe incorrectly parses the meta refresh tags (#2663)
    • ✅ TestCafe incorrectly processes iframe elements with the "srcdoc" attribute (#2647).
    • ✅ TestCafe incorrectly specifies the Referer HTTP request header if you use the "navigateTo" action (#2607).
    • ✅ An error related to the bug in Node.js occurs (#2655).
  • v1.15.0 Changes

    July 08, 2021

    ✨ 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)
  • v1.14.2

    May 13, 2021
  • v1.14.1

    May 12, 2021
  • v1.14.0

  • v1.13.0 Changes

    March 22, 2021

    🛠 This release adds support for custom paths to the configuration file, support for Microsoft Edge on Linux systems, and multiple bugfixes.

    ✨ Enhancements

    🔧 :gear: Specify Custom Path to the TestCafe Configuration File (PR #6035 by @Chris-Greaves)

    📚 TestCafe now allows you to specify a custom configuration file path.

    To set this path, use one of the following options:

    ➕ Add Support for Microsoft Edge on Linux (PR testcafe-browser-tools/#210 by @dcsaszar)

    🐧 If you follow the Microsoft Edge Insider Channels for Linux and have Microsoft Edge installed on your Linux machine, you can now launch TestCafe tests in this browser.

    testcafe edge tests/test.js
    

    ✅ :gear: Deprecated the t.setPageLoadTimeout method (PR #5979)

    📚 Starting with v1.13.0, the t.setPageLoadTimeout method is deprecated. To set the page load timeout, use the new test.timeouts method.

    fixture`Setting Timeouts`
        .page`http://devexpress.github.io/testcafe/example`;
    
    test
        .timeouts({
            pageLoadTimeout: 2000
        })
        ('My test', async t => {
            //test actions
        })
    

    📚 You can also use test.timeouts to set the pageRequestTimeout and ajaxRequestTimeout.

    fixture`Setting Timeouts`
        .page`http://devexpress.github.io/testcafe/example`;
    
    test
        .timeouts({
            pageLoadTimeout:    2000,
            pageRequestTimeout: 60000,
            ajaxRequestTimeout: 60000
        })
        ('My test', async t => {
            //test actions
        })
    

    🐛 Bug Fixes

    • 🛠 Fixed a bug where TestCafe would sometimes be unable to trigger a hover event on a radio element (#5916)
    • 🛠 Fixed a bug where TestCafe was unable to register a Service Worker due to the wrong currentScope calculation inside a Window.postMessage call (testcafe-hammerhead/#2524)
    • RequestLogger now shows a correct protocol for WebSocket requests (testcafe-hammerhead/#2591)
    • ✅ Test execution now pauses when the browser window is in the background (testcafe-browser-tools/#158)
    • ✅ TestCafe now appends an extension to screenshot filenames (#5103)
    • 🛠 Fixed a bug where TestCafe would emit test action events after the end of a test run (#5650)
    • ✅ TestCafe now closes if the No tests to run error occurs in Live mode (#4257)
    • 🛠 Fixed a freeze that happened when you run a test suite with skipped tests (#4967)
    • 🛠 Fixed an error where a documentElement.transform.translate call moved the TestCafe UI in the browser window (#5606)
    • ✅ TestCafe now emits a warning if you pass an unawaited selector to an assertion (#5554)
    • 🛠 Fixed a crash that sometimes occurred in Chrome v85 and earlier on pages with scripts (PR testcafe-hammerhead/#2590)