zhenyulin / ultimate-hot-boilerplate

πŸš€ node-react universal app boilerplate with everything on hot reload, SSR, GraphQL, Flow included
MIT License
35 stars 4 forks source link

Update testcafe to the latest version πŸš€ #63

Open greenkeeper[bot] opened 6 years ago

greenkeeper[bot] commented 6 years ago

Version 0.21.0 of testcafe was just published.

Dependency testcafe
Current Version 0.20.5
Type devDependency

The version 0.21.0 is not covered by your current version range.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

It might be worth looking into these changes and trying to get this project onto the latest version of testcafe.

If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


Release Notes v0.21.0

v0.21.0 (2018-8-2)

Enhancements

βš™οΈ Test Web Pages Served Over HTTPS (#1985)

Some browser features (like Service Workers, Geolocation API, ApplePaySession, or SubtleCrypto) require a secure origin. This means that the website should use the HTTPS protocol.

Starting with v0.21.0, TestCafe can serve proxied web pages over HTTPS. This allows you to test pages that require a secure origin.

To enable HTTPS when you use TestCafe through the command line, specify the --ssl flag followed by the HTTPS server options. The most commonly used options are described in the TLS topic in the Node.js documentation.

testcafe --ssl pfx=path/to/file.pfx;rejectUnauthorized=true;...

When you use a programming API, pass the HTTPS server options to the createTestCafe method.

'use strict';

const createTestCafe        = require('testcafe');
const selfSignedSertificate = require('openssl-self-signed-certificate');
let runner                  = null;

const sslOptions = {
    key:  selfSignedSertificate.key,
    cert: selfSignedSertificate.cert
};

createTestCafe('localhost', 1337, 1338, sslOptions)
    .then(testcafe => {
        runner = testcafe.createRunner();
    })
    .then(() => {
        return runner
            .src('test.js')

            // Browsers restrict self-signed certificate usage unless you
            // explicitly set a flag specific to each browser.
            // For Chrome, this is '--allow-insecure-localhost'.
            .browsers('chrome --allow-insecure-localhost')
            .run();
    });

See Connect to TestCafe Server over HTTPS for more information.

βš™οΈ Construct Screenshot Paths with Patterns (#2152)

You can now use patterns to construct paths to screenshots. TestCafe provides a number of placeholders you can include in the path, for example, ${DATE}, ${TIME}, ${USERAGENT}, etc. For a complete list, refer to the command line --screenshot-path-pattern flag description.

You specify a screenshot path pattern when you run tests. Each time TestCafe takes a screenshot, it substitutes the placeholders with actual values and saves the screenshot to the resulting path.

The following example shows how to specify a screenshot path pattern through the command line:

testcafe all test.js -s screenshots -p "${DATE}_${TIME}/test-${TEST_INDEX}/${USERAGENT}/${FILE_INDEX}.png"

When you use a programming API, pass the screenshot path pattern to the runner.screenshots method.

runner.screenshots('reports/screenshots/', true, '${TEST_INDEX}/${OS}/${BROWSER}-v${BROWSER_VERSION}/${FILE_INDEX}.png');

βš™οΈ Add Info About Screenshots and Quarantine Attempts to Custom Reports (#2216)

Custom reporters can now access screenshots' data and the history of quarantine attempts (if the test run in the quarantine mode).

The following information about screenshots is now available:

  • the path to the screenshot file,
  • the path to the thumbnail image,
  • the browser's user agent,
  • the quarantine attempt number (if the screenshot was taken in the quarantine mode),
  • whether the screenshot was taken because the test failed.

If the test was run in the quarantine mode, you can also determine which attempts failed and passed.

Refer to the reportTestDone method description for details on how to access this information.

Bug Fixes

  • HTML5 drag events are no longer simulated if event.preventDefault is called for the mousedown event (#2529)
  • File upload no longer causes an exception when there are several file inputs on the page (#2642)
  • File upload now works with inputs that have the required attribute (#2509)
  • The load event listener is no longer triggered when added to an image (testcafe-hammerhead/#1688)
Commits

The new version differs by 17 commits.

  • 4cd4a3b Bump version (v0.21.0) (#2690)
  • d59984f [docs] Add an announcement blog post for v0.21.0 (#2663)
  • 1e38a58 fix wrong 'hasScroll' result for some IE specific case (part of #2511) (#2683)
  • 6f20c41 Add two bugs to the changelog
  • 684f4a7 Bump version (v0.21.0-alpha.1) (#2679)
  • 8c8c403 Update CHANGELOG.md
  • 3177a9a [docs] Changelog for v0.21.0 (#2656)
  • 7b9ea07 Replace a long tweet with a shorter one (#2669)
  • 17f869c Correct docs according to #2555 (#2657)
  • 66a1127 [docs] address Lena's remark about screenshot path patterns (#2662)
  • 2475642 [docs] Apply Dirk's corrections to the HTTPS topic (#2661)
  • d20708c Update createtestcafe.md
  • 00f1d5c Fix client tests in Safari (#2652)
  • 03fa1d0 [docs] describes -dev option (#2637)
  • 7edc60e [docs] corrections - screenshotpathpattern (#2645)

There are 17 commits in total.

See the full diff

FAQ and help There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).

Your Greenkeeper bot :palm_tree:

greenkeeper[bot] commented 6 years ago

Version 0.21.1 just got published.

Update to this version instead πŸš€

Release Notes v0.21.1

v0.21.1 (2018-8-8)

Bug fixes

  • The RequestLogger.clear method no longer raises an error if it is called during a long running request (#2688)
  • TestCafe now uses native methods to work with the fetch request (#2686)
  • A URL now resolves correctly for elements in a document.implementation instance (testcafe-hammerhead/#1673)
  • Response header names specified via the respond function are lower-cased now (testcafe-hammerhead/#1704)
  • The cookie domain validation rule on the client side has been fixed (testcafe-hammerhead/#1702)
Commits

The new version differs by 9 commits.

  • 7effa55 Bump version (v0.21.1) (#2708)
  • 76d1371 Implemented glob pattern support for 'runner.src' method (close #980) (#2687)
  • 024d23b modify scrolling behavior is target is hidden by fixed (closes #2450) (#2673)
  • 7dd6e54 fix 'Should not raise an error if during a long running request the "clear" method will be called' (close #2688) (#2694)
  • 45e884f fix Update babel-preset-env target to node 6 (#2695)
  • 2bdfebf Add ExecuteExpressionCommand to RAW API (#2632)
  • 00a2631 [docs] Add diffs between TestCafe versions (#2697)
  • 49706bf FAQ - Add explanations about release years (#2698)
  • f884383 [docs] Update the FAQ part about TestCafe versions (#2691)

See the full diff

greenkeeper[bot] commented 6 years ago

Version 0.22.0 just got published.

Update to this version instead πŸš€

Release Notes v0.22.0

v0.22.0 (2018-9-3)

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

  • RequestLogger no longer fails when it tries to stringify a null request body (#2718)
  • Temporary directories are now correctly removed when the test run is finished (#2735)
  • TestCafe no longer throws ECONNRESET when run against a Webpack project (#2711)
  • An error is no longer thrown when TestCafe tests Sencha ExtJS applications in IE11 (#2639)
  • Firefox no longer waits for page elements to appear without necessity (#2080)
  • ${BROWSER} in the screenshot pattern now correctly resolves to the browser name (#2742)
  • The toString function now returns a native string for overridden descriptor ancestors (testcafe-hammerhead/#1713)
  • The iframe flag is no longer added when a form with target="_parent" is submitted (testcafe-hammerhead/#1680)
  • Hammerhead no longer sends request headers in lower case (testcafe-hammerhead/#1380)
  • The overridden createHTMLDocument method has the right context now (testcafe-hammerhead/#1722)
  • Tests no longer lose connection (testcafe-hammerhead/#1647)
  • The case when both the X-Frame-Options header and a CSP with frame-ancestors are set is now handled correctly (testcafe-hammerhead/#1666)
  • The mechanism that resolves URLs on the client now works correctly (testcafe-hammerhead/#1701)
  • LiveNodeListWrapper now imitates the native behavior correctly (testcafe-hammerhead/#1376)
Commits

The new version differs by 36 commits.

  • 111289d Bump version (v0.22.0) (#2804)
  • 3f5f84b [docs] Add an announcement blog post for v0.22.0 (#2781)
  • cac637b Bump version (v0.22.0-alpha.4) (#2802)
  • fa6dd2e fix '${BROWSER} resolves to undefined in screenshot pattern' (close #2742) (#2794)
  • cf5780b Babel: use for...of transform for client scripts (#2783)
  • 279422f fix Incorrect selector error highlighting for nth (closes #2792) (#2793)
  • e0f5ebb Bump version (v0.22.0-alpha.3) (#2790)
  • 720d959 fix absolute paths for source maps (fix bug for #2546) (#2785)
  • 3e0338f Should find element with not-integer offset (closes #2080) (#2760)
  • 5fbd334 Add missing temp; Improve temp dir logs; Bump version (v0.22.0-alpha.2) (#2784)
  • 3f72595 Bump version (v0.22.0-alpha.1) (#2780)
  • 1a64d8c Edit v0.22.0 release date
  • 741f994 [docs] Introduce changelog for v0.22.0 (#2768)
  • 7971284 [docs] Add a TestCafe Studio top-level link (#2759)
  • f635a58 update hammerhead (#2779)

There are 36 commits in total.

See the full diff

greenkeeper[bot] commented 6 years ago

Update to this version instead πŸš€

Release Notes for v0.23.0

v0.23.0 (2018-10-18)

Enhancements

βš™οΈ Stop Test Run After the First Test Fail (#1323)

You can now configure TestCafe to stop the entire test run after the first test fail. This saves your time when you fix problems with your tests one by one.

Specify the --sf flag to enable this feature when you run tests from the command line.

testcafe chrome my-tests --sf

In the API, use the stopOnFirstFail option.

runner.run({ stopOnFirstFail: true })

βš™οΈ View the JavaScript Errors' Stack Traces in Reports (#2043)

Now when a JavaScript error occurs on the tested webpage, the test run report includes a stack trace for this error (only if the --skip-js-errors option is disabled).

A report that contains a stack trace for a client JS error

βš™οΈ Browsers are Automatically Restarted When They Stop Responding (#1815)

If a browser stops responding while it executes tests, TestCafe restarts the browser and reruns the current test in a new browser instance.
If the same problem occurs with this test two more times, the test run finishes and an error is thrown.

Bug Fixes

  • An error message about an unawaited call to an async function is no longer displayed when an uncaught error occurs (#2557)
  • A request hook is no longer added multiple times when a filter rule is used (#2650)
  • Screenshot links in test run reports now contain paths specified by the --screenshot-pattern option (#2726)
  • Assertion chains no longer produce unhandled promise rejections (#2852)
  • The moment loader now works correctly in the Jest environment (#2500)
  • TestCafe no longer hangs if the screenshot directory contains forbidden symbols (#681)
  • The --ssl option's parameters are now parsed correctly (#2924)
  • TestCafe now throws a meaningful error if an assertion method is missing (#1063)
  • TestCafe no longer hangs when it clicks a custom element (#2861)
  • TestCafe now performs keyboard navigation between radio buttons/groups in a way that matches the native browser behavior (#2067, #2045)
  • The fetch method can now be used with data URLs (#2865)
  • The switchToIframe function no longer throws an error (#2956)
  • TestCafe can now scroll through fixed elements when the action has custom offsets (#2978)
  • You can now specify the current directory or its parent directories as the base path to store screenshots (#2975)
  • Tests no longer hang up when you try to debug in headless browsers (#2846)
  • The removeEventListener function now works correctly when an object is passed as its third argument (testcafe-hammerhead/#1737)
  • Hammerhead no longer adds the event property to a null contentWindow in IE11 (testcafe-hammerhead/#1684)
  • The browser no longer resets connection with the server for no reason (testcafe-hammerhead/#1647)
  • Hammerhead now stringifies values correctly before outputting them to the console (testcafe-hammerhead/#1750)
  • A document fragment from the top window can now be correctly appended to an iframe (testcafe-hammerhead/#912)
  • Lifecycle callbacks that result from the document.registerElement method are no longer called twice (testcafe-hammerhead/#695)
Commits

The new version differs by 64 commits.

  • 6e8e806 Bump version (v0.23.0) (#3031)
  • bf84558 Add an announcement blog post for v0.23.0 (#3033)
  • 53c8c3d [docs] Add actions to the page model (#2995)
  • 4473c04 [docs] Add an example about importing CF dependencies (#2999)
  • 02ee09b [docs] Add changelog v0.23.0 (#2982)
  • 4d35471 Bump version (v0.23.0-alpha.2)
  • 863fb48 Fix options order (#3025)
  • b849c2a Bump version (v0.23.0-alpha.1) (#3024)
  • fcacaa3 Workaround for location.origin; fix regressions (#2978, #2975) (#3015)
  • 567af95 Edit a warning message (#3018)
  • 732eb8d Fix the label configuration name
  • 85a7970 Fix typo
  • 5c5d5fd [docs] Update the old issue template with clarifications (#3009)
  • 6523b6f [docs] Add an example for role's options.preserveUrl (#2989)
  • 41a699f [docs] Add small examples to the Functional-Style Selectors topic (#3001)

There are 64 commits in total.

See the full diff

greenkeeper[bot] commented 6 years ago

Update to this version instead πŸš€

Release Notes for v0.23.1

v0.23.1 (2018-11-7)

Enhancements

βš™οΈ Select Tests and Fixtures to Run by Their Metadata (#2527) by @NickCis

You can now run only those tests or fixtures whose metadata contains a specific set of values.

Use the --test-meta flag to specify values to look for in test metadata.

testcafe chrome my-tests --test-meta device=mobile,env=production

To select fixtures by their metadata, use the --fixture-meta flag.

testcafe chrome my-tests --fixture-meta subsystem=payments,type=regression

In the API, test and fixture metadata is now passed to the runner.filter method in the testMeta and fixtureMeta parameters. Use this metadata to decide whether to run the current test.

runner.filter((testName, fixtureName, fixturePath, testMeta, fixtureMeta) => {
    return testMeta.mobile === 'true' &&
        fixtureMeta.env === 'staging';
});

βš™οΈ Run Dynamically Loaded Tests (#2074)

You can now run tests imported from external libraries or generated dynamically even if the .js file you provide to TestCafe does not contain any tests.

Previously, this was not possible because TestCafe required test files to contain the fixture and test directives. Now you can bypass this check. To do this, provide the --disable-test-syntax-validation command line flag.

testcafe safari test.js --disable-test-syntax-validation

In the API, use the disableTestSyntaxValidation option.

runner.run({ disableTestSyntaxValidation: true })

Bug Fixes

  • Touch events are now simulated with correct touch properties (touches, targetTouches, changedTouches) (#2856)
  • Google Chrome now closes correctly on macOS after tests are finished (#2860)
  • Internal attribute and node changes no longer provoke MutationObserver notifications (testcafe-hammerhead/#1769)
  • The ECONNABORTED error is no longer raised (testcafe-hammerhead/#1744)
  • Websites that use Location.ancestorOrigins are now proxied correctly (testcafe-hammerhead/#1342)
Commits

The new version differs by 27 commits.

  • ce7fa92 Bump version (v0.23.1) (#3085)
  • b5dc889 [docs] Merge documentation for v0.23.1 (#3087)
  • fdc9df6 bump version (v0.23.1-alpha.4)
  • 6decba5 Fix importing pure TS module from a TS test file (#3061)
  • 7b868d8 Change the main menu in light of the new support page (#3053)
  • b2f3b36 alpha 3 (#3072)
  • 4182d8e export getNextFocusableElement method (#3068)
  • a49b72b Use node 8 for testing (#3063)
  • 1500fbc Bump version (v0.23.1-alpha.2)
  • 7bcfdfb Should not add execute expression command to queue (#3042)
  • f188d03 bump version (0.23.1-alpha.1) (#3058)
  • 3d915d9 Disable tests on Travis for new-docs
  • b699f08 Disable testing for new-docs branch (#3059)
  • f14772f Get rid of ps-node module (closes #2860) (#3047)
  • b2ef19c Fix task cancellation

There are 27 commits in total.

See the full diff

greenkeeper[bot] commented 6 years ago

Update to this version instead πŸš€

Release Notes for v0.23.2

v0.23.2 (2018-11-12)

Bug Fixes

  • TestCafe no longer posts internal messages to the browser console (#3099)
  • The TestCafe process no longer terminates before the report is written to a file (#2502)
Commits

The new version differs by 7 commits.

  • 591ed4c Bump version (v0.23.2) (#3106)
  • 08290c6 Update changelog (v0.23.2) (#3107)
  • c75685e add docker-test task (closes #3026) (#3081)
  • e9b00fb Fix button names in the Handling Native Dialogs topic
  • 8054e2e Refresh node_modules when publishing; Bump version (v0.23.2-alpha.1) (#3101)
  • 6f8db5e Wait until outStream is finished (closes #2502) (#2828)
  • f105949 Improve startup time (#2984)

See the full diff

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

Release Notes for v0.23.3

v0.23.3 (2018-12-19)

Bug Fixes

  • Remote browsers now start after tests are compiled (#3219) by @link89
  • The TestCafe Docker image now includes version tags (#2315)
  • Tests now fail with a meaningful error if no fixture is defined (#2913)
  • Tests now resume correctly after a long waiting (#3070)
  • TestCafe now throws a meaningful exception when taking screenshots in a browser that does not support it (#2878)
  • Events are now simulated in the correct order when focusing an element after another element was focused on the changed event (#3098)
  • The Invalid calling object exception is no longer thrown in IE11 (testcafe-hammerhead/#1846)
  • The JSON parse error is no longer thrown when sending an XHR request (testcafe-hammerhead/#1839)
  • Overridden functions now have the right prototype in an iframe without src (testcafe-hammerhead/#1824)
  • gulp-testcafe now correctly closes Chrome after tests are finished (testcafe-hammerhead/#1826)
  • Saving the window prototype to a property now works correctly (testcafe-hammerhead/#1828)
  • Hammerhead is now retained after document.close in Firefox (testcafe-hammerhead/#1821)
Commits

The new version differs by 37 commits.

  • 631463d Bump version (v0.23.3) (#3241)
  • 4adca7b [docs] Add changelog for v0.23.3 (#3180)
  • 64a431e Update replicator & hammerhead; Bump version (v0.23.3-alpha.5) (#3235)
  • 67e396f Update testcafe-legacy-api version (#3228)
  • 0249913 Bump version (v0,23,3-alpha.4)
  • 720f9bd Fix parallel bootstrapping condition check (closes #3219) (#3221)
  • bc26207 Bump version (v0.23.3-alpha.3) (#3220)
  • a83e8ca Terminate legacy tests with the proper error on uncaught exceptions (#3181)
  • b2f6c76 [docs] Add a recipe describing how to debug in WebStorm (#3166)
  • 3cbfb67 [docs] Add a recipe describing integration with Azure DevOps (#3158)
  • 90bf57d [docs] Add a recipe about integrating TestCafe with GitLab (#3120)
  • 41525a9 Added validation to screenshotPathPattern (close #3170) (#3193)
  • 9a332a3 Resolve file name with abs path but different case in drive label (closes #3186) (#3191)
  • bc60e0e [docs] Fix x.y.z in the CircleCI topic (#3188)
  • 37d610d Apply Dirk's corrections (#3182)

There are 37 commits in total.

See the full diff

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

Release Notes for v1.0.0

v1.0.0 (2018-2-7)

Breaking Changes

πŸ’₯ Test Syntax Validation Disabled: All Input Files Are Executed

Previous versions performed test syntax validation within input script files before executing them. Only files that contained the fixture and test directives were executed.

Starting with v1.0.0, input script files are never validated. This means that TestCafe executes all the scripts you specify as test sources. If you use Glob patterns to specify input test files, please recheck these patterns to avoid unintended file matches.

The --disable-test-syntax-validation command line flag and the disableTestSyntaxValidation option for the runner.run API method that disabled test syntax validation were removed in v1.0.0.

What Has Improved

You can now load tests dynamically without additional customization. The following example illustrates how tests can be imported from an external library.

external-lib.js

export default function runFixture(name, url) {
    fixture(name)
        .page(url);

    test(`${url} test`, async t => {
        // ...
    });
}

test.js

import runFixture from './external-lib';

const fixtureName = 'My fixture';
const url = 'https://testPage';

runFixture(fixtureName, url);

πŸ’₯ Programming Interface: Multiple Method Calls Prohibited

Previous versions allowed you to call the runner.src, runner.browsers and runner.reporter methods several times to specify multiple test files, browsers or reporters.

const stream = fs.createWriteStream('report.json');

runner
    .src('/home/user/tests/fixture1.js')
    .src('fixture5.js')
    .browsers('chrome')
    .browsers('firefox:headless')
    .reporter('minimal')
    .reporter('json', stream);

Starting with v1.0.0, pass arrays to these methods to specify multiple values.

To use a reporter that writes to a file, add a { name, output } object to an array (see the runner.reporter description for details).

runner
    .src(['/home/user/tests/fixture1.js', 'fixture5.js'])
    .browsers(['chrome', 'firefox:headless'])
    .reporter(['minimal', { name: 'json', output: 'report.json' }]);
What Has Improved

This change was necessary to implement the configuration file in a way that is consistent with the API and command line interface.

πŸ’₯ Custom Request Hooks: Asynchronous API

Request hook methods became asynchronous in TestCafe v1.0.0.

If the onRequest or onResponse method in your custom hook returns a Promise, TestCafe now waits for this Promise to resolve.

This does not necessarily leads to unexpected behavior, but still be aware of possible side effects.

Since the onRequest and onResponse methods are now asynchronous, add the async keyword to their declarations.

import { RequestHook } from 'testcafe';

class MyRequestHook extends RequestHook {
    constructor (requestFilterRules, responseEventConfigureOpts) {
        super(requestFilterRules, responseEventConfigureOpts);
        // ...
    }

    async onRequest (event) {
        // ...
    }

    async onResponse (event) {
        // ...
    }
}
What Has Improved

You can call asynchronous fs functions, invoke a child_process, or perform asynchronous network requests (to a database or any other server) from inside the hooks.

πŸ’₯ Custom Reporter Plugins: Asynchronous API

TestCafe v1.0.0 also introduces asynchronous API for reporter plugins.

Similarly to request hooks, if any of the custom reporter's methods (reportTaskStart, reportFixtureStart, reportTestDone or reportTaskDone) returns a Promise, this Promise is now awaited.

Side effects may show up in certain cases.

Since the reporter methods are now asynchronous, add the async keyword to their declarations.

async reportTaskStart (startTime, userAgents, testCount) {
    // ...
},

async reportFixtureStart (name, path, meta) {
    // ...
},

async reportTestDone (name, testRunInfo, meta) {
    // ...
},

async reportTaskDone (endTime, passed, warnings, result) {
    // ...
}
What Has Improved

Reporters can call asynchronous fs functions, invoke a child_process, or perform asynchronous network requests (to send an email, use REST API, connect to a database, etc).

Enhancements

βš™οΈ Video Recording (#2151)

You can now record videos of test runs in Google Chrome and Mozilla Firefox. To enable video recording, install the FFmpeg library and then do one of the following:

  • specify the --video command line flag,

    testcafe chrome test.js --video artifacts/videos/
  • call the runner.video API method,

    runner.video('artifacts/videos/');
  • specify the videoPath configuration file property (configuration file is also a new feature, see below).

    {
        "videoPath": "artifacts/videos/"
    }

TestCafe records all tests and saves each recording in a separate file. You can change this behavior in video options. You can also customize video encoding parameters.

βš™οΈ Configuration File (#3131)

TestCafe now allows you to store its settings in the .testcaferc.json configuration file (with support for JSON5 syntax).

{
    "browsers": "chrome",
    "src": ["/home/user/auth-tests/fixture-1.js", "/home/user/mobile-tests/"],
    "reporter": {
        "name": "xunit",
        "output": "reports/report.xml"
    },
    "screenshotPath": "/home/user/tests/screenshots/",
    "takeScreenshotsOnFails": true,
    "videoPath": "/home/user/tests/videos/",
    "pageLoadTimeout": 1000,
    "hostname": "host.mycorp.com"
    // and more
}

Keep the configuration file in the project's root directory from which you run TestCafe.

Settings you specify when you launch tests from the command line and programming interfaces override settings from .testcaferc.json.

See Configuration File for more information.

βš™οΈ Live Mode (#3215)

We have integrated the testcafe-live module into our main code so you can now use the new live mode.

Live mode keeps the TestCafe process and browsers opened the whole time you are working on tests. Changes you make in code immediately restart the tests. That is, live mode allows you to see test results instantly. See How Live Mode Works.

Use the -L (--live) flag to enable live mode from the command line interface.

testcafe chrome tests/test.js -L

In the API, create a live mode runner with the testcafe.createLiveModeRunner function and use it instead of a regular test runner.

const createTestCafe = require('testcafe');
let testcafe         = null;

createTestCafe('localhost', 1337, 1338)
    .then(tc => {
        testcafe         = tc;
        const liveRunner = testcafe.createLiveModeRunner();
        return liveRunner
            .src('tests/test.js')
            .browsers('chrome')
            .run();
    })
    .then(() => {
        testcafe.close();
    });

βš™οΈ Custom Reporter API Enhancements (Part of #2753; Pull Request)

  • You can now access warnings that appeared during the test run from the reportTestDone method. Use the warnings property of the testRunInfo object.

    async reportTestDone (name, testRunInfo, meta) {
        const warnings    = testRunInfo.warnings;
        const hasWarnings = !!warnings.length;
    
        if(hasWarnings) {
            this.newline()
                .write('Warnings:');
    
            warnings.forEach(warning => {
                this.newline()
                    .write(warning);
            });
        }
    }
  • The reportTaskDone method now receives the result parameter that contains information about the number of passed, failed, and skipped tests.

    async reportTaskDone (endTime, passed, warnings, result) {
        this.write(`Testing finished!`)
            .newline()
            .write(`Passed: ${result.passedCount}`)
            .newline()
            .write(`Failed: ${result.failedCount}`)
            .newline();
            .write(`Skipped: ${result.skippedCount}`)
            .newline();
    }

βš™οΈ Typings for Programming Interface (#3341) by @infctr

TestCafe programming interface now features TypeScript typings.

API Typings

βš™οΈ Programming Interface: Simpler API to Write Reports to a File

You no longer need to use fs.createWriteStream to create a stream that writes a report to a file. You can now pass the file name as the runner.reporter parameter.

runnner.reporter('json', 'reports/report.json');

Bug Fixes

  • The test runner no longer hangs when a custom reporter implementation uses synchronous callbacks (#3209)
  • Fixture hooks for two adjacent fixtures are now executed in the correct order (#3298)
  • Iframes no longer throw an error after a document.open call in IE and Edge (#3343)
  • TestCafe no longer triggers a click event when you disable a button with a span element inside (#2902)
  • Fixed a bug that led to errors in certain cases (#3189)
  • We have improved the status panel design and adaptivity (#3073)
  • Redirects through several pages in iframes now work correctly (testcafe-hammerhead/#1825)
  • TestCafe can now correctly work with pages that override HTMLElement.classList in IE11 (testcafe-hammerhead/#1890)
Commits

The new version differs by 55 commits.

  • 287632a Bump version (v1.0.0) (#3409)
  • 6f8156b [docs] Add a changelog for v1.0.0 (#3396)
  • 608d99d Reduce flaky appveyor tests on master
  • 247c246 Remove TestCafe Live from plugins (#3397)
  • 086e546 Bump version (v1.0.0-alpha.5) (#3398)
  • b1dbb93 Add TestCafe Class typings (#3356)
  • dec3e77 Add New Contributors to the main page (#3394)
  • da1356f Renamed the '.reporter' method parameter from 'outStream' to 'output' (#3389)
  • bba3ded Fix inconsistencies with the documentation (#3387)
  • 3585ac3 Live mode - clear expected test count count cache to prevent hanging (closes #3381,#3379) (#3384)
  • 7bb7ca9 Disable cross-domain test for Safari (#3380)
  • 5879da8 fix live (#3374)
  • e850d11 Fix video recording for legacy tests (#3377)
  • d0c0341 Update hammerhead; Bump version (v1.0.0-alpha.4) (#3371)
  • ee7689a Fix server tests for the docker-test task (#3368)

There are 55 commits in total.

See the full diff

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

Release Notes for v1.0.1

v1.0.1 (2019-2-15)

βš™οΈ Package dependencies have been upgraded to avoid CVEs found in the 'lodash' package

Bug Fixes

  • TestCafe no longer hangs when CLI argument validation failed in live mode (#3402)
  • TestCafe no longer fails with the ERR_STREAM_WRITE_AFTER_END error after restarting tests in live mode (#3322)
  • Now TestCafe doesn't ignore video and encoding options specified in a configuration file (#3415)
  • Now you can specify only tests in TestCafe CLI if browsers are specified in a configuration file (#3421)
  • Live mode: TestCafe no longer stops test execution in multiple browsers if tests do not contain actions (#3410)
  • Now TestCafe correctly handles the data-parsley-multiple attribute (testcafe-hammerhead/#1845)
  • Now TestCafe allows passing the headers option of the fetch function as an Array (testcafe-hammerhead/#1898)
  • No error occurs when page scripts pass a number as an argument to the window.open function (testcafe-hammerhead/#1908)
  • Now TestCafe correctly processes rewritten stylesheets (testcafe-hammerhead/#1919)
  • TestCafe correctly processes sourcemaps in stylesheets now (testcafe-hammerhead/#1907)
Commits

The new version differs by 18 commits.

  • 8a7245f Bump version (v1.0.1) (#3453)
  • cea307f Banner for testcafe studio added (#3450)
  • 6a2d47a [docs] Update changelog (v1.0.1) (#3449)
  • 50308ec Fix /docker/get-publish-tags.js
  • 9bb63ef Fix getting tags fo docker
  • 5d0bf28 Bump version (v1.0.1-rc.1) (#3448)
  • 8df250f Update testcafe-hammerhead, lodash (#3445)
  • 92cf8be Fix the concurrency test
  • 9dda31e improve JS client error message (closes #2909) (#3440)
  • 9523f07 Allow to skip browsers if they are specified in the config (#3427)
  • f7a2a16 do not dispose reporters in Live Mode (closes #3322) (#3426)
  • 0999206 Make CLI video options undefined if they're not specified (#3420)
  • f1e3aab Fix year in changelog (#3423)
  • 6fe5136 [WIP]refactoring live and fix tests sync problem (#3407)
  • 1153800 fix validation error processing in live mode (closes #3402) (#3419)

There are 18 commits in total.

See the full diff

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

Release Notes for v1.1.0

v1.1.0 (2019-2-28)

Enhancements

βš™οΈ TypeScript 3 Support (#3401)

TypeScript test files can now use new syntax features introduced in TypeScript 3.0 and TypeScript 3.3.

βš™οΈ Enhanced TypeScript Definitions for Client Functions (#3431) by @vitalics

The updated type definitions allow TypeScript compiler to determine client function's return value type. Static typing now warns you when you call wrong methods for the return value.

const getFoo = ClientFunction(() => 42);
const foo    = await getFoo();
foo.match(/foo/);

Prior to v1.1.0, an error occurred during test execution:

$ testcafe chrome tests.ts
 Running tests in:
 - Chrome 72.0.3626 / Windows 10.0.0
 Fixture 1
 √ Test 1
 √ Test 2
 ...
 Γ— Test N
   1) TypeError: foo.match is not a function

With v1.1.0, the TypeScript compiler throws an error before test are started:

$ testcafe chrome tests.ts
  ERROR Cannot prepare tests due to an error.
  Error: TypeScript compilation failed.

  tests.ts (4, 2): Property 'match' does not exist on type 'number'.

Bug Fixes

  • TestCafe no longer ignores test and fixture metadata filters specified in the configuration file (#3443) by @NanjoW
  • TestCafe no longer resolves placeholders to null in video path patterns (#3455)
  • Fixed the KeyboardEvent's key property emulation for Safari (#3282)
  • TestCafe can now capture element screenshots after a long page scrolling (#3292)
  • The compilation time of TypeScript tests no longer degrades for a large number of files (#3475)
  • Reach Router can now navigate correctly when tested with TestCafe (testcafe-hammerhead/#1863)
  • TestCafe now correctly handles websites that use the WebKitMutationObserver class (testcafe-hammerhead/#1912)
  • TestCafe now processes ECMAScript modules in <script> tags (testcafe-hammerhead/#1725)
Commits

The new version differs by 23 commits.

  • a8f8155 Fix headers in the changelog
  • 207708d Bump version (v1.1.0) (#3510)
  • 78f86d8 [docs] Changelog v1.1.0 (#3506)
  • 7bcd077 Bump version (v1.1.0-rc.1) (#3504)
  • e630d37 Update testcafe-hammerhead (v14.5.1) (#3503)
  • df66e73 Fix TS compilation performance (closes #3475) (#3486)
  • 0f86212 Crop scrollbar in screenshots(closes #3292) (#3470)
  • 804702f fix key property of KeyboardEvent in Safari (closes #3282) (#3498)
  • 8a94faf Feat: clientFunction better definition (#3431)
  • ea330ea StatusPanel's buttons renaming (#3488)
  • 99428bd Fixed "${TEST_INDEX} is initialized to 'null' for video recording path pattern" (close #3455) (#3481)
  • 1bc45af Avoid importing gulp-gh-pages with Node.js 6.x
  • afd14d0 [docs] Bitbucket Pipelines CI documentation (#3276)
  • 6f10158 Fix filtering by meta from config (#3474)
  • 5a37800 Update vulnerable gulp-gh-pages

There are 23 commits in total.

See the full diff

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

Release Notes for v1.1.1

v1.1.1 (2019-4-4)

Bug Fixes

  • TestCafe no longer crashes if the tested page contains many cross-domain iframes (testcafe-hammerhead/#1885)
  • TestCafe now displays a more concise message when it cannot find and run Chrome or Firefox (#3534)
  • TestCafe no longer creates temporary video files in the concurrency mode (#3508)
  • The --no-sandbox and --disable-dev-shm-usage flags are now applied automatically when TestCafe runs in a Docker container (#3531)
  • In live mode, TestCafe now hides the spinner when it displays a message or if test compilation has failed (#3451 and (#3452))
  • TypeScript definitions for t.expect().contains have been fixed to support different types (#3537)
  • The keyPress event simulation now works properly on Android (#2236)
  • Salesforce Lightning Experience components are now rendered correctly (testcafe-hammerhead/#1874)
Commits

The new version differs by 42 commits.

  • e26eebc Bump version (v1.1.1) (#3641)
  • 76e79aa [docs] Changelog for v1.1.1 (#3622)
  • 0b0a5c9 Bump version (v1.1.1-rc.3)
  • 54b8a29 Fix status panel for Mac (closes #3631) (#3632)
  • 8ec5a86 Bump version (v1.1.1-rc.2) (#3628)
  • 21f1610 [docs] Fix a typo
  • b4620c9 [docs] FAQ - Prettify the error message
  • 9966f41 Bump version (v1.1.1-rc.1) (#3623)
  • 98e8fd6 Improve page load error (closes #3492) (#3588)
  • 6d05142 change checkbox state and raise change event with label/focus/selectionChange (closes #3348) (#3602)
  • bef9a66 Enable legacy tests on PRs; Update hammerhead (v14.5.2) (#3587)
  • ac77157 [docs] Update FAQ with network troubleshooting information (#3594)
  • d41c848 Disable tests with Roles for Azure tasks (#3616)
  • a387493 Fix the lock message text
  • f96207c Fix exemptLabels option value (add proper quotes)

There are 42 commits in total.

See the full diff

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 4 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 4 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 4 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 4 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 4 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 4 years ago

Update to this version instead πŸš€

greenkeeper[bot] commented 4 years ago

🚨 Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! πŸ’œ πŸššπŸ’¨ πŸ’š

Find out how to migrate to Snyk at greenkeeper.io


Update to this version instead πŸš€

greenkeeper[bot] commented 4 years ago

🚨 Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! πŸ’œ πŸššπŸ’¨ πŸ’š

Find out how to migrate to Snyk at greenkeeper.io


Update to this version instead πŸš€