testcafe 2.2.0-rc.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/lib/configuration/types.js +1 -1
- package/package.json +1 -1
- package/ts-defs/index.d.ts +8 -0
- package/ts-defs/selectors.d.ts +8 -0
- package/ts-defs/testcafe-scripts.d.ts +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v2.2.0 (2022-12-29)
|
|
4
|
+
|
|
5
|
+
TestCafe v2.2.0 introduces user-defined custom actions and an important *experimental* capability. Google Chrome users can now enable "proxyless mode" to speed up their test suite.
|
|
6
|
+
|
|
7
|
+
### Custom Action Support
|
|
8
|
+
|
|
9
|
+
TestCafe users can now define [custom test actions](xref:404150). Place the definition function in a [**JavaScript** configuration file](xref:402638#customactions):
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
module.exports = {
|
|
13
|
+
customActions: {
|
|
14
|
+
async makeCoffee (args) {
|
|
15
|
+
await this.click(args);
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Include custom methods in your tests alongside [other TestController methods](xref:402632#test-controller-api).
|
|
22
|
+
Add the `customActions` prefix when you call the action:
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
test('Test with a custom action', async t => {
|
|
26
|
+
await t.click()
|
|
27
|
+
.customActions.makeCoffee()
|
|
28
|
+
.click();
|
|
29
|
+
})
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Experimental: Proxyless mode
|
|
33
|
+
|
|
34
|
+
TestCafe runs an under-the-hood [reverse proxy](xref:402631#page-proxying) to automate tests across different browsers. But this technique complicates the framework. Native automation protocols offer superior automation speeds and greater stability. That's why the TestCafe team decided to gradually phase the reverse proxy out in favor of native support for these automation protocols.
|
|
35
|
+
|
|
36
|
+
TestCafe v2.2.0 includes an **experimental** option that disables the proxy for **Google Chrome**.
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
testcafe chrome tests --experimental-proxyless
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
You can enable this option in the [command line interface](xref:402639#--experimental-proxyless), the [Test Runner API](xref:402662), and the [configuration file](xref:402638#experimentalproxyless). Read the [Proxyless mode guide](xref:404237) for more information.
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* TestCafe doesn't hide the live mode status bar when the bar obstructs the action target ([#7384](https://github.com/DevExpress/testcafe/issues/7384))
|
|
47
|
+
* The 'Target element is overlapped' message does not reference the Selector that caused the warning ([#7386](https://github.com/DevExpress/testcafe/issues/7386))
|
|
48
|
+
* The TestCafe Dashboard reporter includes an outdated `uuid` dependency ([testcafe-reporter-dashboard#111](https://github.com/DevExpress/testcafe-reporter-dashboard/issues/111))
|
|
49
|
+
* TestCafe doesn't display the correct error message when the framework throws an exception ([#6936](https://github.com/DevExpress/testcafe/issues/6936))
|
|
50
|
+
* TestCafe retains some cookies after the user requests their deletion (PR [testcafe-hammerhead#2818](https://github.com/DevExpress/testcafe-hammerhead/pull/2818))
|
|
51
|
+
* TestCafe cannot load test pages with the `localhost` URL on Node.js v17 and up ([#7396](https://github.com/DevExpress/testcafe/issues/7396))
|
|
52
|
+
* TestCafe cannot take screenshots in headless Chrome on Node.js v17 and up ([#7408](https://github.com/DevExpress/testcafe/issues/7408))
|
|
53
|
+
* Web workers that originate from Blob URLs throw an error when they call the `importScript` function ([#7378](https://github.com/DevExpress/testcafe/issues/7378))
|
|
54
|
+
* TestCafe doesn't set the correct `Request` header when an `iframe` points the user to a new URL ([#7376](https://github.com/DevExpress/testcafe/issues/7376), PR [testcafe-hammerhead#2813](https://github.com/DevExpress/testcafe-hammerhead/pull/2813) by [@naggingant](https://github.com/naggingant))
|
|
55
|
+
* TestCafe cannot interact with options that belong to a `<select>` element with the `multiple` attribute (PR [testcafe-hammerhead#2815](https://github.com/DevExpress/testcafe-hammerhead/pull/2815))
|
|
56
|
+
|
|
3
57
|
## v2.1.0 (2022-11-10)
|
|
4
58
|
|
|
5
59
|
### Improvements
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const RequestHook = require('../api/request-hooks/hook');
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uZmlndXJhdGlvbi90eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsTUFBTSxXQUFXLEdBQUcsT0FBTyxDQUFDLDJCQUEyQixDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJjb25zdCBSZXF1ZXN0SG9vayA9IHJlcXVpcmUoJy4uL2FwaS9yZXF1ZXN0LWhvb2tzL2hvb2snKTtcblxuLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnVzZWQtdmFyc1xudHlwZSBUZW1wbGF0ZUFyZ3VtZW50cyA9IGFueVtdO1xuXG5pbnRlcmZhY2UgU2NyZWVuc2hvdE9wdGlvblZhbHVlIHtcbiAgICBwYXRoOiBzdHJpbmc7XG4gICAgdGFrZU9uRmFpbHM/OiBib29sZWFuO1xuICAgIHBhdGhQYXR0ZXJuPzogc3RyaW5nO1xuICAgIGZ1bGxQYWdlPzogYm9vbGVhbjtcbiAgICB0aHVtYm5haWxzPzogYm9vbGVhbjtcbiAgICBhdXRvVGFrZU9uRmFpbHM/OiBib29sZWFuO1xufVxuXG5pbnRlcmZhY2UgUXVhcmFudGluZU9wdGlvblZhbHVlIHtcbiAgICBhdHRlbXB0TGltaXQ/OiBudW1iZXI7XG4gICAgc3VjY2Vzc1RocmVzaG9sZD86IG51bWJlcjtcbn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GluZU9wdGlvblZhbHVlIHtcbiAgICBhdHRlbXB0TGltaXQ/OiBudW1iZXI7XG4gICAgc3VjY2Vzc1RocmVzaG9sZD86IG51bWJlcjtcbn1cblxudHlwZSBTa2lwSnNFcnJvcnNPcHRpb25WYWx1ZSA9IFNraXBKc0Vycm9yc09wdGlvbnNPYmplY3QgfCBib29sZWFuO1xuXG5pbnRlcmZhY2UgVGVzdGluZ0VudHJ5SG9va3Mge1xuICAgIGJlZm9yZT86IEZ1bmN0aW9uO1xuICAgIGFmdGVyPzogRnVuY3Rpb247XG59XG5cbmludGVyZmFjZSBHbG9iYWxIb29rcyB7XG4gICAgdGVzdFJ1bj86IFRlc3RpbmdFbnRyeUhvb2tzO1xuICAgIGZpeHR1cmU/OiBUZXN0aW5nRW50cnlIb29rcztcbiAgICB0ZXN0PzogVGVzdGluZ0VudHJ5SG9va3M7XG4gICAgcmVxdWVzdD86IHR5cGVvZiBSZXF1ZXN0SG9va1tdIHwgdHlwZW9mIFJlcXVlc3RIb29rO1xufVxuXG4vLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzXG50eXBlIE9wdGlvblZhbHVlID0gdW5kZWZpbmVkIHwgbnVsbCB8IHN0cmluZyB8IGJvb2xlYW4gfCBudW1iZXIgfCBzdHJpbmdbXSB8IEZ1bmN0aW9uIHwgeyBba2V5OiBzdHJpbmddOiBhbnkgfSB8IFNjcmVlbnNob3RPcHRpb25WYWx1ZSB8IFF1YXJhbnRpbmVPcHRpb25WYWx1ZSB8IENvbXBpbGVyT3B0aW9ucyB8IEdsb2JhbEhvb2tzIHwgU2tpcEpzRXJyb3JzT3B0aW9uVmFsdWUgfCBDdXN0b21BY3Rpb25zO1xuIl19
|
package/package.json
CHANGED
package/ts-defs/index.d.ts
CHANGED
|
@@ -1769,6 +1769,10 @@ declare module 'testcafe' {
|
|
|
1769
1769
|
url: URL;
|
|
1770
1770
|
}
|
|
1771
1771
|
|
|
1772
|
+
interface CustomActions {
|
|
1773
|
+
[key: string]: (...args: any[]) => TestControllerPromise
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1772
1776
|
type ScrollPosition = 'top' | 'right' | 'bottom' | 'left' | 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft' | 'center';
|
|
1773
1777
|
|
|
1774
1778
|
interface TestController {
|
|
@@ -1784,6 +1788,10 @@ declare module 'testcafe' {
|
|
|
1784
1788
|
* Returns an object that contains browser information.
|
|
1785
1789
|
*/
|
|
1786
1790
|
readonly browser: Browser;
|
|
1791
|
+
/**
|
|
1792
|
+
* Returns an object that contains registered custom actions.
|
|
1793
|
+
*/
|
|
1794
|
+
readonly customActions: CustomActions;
|
|
1787
1795
|
/**
|
|
1788
1796
|
* Dispatches an event over a specified webpage element.
|
|
1789
1797
|
*
|
package/ts-defs/selectors.d.ts
CHANGED
|
@@ -1767,6 +1767,10 @@ declare module 'testcafe' {
|
|
|
1767
1767
|
url: URL;
|
|
1768
1768
|
}
|
|
1769
1769
|
|
|
1770
|
+
interface CustomActions {
|
|
1771
|
+
[key: string]: (...args: any[]) => TestControllerPromise
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1770
1774
|
type ScrollPosition = 'top' | 'right' | 'bottom' | 'left' | 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft' | 'center';
|
|
1771
1775
|
|
|
1772
1776
|
interface TestController {
|
|
@@ -1782,6 +1786,10 @@ declare module 'testcafe' {
|
|
|
1782
1786
|
* Returns an object that contains browser information.
|
|
1783
1787
|
*/
|
|
1784
1788
|
readonly browser: Browser;
|
|
1789
|
+
/**
|
|
1790
|
+
* Returns an object that contains registered custom actions.
|
|
1791
|
+
*/
|
|
1792
|
+
readonly customActions: CustomActions;
|
|
1785
1793
|
/**
|
|
1786
1794
|
* Dispatches an event over a specified webpage element.
|
|
1787
1795
|
*
|
|
@@ -1767,6 +1767,10 @@ declare module 'testcafe' {
|
|
|
1767
1767
|
url: URL;
|
|
1768
1768
|
}
|
|
1769
1769
|
|
|
1770
|
+
interface CustomActions {
|
|
1771
|
+
[key: string]: (...args: any[]) => TestControllerPromise
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1770
1774
|
type ScrollPosition = 'top' | 'right' | 'bottom' | 'left' | 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft' | 'center';
|
|
1771
1775
|
|
|
1772
1776
|
interface TestController {
|
|
@@ -1782,6 +1786,10 @@ declare module 'testcafe' {
|
|
|
1782
1786
|
* Returns an object that contains browser information.
|
|
1783
1787
|
*/
|
|
1784
1788
|
readonly browser: Browser;
|
|
1789
|
+
/**
|
|
1790
|
+
* Returns an object that contains registered custom actions.
|
|
1791
|
+
*/
|
|
1792
|
+
readonly customActions: CustomActions;
|
|
1785
1793
|
/**
|
|
1786
1794
|
* Dispatches an event over a specified webpage element.
|
|
1787
1795
|
*
|