testcafe 2.3.0-rc.2 → 2.3.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 +68 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,73 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v2.3.0 (2023-01-30)
|
|
4
|
+
|
|
5
|
+
TestCafe v2.3.0 introduces `create-testcafe` --- an interactive tool that allows you to initialize a new TestCafe project in seconds. The update also includes *experimental* ECMAScript module support and a number of bug fixes.
|
|
6
|
+
|
|
7
|
+
> **_IMPORTANT:_**
|
|
8
|
+
> TestCafe v2.3.0 ends support for Node.js 14 due to a known vulnerability in the `babel-plugin-module-resolver` module.
|
|
9
|
+
>
|
|
10
|
+
> Install an up-to-date version of the Node.js runtime to use TestCafe v2.3.0 and up.
|
|
11
|
+
>
|
|
12
|
+
> The official maintenance period for Node.js 14 [elapses](https://endoflife.date/nodejs) on April 1st, 2023.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### create-testcafe
|
|
16
|
+
|
|
17
|
+
Use the [create-testcafe](https://github.com/devexpress/create-testcafe) tool to initialize a new TestCafe project, or *add* TestCafe to an existing Node.js application.
|
|
18
|
+
|
|
19
|
+
Execute the following command to launch `create-testcafe`:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npx create-testcafe
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The `create-testcafe` tool allows you to perform the following actions with a single command:
|
|
26
|
+
|
|
27
|
+
1. Create a new folder for the TestCafe project *(optional)*.
|
|
28
|
+
2. Create a new local installation of TestCafe and its dependencies.
|
|
29
|
+
3. Create and initialize a TestCafe configuration file.
|
|
30
|
+
4. Create a separate subfolder for tests.
|
|
31
|
+
5. Populate the test folder with test examples *(optional)*.
|
|
32
|
+
6. Create a YAML file with a GitLab Actions workflow that runs TestCafe tests *(optional)*.
|
|
33
|
+
|
|
34
|
+
### Experimental: ECMAScript module support
|
|
35
|
+
|
|
36
|
+
> **_IMPORTANT:_**
|
|
37
|
+
> ESM module suppport works with Node.js 16 and up.
|
|
38
|
+
|
|
39
|
+
TestCafe has always used *CommonJS* syntax for module imports:
|
|
40
|
+
|
|
41
|
+
```js
|
|
42
|
+
const { x } = require('y');
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
An increasing number of Node.JS packages abandon CommonJS in favour of [ECMAScript module syntax](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c):
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
import {x} from 'y'
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Enable the `--experimental-esm` [CLI flag](xref:402639#--experimental-esm) to import modules that do not support CommonJS. Note: tests with ECMASCript module syntax are subject to [additional requirements](#additional-reuqirements).
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
testcafe chrome test.js --experimental-esm
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### Additional Reuqirements
|
|
58
|
+
|
|
59
|
+
To run tests with ECMAScript `import` statements, make sure that your project meets at least one of the following requirements:
|
|
60
|
+
|
|
61
|
+
1. The value of the `type` key in your project's [package.json file](https://nodejs.org/api/packages.html#packagejson-and-file-extensions) is `module`.
|
|
62
|
+
2. The test files in your project use the `.mjs` extension.
|
|
63
|
+
|
|
64
|
+
### Bug Fixes
|
|
65
|
+
|
|
66
|
+
* TestCafe doesn't delete expired cookies ([#7432](https://github.com/DevExpress/testcafe/issues/7432)).
|
|
67
|
+
* TestCafe cannot handle windows that appear when the user clicks a link with a `_blank` target ([#6926](https://github.com/DevExpress/testcafe/issues/6926)).
|
|
68
|
+
* TestCafe fails to start because it triggers the `dns.setDefaultResultOrder` method in older Node.js environments ([#7447](https://github.com/DevExpress/testcafe/issues/7447)).
|
|
69
|
+
* TestCafe depends on a vulnerable, outdated version of the `babel-plugin-module-resolver` package ([#7456](https://github.com/DevExpress/testcafe/issues/7456)).
|
|
70
|
+
|
|
3
71
|
## v2.2.0 (2022-12-29)
|
|
4
72
|
|
|
5
73
|
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.
|
package/package.json
CHANGED