Socket
Book a DemoInstallSign in
Socket

testcafe

Package Overview
Dependencies
Maintainers
4
Versions
466
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

testcafe - npm Package Versions

1
â€Ĥ
79
â€Ĥ
47

2.0.0

Diff
b
belym.a.2105
published 2.0.0 •

Changelog

Source

v2.0.0 (2022-08-31)

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.

b
belym.a.2105
published 2.0.0-rc.4 •
b
belym.a.2105
published 2.0.0-rc.3 •
b
belym.a.2105
published 1.20.2-alpha.1 •
b
belym.a.2105
published 1.20.1 •

Changelog

Source

v1.20.1 (2022-08-08)

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)
b
belym.a.2105
published 1.20.1-rc.2 •
b
belym.a.2105
published 1.20.1-rc.1 •
b
belym.a.2105
published 1.20.0 •

Changelog

Source

v1.20.0 (2022-07-14)

: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)

b
belym.a.2105
published 1.20.0-rc.1 •
b
belym.a.2105
published 1.20.0-alpha.1 •
1
â€Ĥ
79
â€Ĥ
47
SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with âšĦ️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.