@applitools/eyes-webdriverio 5.38.2 → 5.39.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 CHANGED
@@ -10,6 +10,21 @@
10
10
 
11
11
 
12
12
 
13
+ ## 5.39.1 - 2023/1/5
14
+
15
+ ### Features
16
+ - Upgrade to wdio@8
17
+ ### Bug fixes
18
+ - Additional internal event logs
19
+
20
+ ## 5.39.0 - 2022/12/21
21
+
22
+ ### Features
23
+ - Added `nmgOptions` to `CheckSettings`
24
+ ### Bug fixes
25
+ - Handle fake shadowRoot with UFG
26
+ - Handed error during polling in long requests to eyes server
27
+
13
28
  ## 5.38.2 - 2022/12/1
14
29
 
15
30
  ### Features
package/README.md CHANGED
@@ -7,73 +7,77 @@
7
7
  </div>
8
8
  <br/>
9
9
 
10
- ## Table of contents
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
- * [Eyes constructor](#eyes-constructor)
17
- * [open](#open)
18
- + [Visual tests and baselines](#visual-tests-and-baselines)
19
- + [Batches](#batches)
20
- * [check](#check)
21
- + [Arguments to `eyes.check`](#arguments-to--eyescheck-)
22
- - [`tag`](#-tag-)
23
- - [`checkSettings`](#-checksettings-)
24
- * [Page screenshot](#page-screenshot)
25
- * [Region screenshot](#region-screenshot)
26
- * [Switching into frames](#switching-into-frames)
27
- * [Region in shadow DOM](#region-in-shadow-dom)
28
- * [Ignore Regions](#ignore-regions)
29
- * [Floating Regions](#floating-regions)
30
- * [Content/Strict/Layout Regions](#content-strict-layout-regions)
31
- * [Accessiblity Regions](#accessiblity-regions)
32
- * [Scroll root element](#scroll-root-element)
33
- * [Variation group ID](#variation-group-id)
34
- * [Lazy loading](#lazy-loading-lazyload)
35
- * [WebView](#webview-webview)
36
- * [Other checkSettings configuration](#other-checksettings-configuration)
37
- * [close](#close)
16
+ - [Eyes constructor](#eyes-constructor)
17
+ - [open](#open)
18
+ - [Visual tests and baselines](#visual-tests-and-baselines)
19
+ - [Batches](#batches)
20
+ - [check](#check)
21
+ - [Arguments to `eyes.check`](#arguments-to-eyescheck)
22
+ - [`tag`](#tag)
23
+ - [`checkSettings`](#checksettings)
24
+ - [Page screenshot](#page-screenshot)
25
+ - [Region screenshot](#region-screenshot)
26
+ - [Switching into frames](#switching-into-frames)
27
+ - [Region in shadow DOM](#region-in-shadow-dom)
28
+ - [Ignore Regions](#ignore-regions)
29
+ - [Floating Regions](#floating-regions)
30
+ - [Content/Strict/Layout Regions](#contentstrictlayout-regions)
31
+ - [Accessiblity Regions](#accessiblity-regions)
32
+ - [Scroll root element](#scroll-root-element)
33
+ - [Variation group ID](#variation-group-id)
34
+ - [Lazy loading (`lazyLoad`)](#lazy-loading-lazyload)
35
+ - [WebView (`webview`)](#webview-webview)
36
+ - [Other checkSettings configuration](#other-checksettings-configuration)
37
+ - [close](#close)
38
38
  - [Runners](#runners)
39
- * [Purpose of runners](#purpose-of-runners)
40
- + [1. Use the Ultrafast grid](#1-use-the-ultra-fast-grid)
41
- + [2. Manage tests across multiple `Eyes` instances](#2-manage-tests-across-multiple--eyes--instances)
39
+ - [Purpose of runners](#purpose-of-runners)
40
+ - [1. Use the Ultrafast grid](#1-use-the-ultrafast-grid)
41
+ - [2. Manage tests across multiple `Eyes` instances](#2-manage-tests-across-multiple-eyes-instances)
42
42
  - [Using the SDK as a service](#using-the-sdk-as-a-service)
43
- * [What is the service?](#what-is-the-service-)
44
- * [What is the difference from just using the SDK directly?](#what-is-the-difference-from-just-using-the-sdk-directly-)
45
- * [How to use the service](#how-to-use-the-service)
46
- * [Configure the service](#configure-the-service)
47
- + [Running with the Ultrafast grid](#running-with-the-ultra-fast-grid)
48
- + [Verbose logging](#verbose-logging)
49
- + [Override `testName` and `appName`](#override--testname--and--appname-)
50
- + [Batch completion notifications](#batch-completion-notifications)
51
- * [Using the service API](#using-the-service-api)
52
- + [`browser.eyesCheck(tag, checkSettings)`](#-browsereyescheck-tag--checksettings--)
53
- + [`browser.eyesGetTestResults()`](#-browsereyesgettestresults---)
54
- + [`browser.eyesSetScrollRootElement(selector)`](#-browsereyessetscrollrootelement-selector--)
55
- + [`browser.eyesSetConfiguration(configuration)`](#-browsereyessetconfiguration-configuration--)
56
- + [`browser.eyesGetConfiguration()`](#-browsereyesgetconfiguration---)
57
- + [`browser.eyesAddProperty(key, value)`](#-browsereyesaddproperty-key--value--)
58
- + [`browser.eyesClearProperties()`](#-browsereyesclearproperties---)
43
+ - [What is the service?](#what-is-the-service)
44
+ - [What is the difference from just using the SDK directly?](#what-is-the-difference-from-just-using-the-sdk-directly)
45
+ - [How to use the service](#how-to-use-the-service)
46
+ - [Configure the service](#configure-the-service)
47
+ - [Running with the Ultrafast grid](#running-with-the-ultrafast-grid)
48
+ - [Verbose logging](#verbose-logging)
49
+ - [Override `testName` and `appName`](#override-testname-and-appname)
50
+ - [Batch completion notifications](#batch-completion-notifications)
51
+ - [Using the service API](#using-the-service-api)
52
+ - [`browser.eyesCheck(tag, checkSettings)`](#browsereyeschecktag-checksettings)
53
+ - [`browser.eyesGetTestResults()`](#browsereyesgettestresults)
54
+ - [`browser.eyesSetScrollRootElement(selector)`](#browsereyessetscrollrootelementselector)
55
+ - [`browser.eyesSetConfiguration(configuration)`](#browsereyessetconfigurationconfiguration)
56
+ - [`browser.eyesGetConfiguration()`](#browsereyesgetconfiguration)
57
+ - [`browser.eyesAddProperty(key, value)`](#browsereyesaddpropertykey-value)
58
+ - [`browser.eyesClearProperties()`](#browsereyesclearproperties)
59
59
  - [Visual locators](#visual-locators)
60
60
  - [Recipes for common tasks](#recipes-for-common-tasks)
61
- * [Configure Server URL](#configure-server-url)
62
- * [Configure Proxy](#configure-proxy)
63
- * [Make every visual test correspond to a webdriver.io test](#make-every-visual-test-correspond-to-a-webdriverio-test)
64
- * [Organize tests in batches](#organize-tests-in-batches)
65
- + [Method 1: environment variable](#method-1--environment-variable)
66
- + [Method 2: `eyes.setBatch`](#method-2---eyessetbatch-)
67
- * [Stitch mode](#stitch-mode)
68
- + [Background information](#background-information)
69
- - [1. Stitch mode: Scroll](#1-stitch-mode--scroll)
70
- - [2. Stitch mode: CSS](#2-stitch-mode--css)
71
- * [Stitch overlap](#stitch-overlap)
72
- * [Match level](#match-level)
73
- * [Ignore displacements](#ignore-displacements)
74
- * [Test properties](#test-properties)
75
- * [Test results](#test-results)
76
- * [Logging](#logging)
61
+ - [Configure Server URL](#configure-server-url)
62
+ - [Configure Proxy](#configure-proxy)
63
+ - [Make every visual test correspond to a webdriver.io test](#make-every-visual-test-correspond-to-a-webdriverio-test)
64
+ - [Organize tests in batches](#organize-tests-in-batches)
65
+ - [Method 1: environment variable](#method-1-environment-variable)
66
+ - [Method 2: `eyes.setBatch`](#method-2-eyessetbatch)
67
+ - [Stitch mode](#stitch-mode)
68
+ - [Background information](#background-information)
69
+ - [1. Stitch mode: Scroll](#1-stitch-mode-scroll)
70
+ - [2. Stitch mode: CSS](#2-stitch-mode-css)
71
+ - [Stitch overlap](#stitch-overlap)
72
+ - [Match level](#match-level)
73
+ - [Ignore displacements](#ignore-displacements)
74
+ - [Test properties](#test-properties)
75
+ - [Test results](#test-results)
76
+ - [Logging](#logging)
77
+ - [Configuring browsers for the Ultrafast grid](#configuring-browsers-for-the-ultrafast-grid)
78
+ - [Desktop browsers](#desktop-browsers)
79
+ - [Chrome device emulation](#chrome-device-emulation)
80
+ - [iOS device](#ios-device)
77
81
 
78
82
  ## Installation
79
83
 
@@ -983,7 +987,7 @@ It's possible to provide additional information about each test in custom fields
983
987
  This is done by calling `setProperties` on the configuration, and providing it with an array of properties with the structure `{name, value}`. For example:
984
988
 
985
989
  ```js
986
- const {Eyes, Target} = require('@applitools/eyes-webdriverio')
990
+ const {Eyes} = require('@applitools/eyes-webdriverio')
987
991
 
988
992
  const eyes = new Eyes()
989
993
 
@@ -992,6 +996,21 @@ configuration.setProperties([{name: 'my custom property', value: 'some value'}])
992
996
  eyes.setConfiguration(configuration)
993
997
  ```
994
998
 
999
+ 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:
1000
+
1001
+ ```js
1002
+ const {Eyes, BatchInfo} = require('@applitools/eyes-webdriverio')
1003
+
1004
+ const eyes = new Eyes()
1005
+
1006
+ const batch = new BatchInfo()
1007
+ batch.setProperties([{name: 'my custom batch property', value: 'some value'}])
1008
+
1009
+ const configuration = eyes.getConfiguration()
1010
+ configuration.setBatch(batch)
1011
+ eyes.setConfiguration(configuration)
1012
+ ```
1013
+
995
1014
  ### Test results
996
1015
 
997
1016
  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/dist/legacy.js CHANGED
@@ -2,10 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.By = void 0;
4
4
  class By {
5
- constructor(value, using = 'css selector') {
6
- this.value = value;
7
- this.using = using;
8
- }
9
5
  static css(css) {
10
6
  return new By(css);
11
7
  }
@@ -33,6 +29,10 @@ class By {
33
29
  static xPath(xpath) {
34
30
  return By.xpath(xpath);
35
31
  }
32
+ constructor(value, using = 'css selector') {
33
+ this.value = value;
34
+ this.using = using;
35
+ }
36
36
  toString() {
37
37
  return `${this.using}:${this.value}`;
38
38
  }
package/dist/service.js CHANGED
@@ -22,12 +22,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
+ var _a;
25
26
  const core_1 = require("@applitools/core");
26
27
  const spec = __importStar(require("./spec-driver"));
27
28
  const api_1 = require("./api");
28
29
  if (!process.env.APPLITOOLS_WEBDRIVERIO_MAJOR_VERSION) {
29
30
  try {
30
- const { version } = require('webdriverio/package.json');
31
+ const version = (_a = process.env.APPLITOOLS_WEBDRIVERIO_VERSION) !== null && _a !== void 0 ? _a : require('webdriverio/package.json').version;
31
32
  const [major] = version.split('.', 1);
32
33
  process.env.APPLITOOLS_WEBDRIVERIO_MAJOR_VERSION = major;
33
34
  }
@@ -51,7 +52,7 @@ class EyesService {
51
52
  }
52
53
  async _eyesOpen() {
53
54
  if (!this._eyes.isOpen) {
54
- this._testResults = null;
55
+ this._testResults = undefined;
55
56
  await this._eyes.open(browser);
56
57
  }
57
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-webdriverio",
3
- "version": "5.38.2",
3
+ "version": "5.39.1",
4
4
  "description": "Applitools Eyes SDK for WebdriverIO",
5
5
  "keywords": [
6
6
  "eyes-webdriverio",
@@ -89,7 +89,7 @@
89
89
  ],
90
90
  "scripts": {
91
91
  "lint": "eslint '**/*.ts'",
92
- "build": "ttsc --project tsconfig$([ ! -z $APPLITOOLS_WEBDRIVERIO_MAJOR_VERSION ] && echo .v$APPLITOOLS_WEBDRIVERIO_MAJOR_VERSION).json",
92
+ "build": "ttsc --project tsconfig.build.v$([ ! -z $APPLITOOLS_WEBDRIVERIO_VERSION ] && echo ${APPLITOOLS_WEBDRIVERIO_VERSION%%.*} || echo 8).json",
93
93
  "generate:tests": "coverage-tests generate https://raw.githubusercontent.com/applitools/sdk.coverage.tests/universal-sdk/js/config.js --name 'eyes.webdriverio.javascript5'",
94
94
  "test": "yarn test:service && yarn test:coverage",
95
95
  "test:sanity": "echo 'create sanity suite'",
@@ -101,7 +101,7 @@
101
101
  "setup": "yarn docker:setup",
102
102
  "docker:setup": "node ../scripts/scripts/generate-docker-compose-config.js && docker-compose up -d",
103
103
  "docker:teardown": "docker-compose down",
104
- "upgrade:framework": "if [ ! -z $APPLITOOLS_WEBDRIVERIO_MAJOR_VERSION ]; then packagejson=`cat package.json`; yarn upgrade --no-lockfile webdriverio@$APPLITOOLS_WEBDRIVERIO_MAJOR_VERSION; echo \"$packagejson\" > package.json; fi",
104
+ "upgrade:framework": "if [ ! -z $APPLITOOLS_WEBDRIVERIO_VERSION ]; then packagejson=`cat package.json`; NODE_VERSION=${NODE_VERSION:-$(node -v)} yarn upgrade --no-lockfile webdriverio@$APPLITOOLS_WEBDRIVERIO_VERSION webdriver@$APPLITOOLS_WEBDRIVERIO_VERSION @types/node@${NODE_VERSION%%.*}; echo \"$packagejson\" > package.json; fi",
105
105
  "deps": "bongo deps",
106
106
  "gh:test": "gh workflow run test.yml --ref $(git rev-parse --abbrev-ref HEAD) -f packages='wdio wdio(node:14) wdio(node:12) wdio(protocol:cdp) wdio(framework:6) wdio(framework:5)'",
107
107
  "gh:test:links": "gh workflow run test.yml --ref $(git rev-parse --abbrev-ref HEAD) -f packages='wdio wdio+cdp wdio@6 wdio@5' -f links='types test-utils sdk-shared eyes-sdk-core visual-grid-client eyes-api spec-driver-webdriverio utils driver snippets screenshoter'",
@@ -116,31 +116,33 @@
116
116
  }
117
117
  },
118
118
  "dependencies": {
119
- "@applitools/core": "1.2.15",
120
- "@applitools/eyes-api": "1.10.7",
121
- "@applitools/spec-driver-webdriverio": "1.4.7"
119
+ "@applitools/core": "1.3.7",
120
+ "@applitools/eyes-api": "1.11.6",
121
+ "@applitools/spec-driver-webdriverio": "1.4.18"
122
122
  },
123
123
  "devDependencies": {
124
124
  "@applitools/api-extractor": "1.2.11",
125
125
  "@applitools/bongo": "^2.2.0",
126
126
  "@applitools/scripts": "1.2.0",
127
- "@applitools/sdk-coverage-tests": "^2.7.8",
127
+ "@applitools/sdk-coverage-tests": "^2.7.10",
128
128
  "@applitools/sdk-shared": "0.9.15",
129
- "@applitools/test-utils": "1.5.2",
129
+ "@applitools/test-utils": "1.5.6",
130
130
  "@types/mocha": "^9.1.1",
131
- "@types/node": "12",
131
+ "@types/node": "16",
132
132
  "@typescript-eslint/eslint-plugin": "^5.27.0",
133
133
  "@typescript-eslint/parser": "^5.27.0",
134
- "@wdio/cli": "^7.16.5",
135
- "@wdio/dot-reporter": "^7.16.4",
136
- "@wdio/local-runner": "^7.16.5",
137
- "@wdio/mocha-framework": "^7.16.4",
134
+ "@wdio/cli": "^8.0.15",
135
+ "@wdio/dot-reporter": "^8.0.14",
136
+ "@wdio/globals": "^8.0.15",
137
+ "@wdio/local-runner": "^8.0.15",
138
+ "@wdio/mocha-framework": "^8.0.14",
138
139
  "chromedriver": "^105.0.1",
139
140
  "eslint": "^8.16.0",
140
141
  "eslint-config-prettier": "^8.5.0",
141
142
  "eslint-plugin-mocha-no-only": "^1.1.1",
142
143
  "eslint-plugin-node": "^11.1.0",
143
144
  "eslint-plugin-prettier": "^4.0.0",
145
+ "expect-webdriverio": "^4.0.1",
144
146
  "geckodriver": "^1.20.0",
145
147
  "husky": "^4.3.8",
146
148
  "mocha": "^9.2.2",
@@ -148,11 +150,11 @@
148
150
  "spec-xunit-file": "0.0.1-3",
149
151
  "ts-node": "^10.8.0",
150
152
  "ttypescript": "^1.5.13",
151
- "typescript": "^4.7.2",
152
- "webdriverio": "^7.19.7"
153
+ "typescript": "^4.9.4",
154
+ "webdriverio": "^8.0.15"
153
155
  },
154
156
  "peerDependencies": {
155
- "webdriverio": "5.0.0 - 7.x.x"
157
+ "webdriverio": "5.0.0 - 8.x.x"
156
158
  },
157
159
  "engines": {
158
160
  "node": ">=12.13.0"