TestCafe v0.22.0 Released

Write tests in CoffeeScript, view failed selector methods in test run reports and detect server-side errors and unhandled promise rejections.

Enhancements

⚙ CoffeeScript Support (#1556) by @GeoffreyBooth

TestCafe now allows you to write tests in CoffeeScript. You do not need to compile CoffeeScript manually or make any customizations - everything works out of the box.

import { Selector } from 'testcafe'

fixture 'CoffeeScript Example'
    .page 'https://devexpress.github.io/testcafe/example/'

nameInput = Selector '#developer-name'

test 'Test', (t) =>
    await t
        .typeText(nameInput, 'Peter')
        .typeText(nameInput, 'Paker', { replace: true })
        .typeText(nameInput, 'r', { caretPos: 2 })
        .expect(nameInput.value).eql 'Parker';

⚙ Failed Selector Method Pinpointed in the Report (#2568)

Now the test run report can identify which selector’s method does not match any DOM element.

Failed Selector Report

⚙ Fail on Uncaught Server Errors (#2546)

Previously, TestCafe ignored uncaught errors and unhandled promise rejections that occurred on the server. Whenever an error or a promise rejection happened, test execution continued.

Starting from v0.22.0, tests fail if a server error or promise rejection is unhandled. To return to the previous behavior, we have introduced the skipUncaughtErrors option. Use the –skip-uncaught-errors flag in the command line or the skipUncaughtErrors option in the API.

testcafe chrome tests/fixture.js --skipUncaughtErrors
runner.run({skipUncaughtErrors:true})

⚙ Use Glob Patterns in runner.src (#980)

You can now use glob patterns in the runner.src method to specify a set of test files.

runner.src(['/home/user/tests/**/*.js', '!/home/user/tests/foo.js']);

Bug Fixes