@applitools/eyes-puppeteer 1.12.0 → 1.14.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 +14 -0
- package/README.md +56 -38
- package/package.json +14 -36
- package/types/index.d.ts +372 -366
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,20 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
## 1.14.0 - 2023/2/21
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
- Additional internal event logs
|
|
18
|
+
- Crop screenshot image base on account info
|
|
19
|
+
### Bug fixes
|
|
20
|
+
|
|
21
|
+
## 1.13.0 - 2022/12/20
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
### Bug fixes
|
|
25
|
+
- Handle fake shadowRoot with UFG
|
|
26
|
+
- Handed error during polling in long requests to eyes server
|
|
27
|
+
|
|
14
28
|
## 1.12.0 - 2022/12/1
|
|
15
29
|
|
|
16
30
|
### Features
|
package/README.md
CHANGED
|
@@ -7,52 +7,55 @@
|
|
|
7
7
|
</div>
|
|
8
8
|
<br/>
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
### Table of contents
|
|
11
11
|
|
|
12
12
|
- [Installation](#installation)
|
|
13
13
|
- [Applitools API key](#applitools-api-key)
|
|
14
14
|
- [Usage](#usage)
|
|
15
15
|
- [Getting started with the API](#getting-started-with-the-api)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- [
|
|
23
|
-
- [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
- [Eyes constructor](#eyes-constructor)
|
|
17
|
+
- [open](#open)
|
|
18
|
+
- [Visual tests and baselines](#visual-tests-and-baselines)
|
|
19
|
+
- [Batches](#batches)
|
|
20
|
+
- [check](#check)
|
|
21
|
+
- [`checkSettings`](#checksettings)
|
|
22
|
+
- [Page screenshot](#page-screenshot)
|
|
23
|
+
- [Region screenshot](#region-screenshot)
|
|
24
|
+
- [Working with frames](#working-with-frames)
|
|
25
|
+
- [Ignore Regions](#ignore-regions)
|
|
26
|
+
- [Floating Regions](#floating-regions)
|
|
27
|
+
- [Content/Strict/Layout Regions](#contentstrictlayout-regions)
|
|
28
|
+
- [Accessiblity Regions](#accessiblity-regions)
|
|
29
|
+
- [Scroll root element](#scroll-root-element)
|
|
30
|
+
- [Tag (`withName`)](#tag-withname)
|
|
31
|
+
- [Lazy loading (`lazyLoad`)](#lazy-loading-lazyload)
|
|
32
|
+
- [Other checkSettings configuration](#other-checksettings-configuration)
|
|
33
|
+
- [close](#close)
|
|
34
34
|
- [Runners](#runners)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
- [Purpose of runners](#purpose-of-runners)
|
|
36
|
+
- [1. Use the Ultrafast grid](#1-use-the-ultrafast-grid)
|
|
37
|
+
- [2. Manage tests across multiple `Eyes` instances](#2-manage-tests-across-multiple-eyes-instances)
|
|
38
38
|
- [Recipes for common tasks](#recipes-for-common-tasks)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
- [Configure Server URL](#configure-server-url)
|
|
40
|
+
- [Configure Proxy](#configure-proxy)
|
|
41
|
+
- [Make every visual test correspond to a functional test](#make-every-visual-test-correspond-to-a-functional-test)
|
|
42
|
+
- [Organize tests in batches](#organize-tests-in-batches)
|
|
43
|
+
- [Method 1: environment variable](#method-1-environment-variable)
|
|
44
|
+
- [Method 2: `eyes.setBatch`](#method-2-eyessetbatch)
|
|
45
|
+
- [Stitch mode](#stitch-mode)
|
|
46
|
+
- [Background information](#background-information)
|
|
47
47
|
- [1. Stitch mode: Scroll](#1-stitch-mode-scroll)
|
|
48
48
|
- [2. Stitch mode: CSS](#2-stitch-mode-css)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
- [Stitch overlap](#stitch-overlap)
|
|
50
|
+
- [Match level](#match-level)
|
|
51
|
+
- [Ignore displacements](#ignore-displacements)
|
|
52
|
+
- [Test properties](#test-properties)
|
|
53
|
+
- [Test results](#test-results)
|
|
54
|
+
- [Logging](#logging)
|
|
55
|
+
- [Configuring browsers for the Ultrafast grid](#configuring-browsers-for-the-ultrafast-grid)
|
|
56
|
+
- [Desktop browsers](#desktop-browsers)
|
|
57
|
+
- [Chrome device emulation](#chrome-device-emulation)
|
|
58
|
+
- [iOS device](#ios-device)
|
|
56
59
|
|
|
57
60
|
|
|
58
61
|
## Installation
|
|
@@ -716,7 +719,7 @@ It's possible to provide additional information about each test in custom fields
|
|
|
716
719
|
This is done by calling `setProperties` on the configuration, and providing it with an array of properties with the structure `{name, value}`. For example:
|
|
717
720
|
|
|
718
721
|
```js
|
|
719
|
-
const {Eyes
|
|
722
|
+
const {Eyes} = require('@applitools/eyes-puppeteer')
|
|
720
723
|
|
|
721
724
|
const eyes = new Eyes()
|
|
722
725
|
|
|
@@ -725,6 +728,21 @@ configuration.setProperties([{name: 'my custom property', value: 'some value'}])
|
|
|
725
728
|
eyes.setConfiguration(configuration)
|
|
726
729
|
```
|
|
727
730
|
|
|
731
|
+
The test properties could also be specified per batch by calling `setProperties` on the batch info, and providing it with an array of properties with the structure `{name, value}`. For example:
|
|
732
|
+
|
|
733
|
+
```js
|
|
734
|
+
const {Eyes, BatchInfo} = require('@applitools/eyes-puppeteer')
|
|
735
|
+
|
|
736
|
+
const eyes = new Eyes()
|
|
737
|
+
|
|
738
|
+
const batch = new BatchInfo()
|
|
739
|
+
batch.setProperties([{name: 'my custom batch property', value: 'some value'}])
|
|
740
|
+
|
|
741
|
+
const configuration = eyes.getConfiguration()
|
|
742
|
+
configuration.setBatch(batch)
|
|
743
|
+
eyes.setConfiguration(configuration)
|
|
744
|
+
```
|
|
745
|
+
|
|
728
746
|
### Test results
|
|
729
747
|
|
|
730
748
|
The results of the test can be consumed as the return value from `eyes.close`. Here's an example for creating a formatted output string out of the `TestResults` object:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-puppeteer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Applitools Eyes SDK for Puppeteer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eyes-puppeteer",
|
|
@@ -38,58 +38,36 @@
|
|
|
38
38
|
"types"
|
|
39
39
|
],
|
|
40
40
|
"scripts": {
|
|
41
|
-
"lint": "eslint '**/*.ts'",
|
|
42
|
-
"build": "ttsc",
|
|
41
|
+
"lint": "node ../../node_modules/.bin/eslint '**/*.ts'",
|
|
42
|
+
"build": "node ../../node_modules/.bin/ttsc --project ./tsconfig.build.json",
|
|
43
43
|
"generate:tests": "coverage-tests generate https://raw.githubusercontent.com/applitools/sdk.coverage.tests/universal-sdk/js/config.js --name 'eyes-puppeteer'",
|
|
44
44
|
"test": "yarn test:coverage",
|
|
45
45
|
"test:sanity": "echo 'create sanity suite'",
|
|
46
|
-
"test:coverage": "yarn generate:tests && APPLITOOLS_BATCH_NAME='JS Coverage Tests: eyes-puppeteer' APPLITOOLS_BATCH_ID=$(uuidgen)
|
|
46
|
+
"test:coverage": "yarn generate:tests && APPLITOOLS_BATCH_NAME='JS Coverage Tests: eyes-puppeteer' APPLITOOLS_BATCH_ID=$(uuidgen) mocha --exit --config .mocharc.cvg.js",
|
|
47
47
|
"report": "coverage-tests report https://raw.githubusercontent.com/applitools/sdk.coverage.tests/master/js/config.js --name 'eyes-puppeteer'",
|
|
48
|
-
"docker:build": "docker build -t applitools/puppeteer-chrome .",
|
|
49
|
-
"docker:rebuild": "docker build --no-cache -t applitools/puppeteer-chrome .",
|
|
50
|
-
"docker:run": "yarn docker:build && docker run -e NODE_AUTH_TOKEN --env APPLITOOLS_API_KEY=$APPLITOOLS_API_KEY_SDK --env APPLITOOLS_BATCH_NAME='JS Coverage Tests: eyes-puppeteer' --env APPLITOOLS_BATCH_ID=$(uuidgen) --env XUNIT_FILE=coverage-test-report.xml -it --init --rm -v $(pwd):/sandbox applitools/puppeteer-chrome",
|
|
51
48
|
"upgrade:framework": "if [ ! -z $APPLITOOLS_PUPPETEER_VERSION ]; then packagejson=`cat package.json`; yarn upgrade --no-lockfile puppeteer@$APPLITOOLS_PUPPETEER_VERSION; echo \"$packagejson\" > package.json; fi",
|
|
52
49
|
"deps": "bongo deps",
|
|
53
|
-
"gh:test": "gh workflow run test.yml --ref $(git rev-parse --abbrev-ref HEAD) -f packages='puppeteer' -f links='types test-utils
|
|
50
|
+
"gh:test": "gh workflow run test.yml --ref $(git rev-parse --abbrev-ref HEAD) -f packages='puppeteer' -f links='types test-utils eyes-sdk-core visual-grid-client eyes-api spec-driver-puppeteer utils driver snippets screenshoter'",
|
|
54
51
|
"gh:publish": "gh workflow run publish-puppeteer.yml --ref $(git rev-parse --abbrev-ref HEAD)",
|
|
55
|
-
"preversion": "bongo preversion --verifyPendingChanges
|
|
52
|
+
"preversion": "bongo preversion --verifyPendingChanges",
|
|
56
53
|
"version": "bongo version --withPendingChanges",
|
|
57
54
|
"postversion": "bongo postversion"
|
|
58
55
|
},
|
|
59
|
-
"husky": {
|
|
60
|
-
"hooks": {
|
|
61
|
-
"pre-push": "yarn bongo lint"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
56
|
"dependencies": {
|
|
65
|
-
"@applitools/core": "
|
|
66
|
-
"@applitools/eyes-api": "1.
|
|
67
|
-
"@applitools/spec-driver-puppeteer": "1.1.
|
|
57
|
+
"@applitools/core": "2.3.6",
|
|
58
|
+
"@applitools/eyes-api": "1.13.6",
|
|
59
|
+
"@applitools/spec-driver-puppeteer": "1.1.44"
|
|
68
60
|
},
|
|
69
61
|
"devDependencies": {
|
|
70
62
|
"@applitools/api-extractor": "1.2.11",
|
|
71
|
-
"@applitools/bongo": "^2.2.
|
|
72
|
-
"@applitools/
|
|
73
|
-
"@applitools/
|
|
74
|
-
"@applitools/sdk-shared": "0.9.15",
|
|
75
|
-
"@applitools/test-utils": "1.5.2",
|
|
63
|
+
"@applitools/bongo": "^2.2.5",
|
|
64
|
+
"@applitools/sdk-coverage-tests": "2.7.10",
|
|
65
|
+
"@applitools/test-utils": "1.5.12",
|
|
76
66
|
"@types/mocha": "^9.1.1",
|
|
77
67
|
"@types/node": "12",
|
|
78
|
-
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
79
|
-
"@typescript-eslint/parser": "^5.27.0",
|
|
80
|
-
"eslint": "^8.16.0",
|
|
81
|
-
"eslint-config-prettier": "^8.5.0",
|
|
82
|
-
"eslint-plugin-mocha-no-only": "^1.1.1",
|
|
83
|
-
"eslint-plugin-node": "^11.1.0",
|
|
84
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
85
|
-
"husky": "^4.3.8",
|
|
86
68
|
"mocha": "^9.2.2",
|
|
87
|
-
"
|
|
88
|
-
"puppeteer": "^18.0.5"
|
|
89
|
-
"spec-xunit-file": "0.0.1-3",
|
|
90
|
-
"ts-node": "^10.8.0",
|
|
91
|
-
"ttypescript": "^1.5.13",
|
|
92
|
-
"typescript": "^4.7.2"
|
|
69
|
+
"mocha-multi": "^1.1.7",
|
|
70
|
+
"puppeteer": "^18.0.5"
|
|
93
71
|
},
|
|
94
72
|
"peerDependencies": {
|
|
95
73
|
"puppeteer": ">=5.3.0"
|