All Versions
167
Latest Version
Avg Release Cycle
24 days
Latest Release
545 days ago

Changelog History
Page 1

  • v2.1.0 Changes

    November 10, 2022

    πŸ‘Œ Improvements

    πŸ‘Œ Improved handling of invisible elements

    • ⚑️ [Visibility criteria](xref:402833#visibility-criteria) update: TestCafe no longer interacts with elements that have the visibility: collapse attribute.
    • βœ… If the action target does not fit the visibility criteria, TestCafe outputs an error message that references the exact reason. (#7310).

    πŸ‘Œ Improved handling of overlapped elements

    • βœ… When another element overlaps the center of the action target, TestCafe scans the target element for available points of contact. If the selector timeout ends before TestCafe finds an unobstructed point, TestCafe outputs a warning message and interacts with the topmost element at the center of the original target (#7309).
    • βœ… TestCafe v2.1.0 contains an improved algorithm that detects whether extra scrolling can resolve an element obstruction issue. (#6208)

    πŸ› Bug Fixes

    • βœ… In some environments, TestCafe cannot take screenshots when the test runs in a headless Chromium-based browser (#7224).
    • βœ… Full-page screenshots in headless Chrome do not include the edges of the page (#5961).
    • βœ… TestCafe throws the "TypeError: Illegal invocation" error when the front-end code passes a number value to the Element.insertAdjacentText method (#7352).
  • v2.0.2 Changes

    October 31, 2022

    πŸ› Bug Fixes

    • βœ… TestCafe doesn't include the flags necessary to launch Chrome in a Podman container (PR #7307 by @timnederhoff)
    • βœ… TestCafe doesn't warn users when it interacts with an element that obstructs the original action target (#2930)
    • βœ… TestCafe incorrectly parses regular expressions passed to the --skip-js-errors CLI flag (#7301)
  • v2.0.1 Changes

    September 26, 2022

    πŸ› Bug Fixes

    • βœ… TestCafe yields incomplete video recordings in concurrency mode (#7218).
    • βœ… Video recordings in concurrency mode yield EPIPE errors that cause crashes (#7216).
    • βœ… Running TestCafe 1.20.1 and up with a high concurrency factor may nonetheless result in a MaxListenersExceededWarning warning (#7188).
  • v2.0.0 Changes

    August 31, 2022

    ⚑️ TypeScript update

    ⚠ > :warning: βœ… > TestCafe 2.0 includes a breaking change. ⚑️ The framework’s built-in TypeScript compiler has been updated from version 3.9 to version 4.7. The vast majority of TestCafe users should not experience any issues during the upgrade. However, since TypeScript does not follow the semver versioning policy, even minor TypeScript updates contain breaking changes. Some TypeScript users may need to perform additional actions to ensure the compatibility of their test code.

    πŸ“š Read the TestCafe 2.0 Migration Guide to learn more.

    πŸ‘Œ Improvement: New ways to ignore JavaScript errors

    βœ… TestCafe v2.0 introduces new ways to ignore JavaScript errors during test runs.

    βœ… Two new methods allow you to ignore errors on a per-test or a per-fixture basis.

    • πŸ“š Use the test.skipJsErrors method to ignore JavaScript errors in specific tests.
    • πŸ“š Use the fixture.skipJsErrors method to ignore JavaScript errors for specific fixtures.
    • πŸ“š The t.skipJsErrors action lets you ignore JavaScript errors at specific points in the test.

    For each of the methods above, you can define the following options:

    • The pageUrl option filters errors by page URL.
    • The message option filters errors by message.
    • The stack option filters errors by call stack.

    πŸ“š Read the Skip JavaScript Errors recipe to learn more.

  • v1.20.1 Changes

    August 08, 2022

    πŸ› Bug Fixes

    • βœ… Running 11 or more tests concurrently causes a memory leak (#7188).
    • βœ… TestCafe cannot switch to iframes that descend from a shadowRoot element (#3673).
    • βœ… TestCafe attempts to execute JSON files without fixture and test definitions (PR #7187).
    • βœ… TestCafe incorrectly processes request hooks that return status code 500 (#7213)
  • v1.20.0 Changes

    July 14, 2022

    ⚠ > :warning: βœ… > Warning: Impending breaking change. βœ… > TestCafe v1.20 is the final version of the framework to support TypeScript 3. ⚑️ > The next update will abandon TypeScript 3 in favor of TypeScript 4.

    βœ… TestCafe v1.20.0 includes two major capabilities: an API testing toolkit and the ability to set a global test page URL. Additionally, TestCafe 1.20.0 introduces experimental support for Chrome User Flow Replays, as well as a number of under-the-hood improvements.

    βœ… API Testing

    βœ… TestCafe v1.20.0 includes a comprehensive set of server-side API testing tools. You can add dedicated API tests to your test suite, or include API testing methods in existing functional tests.

    πŸ“š The new Request test action executes an HTTP request and returns the server's response.

    const responseBody = await t.request(`http://localhost:3000/helloworld`).body;
    
    t.expect(responseBody).contains('Hello World') // true
    

    πŸ“š Read the API Testing Guide for a full overview of the framework's API testing capabilities.

    Global starting URL

    πŸ“š You can now define a single starting URL for all the tests in your test suite.

    Declare the baseUrl in one of the following three ways:

    βœ… Once you define a baseUrl, you can omit fixture and test URLs entirely, or define them relative to your baseUrl:

        "baseUrl": "https://devexpress.github.io/testcafe"
    
    fixture`Test structure`
        .page`./example`; // starts at https://devexpress.github.io/testcafe/example
    

    Experimental: Chrome User Flow Replays

    TestCafe v1.20.0 introduces experimental, limited support for Google Chrome user flow recordings.

    βœ… Record page actions in Google Chrome and export the recording as a JSON file. TestCafe will play the recording back just like it would a generate a test report

    πŸ“š Read the User Flow Recordings guide to learn more.

    βœ… Coming in TestCafe 2.0: TypeScript 4

    βœ… The next version of TestCafe will adopt TypeScript 4 and lose compatibility with TypeScript 3.X.

    To indicate the breaking change, we will increment the framework's major version number - from 1 to 2.

    πŸš€ TestCafe 2.0 will be released later this month.

    πŸ‘Œ Improvements

    • πŸ‘ Better Google Chrome video capture

      TestCafe v1.20.0 uses the Screen Capture API to record videos of Google Chrome test runs. This results in a significantly better test recording framerate and image quality.

      Screen capture comparison GIF

    πŸ› Bug Fixes

    • βœ… When the t.typeText action raises an error, TestCafe mistakenly awaits the target element for the second time (#6623)

    • βœ… Concurrent test runs do not always generate concurrent test run reports (#7062)

    • βœ… TestCafe doesn't properly handle errors raised inside the requestMock function (#6703)

    • βœ… The default terminal viewport width is too low for non-tty terminals (Issue #5919, PR #6930 by @PayBas)

    • βœ… TestCafe cannot switch to an invisible iframe (#4558)

    • ⚑️ Update incorrect TypeScript definitions (PR #7069 by @karolnowinsky)

    • βœ… Some SVGs don't meet the visibility criteria (#6998)

  • v1.19.0 Changes

    May 26, 2022

    βœ… TestCafe v1.19.0 introduces three major capabilities: a Cookie Management API, suite-wide test hooks, and suite-wide request hooks.

    πŸ†• New Capabilities

    Cookie Management

    πŸ“š Previous versions of TestCafe lacked dedicated cookie management methods. Users had to write custom client functions to add and remove cookies. This technique was complicated and, at times, limiting. Some cookie manipulation actions --- such as HTTP-only cookie management --- were very hard to integrate into the test suite.

    πŸ“š The latest version of the framework includes a proper set of cookie management tools that can handle a wide variety of tasks. Learn more about the new methods in our documentation: deleteCookies, getCookies, setCookies.

    fixture('[API] Delete Cookies')
       .page('https://devexpress.github.io/testcafe/example/');
    
    test('Should delete all the cookies with the specified url', async t => {
       // Set a cookie for the examples page.
       await t.setCookies({ name: 'apiCookie1', value: 'value1' });
    
       // Set a cookie for the 'thank you' page.
       await t.setCookies({
           name:  'apiCookie2',
           value: 'value2',
       }, 'https://devexpress.github.io/testcafe/example/thank-you.html');
    
       // Check the cookies.
       let cookies = await t.getCookies();
    
       await t
           .expect(cookies.length).eql(2)
           .expect(cookies[0]).contains({ name: 'apiCookie1', path: '/testcafe/example/' })
           .expect(cookies[1]).contains({ name: 'apiCookie2', path: '/testcafe/example/thank-you.html' });
    
        // Delete cookies from the 'thank you' page.
        await t.deleteCookies({ domain: 'devexpress.github.io', path: '/testcafe/example/thank-you.html' });
    
        // Check the cookies.
        cookies = await t.getCookies();
    
        await t
            .expect(cookies.length).eql(1)
            .expect(cookies[0]).contains({ name: 'apiCookie1', path: '/testcafe/example/' });
    });
    

    βœ… Global Test Hooks

    βœ… Many TestCafe users employ test hooks --- functions that run before and after tests and fixtures. In TestCafe v1.19.0 and higher, you can attach hooks to test runs, as well as apply test hooks to your entire suite. This capability requires the use of a JavaScript configuration file.

    πŸ“š Learn more about hooks from our newly updated hook guide.

    Global Request Hooks

    Request hooks are functions that intercept HTTP requests and mock HTTP responses. Earlier versions of TestCafe let you attach request hooks to one test or fixture at a time. You can now define global request hooks and attach them to multiple tests or fixtures in your suite.

    πŸ“š Read the Request Hooks guide to learn more.

    ### Bug Fixes

    • TestCafe ignores CLI browser arguments when they conflict with the configuration file (#6618)

    • The outdated moment.js dependency contains a critical vulnerability (PR #6996 by @vergilfromadyen)

    • TestCafe proxy doesn't always serve cookies with the secure attribute (testcafe-hammerhead/#2715)

  • v1.18.6 Changes

    April 18, 2022

    πŸ› Bug Fixes

  • v1.18.5 Changes

    March 31, 2022

    πŸ› Bug Fixes

    • The t.scrollIntoView method causes the "Element is not visible" error when the target's overflow property is hidden (#6601)

    • TestCafe triggers click events for label elements even when the input is disabled (#6949)

    • TestCafe hangs when you change the active window between two consecutive assertions (#6037)

    • TestCafe cannot take screenshots when using the LambdaTest browser provider (#6887)

    • Pages that target a missing <iframe>(testcafe-hammerhead/#2178 element with the Element.focus method yield a ""TypeError: window.location.toString is not a function" error.

    • TestCafe causes errors when it encounters XMLHTTPRequest calls that fetch resources from blob: URLs (testcafe-hammerhead/#2634)

    • HTMLElement.removeAttributeNode method calls yield unjustified exceptions (PR testcafe-hammerhead/#2742 by @TrevorKarjanis)

  • v1.18.4 Changes

    February 21, 2022

    What’s Changed