@applitools/eyes-playwright 1.13.2 → 1.14.1
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 +13 -0
- package/README.md +18 -0
- package/dist/api.js +17 -20
- package/package.json +17 -39
- package/types/index.d.ts +1527 -1
- package/types/api.d.ts +0 -46
- package/types/spec-driver.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,19 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
## 1.14.1 - 2023/3/22
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
### Bug fixes
|
|
18
|
+
- Fixed slowness during ufg tests
|
|
19
|
+
- Optimized number of requests during polling
|
|
20
|
+
|
|
21
|
+
## 1.14.0 - 2023/2/21
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
- Crop screenshot image base on account info
|
|
25
|
+
### Bug fixes
|
|
26
|
+
|
|
14
27
|
## 1.13.2 - 2023/1/20
|
|
15
28
|
|
|
16
29
|
### Features
|
package/README.md
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
- [Scroll root element](#scroll-root-element)
|
|
30
30
|
- [Tag (`withName`)](#tag-withname)
|
|
31
31
|
- [Lazy loading (`lazyLoad`)](#lazy-loading-lazyload)
|
|
32
|
+
- [Density metrics](#density-metrics-densitymetrics)
|
|
32
33
|
- [Other checkSettings configuration](#other-checksettings-configuration)
|
|
33
34
|
- [close](#close)
|
|
34
35
|
- [Runners](#runners)
|
|
@@ -396,6 +397,23 @@ Other details:
|
|
|
396
397
|
- `useDom`
|
|
397
398
|
- `enablePatterns`
|
|
398
399
|
|
|
400
|
+
##### Density metrics (`densityMetrics`)
|
|
401
|
+
|
|
402
|
+
In order to set the density metrics for the screenshot, use the `densityMetrics` method. This method accepts a object value with the following properties:
|
|
403
|
+
|
|
404
|
+
- `xdpi` - The exact physical pixels per inch of the screen in the X dimension.
|
|
405
|
+
- `ydpi` - The exact physical pixels per inch of the screen in the Y dimension.
|
|
406
|
+
- `scaleRatio` - The scale ratio.
|
|
407
|
+
|
|
408
|
+
```js
|
|
409
|
+
// set density metrics
|
|
410
|
+
eyes.check(Target.window().densityMetrics({
|
|
411
|
+
xdpi: 100,
|
|
412
|
+
ydpi: 100,
|
|
413
|
+
scaleRatio: 1
|
|
414
|
+
}))
|
|
415
|
+
```
|
|
416
|
+
|
|
399
417
|
### close
|
|
400
418
|
|
|
401
419
|
Closes the applitools test and check that all screenshots are valid.
|
package/dist/api.js
CHANGED
|
@@ -26,33 +26,30 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.closeBatch = exports.BatchClose = exports.Target = exports.
|
|
30
|
-
const
|
|
31
|
-
const api = __importStar(require("@applitools/eyes-api"));
|
|
29
|
+
exports.closeBatch = exports.BatchClose = exports.Configuration = exports.Target = exports.TargetAutomation = exports.CheckSettings = exports.CheckSettingsAutomation = exports.Eyes = void 0;
|
|
30
|
+
const eyes = __importStar(require("@applitools/eyes"));
|
|
32
31
|
const spec = __importStar(require("@applitools/spec-driver-playwright"));
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
});
|
|
37
|
-
__exportStar(require("@applitools/eyes-api"), exports);
|
|
38
|
-
class Eyes extends api.Eyes {
|
|
32
|
+
__exportStar(require("@applitools/eyes"), exports);
|
|
33
|
+
const sdk = { agentId: `eyes.playwright/${require('../package.json').version}`, spec };
|
|
34
|
+
class Eyes extends eyes.Eyes {
|
|
39
35
|
}
|
|
40
36
|
exports.Eyes = Eyes;
|
|
41
|
-
Eyes.
|
|
42
|
-
class
|
|
43
|
-
}
|
|
44
|
-
exports.Configuration = Configuration;
|
|
45
|
-
Configuration._spec = sdk;
|
|
46
|
-
class CheckSettingsAutomation extends api.CheckSettingsAutomation {
|
|
37
|
+
Eyes._sdk = sdk;
|
|
38
|
+
class CheckSettingsAutomation extends eyes.CheckSettingsAutomation {
|
|
47
39
|
}
|
|
48
40
|
exports.CheckSettingsAutomation = CheckSettingsAutomation;
|
|
49
|
-
CheckSettingsAutomation._spec =
|
|
41
|
+
CheckSettingsAutomation._spec = spec;
|
|
50
42
|
class CheckSettings extends CheckSettingsAutomation {
|
|
51
43
|
}
|
|
52
44
|
exports.CheckSettings = CheckSettings;
|
|
53
|
-
exports.
|
|
54
|
-
|
|
45
|
+
exports.TargetAutomation = { ...eyes.TargetAutomation, spec };
|
|
46
|
+
exports.Target = { ...eyes.Target, spec };
|
|
47
|
+
class Configuration extends eyes.Configuration {
|
|
48
|
+
}
|
|
49
|
+
exports.Configuration = Configuration;
|
|
50
|
+
Configuration._spec = spec;
|
|
51
|
+
class BatchClose extends eyes.BatchClose {
|
|
55
52
|
}
|
|
56
53
|
exports.BatchClose = BatchClose;
|
|
57
|
-
BatchClose.
|
|
58
|
-
exports.closeBatch =
|
|
54
|
+
BatchClose._sdk = sdk;
|
|
55
|
+
exports.closeBatch = eyes.closeBatch(sdk);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-playwright",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.1",
|
|
4
4
|
"description": "Applitools Eyes SDK for Playwright",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eyes-playwright",
|
|
@@ -37,55 +37,33 @@
|
|
|
37
37
|
"types"
|
|
38
38
|
],
|
|
39
39
|
"scripts": {
|
|
40
|
-
"lint": "eslint '**/*.ts'",
|
|
41
|
-
"build": "ttsc",
|
|
40
|
+
"lint": "node ../../node_modules/.bin/eslint '**/*.ts'",
|
|
41
|
+
"build": "node ../../node_modules/.bin/ttsc --project ./tsconfig.build.json",
|
|
42
42
|
"generate:tests": "coverage-tests generate https://raw.githubusercontent.com/applitools/sdk.coverage.tests/universal-sdk/js/config.js --name 'eyes-playwright'",
|
|
43
43
|
"test": "yarn test:coverage",
|
|
44
|
+
"test:coverage": "yarn generate:tests && APPLITOOLS_BATCH_NAME='JS Coverage Tests: eyes-playwright' APPLITOOLS_BATCH_ID=$(uuidgen) MOCHA_GROUP=coverage node ../../node_modules/.bin/mocha './test/generic/*.spec.js' --parallel --jobs ${MOCHA_JOBS:-15} --exit",
|
|
44
45
|
"test:sanity": "echo 'create sanity suite'",
|
|
45
|
-
"
|
|
46
|
-
"report": "coverage-tests report https://raw.githubusercontent.com/applitools/sdk.coverage.tests/master/js/config.js --name 'eyes-playwright'",
|
|
46
|
+
"report": "bongo report --name 'playwright'",
|
|
47
47
|
"upgrade:framework": "if [ ! -z $APPLITOOLS_PLAYWRIGHT_VERSION ]; then packagejson=`cat package.json`; yarn upgrade --no-lockfile playwright@$APPLITOOLS_PLAYWRIGHT_VERSION; echo \"$packagejson\" > package.json; fi",
|
|
48
48
|
"deps": "bongo deps",
|
|
49
|
-
"gh:test": "gh workflow run test.yml --ref $(git rev-parse --abbrev-ref HEAD) -f packages='playwright' -f links='types test-utils
|
|
49
|
+
"gh:test": "gh workflow run test.yml --ref $(git rev-parse --abbrev-ref HEAD) -f packages='playwright' -f links='types test-utils eyes-sdk-core visual-grid-client eyes spec-driver-playwright utils driver snippets screenshoter'",
|
|
50
50
|
"gh:publish": "gh workflow run publish-playwright.yml --ref $(git rev-parse --abbrev-ref HEAD)",
|
|
51
|
-
"preversion": "bongo preversion --verifyPendingChanges
|
|
51
|
+
"preversion": "bongo preversion --verifyPendingChanges",
|
|
52
52
|
"version": "bongo version --withPendingChanges",
|
|
53
|
-
"postversion": "bongo postversion"
|
|
54
|
-
|
|
55
|
-
"husky": {
|
|
56
|
-
"hooks": {
|
|
57
|
-
"pre-push": "yarn bongo lint"
|
|
58
|
-
}
|
|
53
|
+
"postversion": "bongo postversion",
|
|
54
|
+
"postpublish": "bongo send-release-notification --name 'playwright'"
|
|
59
55
|
},
|
|
60
56
|
"dependencies": {
|
|
61
|
-
"@applitools/
|
|
62
|
-
"@applitools/
|
|
63
|
-
"@applitools/spec-driver-playwright": "1.3.7"
|
|
57
|
+
"@applitools/eyes": "1.0.2",
|
|
58
|
+
"@applitools/spec-driver-playwright": "1.3.10"
|
|
64
59
|
},
|
|
65
60
|
"devDependencies": {
|
|
66
|
-
"@applitools/api-extractor": "1.2.
|
|
67
|
-
"@applitools/bongo": "^
|
|
68
|
-
"@applitools/
|
|
69
|
-
"@applitools/
|
|
70
|
-
"@
|
|
71
|
-
"
|
|
72
|
-
"@types/mocha": "^9.1.1",
|
|
73
|
-
"@types/node": "12",
|
|
74
|
-
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
75
|
-
"@typescript-eslint/parser": "^5.27.0",
|
|
76
|
-
"eslint": "^8.16.0",
|
|
77
|
-
"eslint-config-prettier": "^8.5.0",
|
|
78
|
-
"eslint-plugin-mocha-no-only": "^1.1.1",
|
|
79
|
-
"eslint-plugin-node": "^11.1.0",
|
|
80
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
81
|
-
"husky": "^4.3.7",
|
|
82
|
-
"mocha": "^10.0.0",
|
|
83
|
-
"playwright": "^1.22.2",
|
|
84
|
-
"prettier": "^2.6.2",
|
|
85
|
-
"spec-xunit-file": "0.0.1-3",
|
|
86
|
-
"ts-node": "^10.2.1",
|
|
87
|
-
"ttypescript": "^1.5.13",
|
|
88
|
-
"typescript": "^4.9.3"
|
|
61
|
+
"@applitools/api-extractor": "1.2.12",
|
|
62
|
+
"@applitools/bongo": "^3.0.2",
|
|
63
|
+
"@applitools/sdk-coverage-tests": "3.0.0",
|
|
64
|
+
"@applitools/test-utils": "1.5.14",
|
|
65
|
+
"@types/node": "^12.20.55",
|
|
66
|
+
"playwright": "^1.22.2"
|
|
89
67
|
},
|
|
90
68
|
"peerDependencies": {
|
|
91
69
|
"playwright": ">=1.0.0"
|