Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

testcafe

Package Overview
Dependencies
Maintainers
6
Versions
464
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

testcafe - npm Package Versions

1
47

1.17.0

Diff

Changelog

Source

v1.17.0 (2021-11-02)

Enhancements

Global Test and Fixture Hooks

You can now specify global test and fixture hooks. TestCafe attaches these hooks to every test / fixture in the test suite.

module.exports = {
    hooks: {
        fixture: {
            before: async (ctx) => {
                // your code
            },
            after: async (ctx) => {
                // your code
            }
        },
        test: {
            before: async (t) => {
                // your code
            },
            after: async (t) => {
                // your code
            }
        }
    }
};
Execution Timeouts

You can now specify custom timeouts for tests and test runs. If a test/test run is idle or unresponsive for the specified length of time, TestCafe terminates it. Specify these timeouts in the configuration file or from the command line.

Command line interface

testcafe chrome my-tests --test-execution-timeout 180000
testcafe chrome my-tests --run-execution-timeout 180000

Configuration file

{
    "runExecutionTimeout": 180000,
    "testExecutionTimeout": 180000
}

Bug Fixes

  • TestCafe fails to continue the test after the user downloads a file. (#6242).
  • The TestCafe proxy does not fire the "unpipe" event when necessary. This omission leads to the "This socket has been ended by the other party" error (#6558).
  • TestCafe incorrectly handles rewritten uninitialized iframes (testcafe-hammerhead/#2694, testcafe-hammerhead/#2693).
belym.a.2105
published 1.17.0-rc.1 •

belym.a.2105
published 1.16.1 •

Changelog

Source

v1.16.1 (2021-10-05)

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)
belym.a.2105
published 1.16.1-alpha.1 •

belym.a.2105
published 1.16.0 •

Changelog

Source

v1.16.0 (2021-09-08)

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).
belym.a.2105
published 1.16.0-rc.2 •

farfurix
published 1.16.0-rc.1 •

farfurix
published 1.15.3 •

Changelog

Source

v1.15.3 (2021-08-19)

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).
belym.a.2105
published 1.15.3-rc.1 •

farfurix
published 1.15.2 •

Changelog

Source

v1.15.2 (2021-08-11)

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).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc