@zohodesk/testinglibrary 0.3.0-experimental → 0.3.1-experimental
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/README.md
CHANGED
|
@@ -15,4 +15,15 @@
|
|
|
15
15
|
### Generate Report
|
|
16
16
|
|
|
17
17
|
- npm run report
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
## Version History
|
|
20
|
+
|
|
21
|
+
### v0.2.8 - 18-09-2024
|
|
22
|
+
|
|
23
|
+
#### Features
|
|
24
|
+
- Added support for writing unitcases for framework implementations
|
|
25
|
+
- Updated the configuration for `video` and `trace` to accept Playwright-specific values instead of boolean values.
|
|
26
|
+
|
|
27
|
+
#### Deprecations
|
|
28
|
+
- **Deprecated**: Passing `video` and `trace` as boolean (`true`/`false`) in project configuration.
|
|
29
|
+
- **New Approach**: Use Playwright values for `video` and `trace` options, such as `'on'`, `'retain-on-failure'`, or `'off'`.
|
|
@@ -38,12 +38,11 @@ const testDir = (0, _configUtils.getTestDir)(bddMode, process.cwd(), {
|
|
|
38
38
|
featureFilesFolder,
|
|
39
39
|
stepDefinitionsFolder
|
|
40
40
|
});
|
|
41
|
-
|
|
41
|
+
let use = {
|
|
42
42
|
trace,
|
|
43
43
|
video,
|
|
44
|
-
viewport,
|
|
45
44
|
testIdAttribute
|
|
46
|
-
}
|
|
45
|
+
};
|
|
47
46
|
|
|
48
47
|
/**
|
|
49
48
|
* Playwright configuration object
|
|
@@ -66,7 +65,7 @@ function getPlaywrightConfig() {
|
|
|
66
65
|
expect: {
|
|
67
66
|
timeout: expectTimeout
|
|
68
67
|
},
|
|
69
|
-
use
|
|
68
|
+
use,
|
|
70
69
|
projects: isAuthMode ? [{
|
|
71
70
|
name: 'setup',
|
|
72
71
|
testMatch: /.*\.setup\.js/,
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.getBrowsersList = getBrowsersList;
|
|
8
8
|
exports.getProjects = getProjects;
|
|
9
9
|
exports.getTestDir = getTestDir;
|
|
10
|
-
exports.getTestUseOptions = getTestUseOptions;
|
|
11
10
|
var _test = require("@playwright/test");
|
|
12
11
|
var _path = _interopRequireDefault(require("path"));
|
|
13
12
|
var _readConfigFile = require("../readConfigFile");
|
|
@@ -155,23 +154,4 @@ function getTestDir(bddMode, cwd, {
|
|
|
155
154
|
outputDir: _path.default.join(cwd, 'uat', '.features-gen'),
|
|
156
155
|
publish: true
|
|
157
156
|
}) : _path.default.join(cwd, 'uat');
|
|
158
|
-
}
|
|
159
|
-
function getTestUseOptions({
|
|
160
|
-
viewport,
|
|
161
|
-
trace,
|
|
162
|
-
video,
|
|
163
|
-
testIdAttribute
|
|
164
|
-
}) {
|
|
165
|
-
let defaultTestuseOptions = {
|
|
166
|
-
viewport,
|
|
167
|
-
testIdAttribute,
|
|
168
|
-
trace: trace ? 'on' : 'off',
|
|
169
|
-
video: video ? {
|
|
170
|
-
mode: 'on',
|
|
171
|
-
size: {
|
|
172
|
-
...viewport
|
|
173
|
-
}
|
|
174
|
-
} : 'off'
|
|
175
|
-
};
|
|
176
|
-
return defaultTestuseOptions;
|
|
177
157
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/testinglibrary",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1-experimental",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@babel/preset-react": "7.22.5",
|
|
25
25
|
"@cucumber/cucumber": "9.2.0",
|
|
26
|
-
"@playwright/test": "1.
|
|
26
|
+
"@playwright/test": "1.47.1",
|
|
27
27
|
"@testing-library/jest-dom": "5.11.9",
|
|
28
28
|
"@testing-library/react": "11.2.7",
|
|
29
29
|
"@testing-library/react-hooks": "7.0.2",
|
|
@@ -33,8 +33,7 @@
|
|
|
33
33
|
"jest": "29.6.2",
|
|
34
34
|
"jest-environment-jsdom": "29.6.2",
|
|
35
35
|
"msw": "1.2.3",
|
|
36
|
-
"playwright": "1.
|
|
37
|
-
"react": "^18.3.1",
|
|
36
|
+
"playwright": "1.47.1",
|
|
38
37
|
"supports-color": "8.1.1"
|
|
39
38
|
},
|
|
40
39
|
"bin": {
|