TestCafe v0.20.0 Release Notes
-
โ Request Hooks: Intercepting HTTP requests (#1341)
TestCafe now allows you to record HTTP request data or mock responses. You can also create a custom HTTP request hook to emulate authentications like Kerberos or Client Certificate Authentication.
๐ See Intercepting HTTP Requests for more information.
โจ Enhancements
โ :gear: Specifying resources accessed by bypassing a proxy server (#1791)
โ TestCafe now allows you to bypass the proxy server when accessing specific resources.
๐ To specify resources that require direct access, use the --proxy-bypass flag in the command line or the useProxy API method's parameters.
testcafe chrome my-tests/**/*.js --proxy proxy.corp.mycompany.com --proxy-bypass localhost:8080,internal-resource.corp.mycompany.com
runner.useProxy('172.0.10.10:8080', ['localhost:8080', 'internal-resource.corp.mycompany.com']);
๐ :gear: Specifying testing metadata (#2242)
๐ TestCafe allows you to specify additional information for tests in the form of key-value metadata and use it in reports.
๐ You can define metadata for a fixture or a test using the meta method:
fixture `My Fixture` .meta('fixtureID', 'f-0001') .meta({ author: 'John', creationDate: '05/03/2018' });
test .meta('testID', 't-0005') .meta({ severity: 'critical', testedAPIVersion: '1.0' }) ('MyTest', async t => { /* ... */});
๐ To include testing metadata to reports, use the custom reporter methods.
โ :gear: Passing a regular promise to
t.expect
is deprecated now (#2207)โ TestCafe now throws an error if you pass a regular promise to the assertion's
expect
method.๐ If you need to assert a regular promise, set the allowUnawaitedPromise option to
true
.await t.expect(doSomethingAsync()).ok('check that a promise is returned', { allowUnawaitedPromise: true });
๐ Bug Fixes
- โ The session recovery bubble in Firefox is disabled (#2341)
- ๐
TestCafe works properly if a
body
element has thepointer-events: none;
css style rule (#2251) - โ Resizing Chrome in the emulation mode works correctly (#2154)
- โ The location port is used for service messages (#2308)
- โ A browser instance shuts down correctly on Unix systems (#2226)
- ๐ An
Integrity
attribute is removed fromscript
andlink
tags (testcafe-hammerhead/#235) - โ
The
event.preventDefault()
method call changes theevent.defaultPrevented
property value (testcafe-hammerhead/#1588) - โ
It is possible to set the
meta
element'scontent
attribute (testcafe-hammerhead/#1586) - โ
TestCafe no longer overrides attributes used in a non-standard way with
null
(testcafe-hammerhead/#1583) - โ
The
Change
event fires correctly if thetarget.value
changes (#2319) - ๐
MouseEvent.screenX
andMouseEvent.screenY
are added to the emulated events (#2325) - โ
Cookies on
localhost
are processed correctly (testcafe-hammerhead/#1491) - โ
Setting the
//
url for an image works correctly (#2312) - โ
shadowUI
internal elements are no longer processed (#2281) - โ
typeInput
event is raised correctly (#1956) - โ Selecting text in contenteditable elements works properly (#2301)