@applitools/eyes-webdriverio 5.38.2 → 5.39.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 CHANGED
@@ -10,6 +10,14 @@
10
10
 
11
11
 
12
12
 
13
+ ## 5.39.0 - 2022/12/21
14
+
15
+ ### Features
16
+ - Added `nmgOptions` to `CheckSettings`
17
+ ### Bug fixes
18
+ - Handle fake shadowRoot with UFG
19
+ - Handed error during polling in long requests to eyes server
20
+
13
21
  ## 5.38.2 - 2022/12/1
14
22
 
15
23
  ### 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/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
  }
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.0",
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$([ ! -z $APPLITOOLS_WEBDRIVERIO_VERSION ] && echo .v${APPLITOOLS_WEBDRIVERIO_VERSION%%.*}).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`; yarn upgrade --no-lockfile webdriverio@$APPLITOOLS_WEBDRIVERIO_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,17 +116,17 @@
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.3",
120
+ "@applitools/eyes-api": "1.11.2",
121
+ "@applitools/spec-driver-webdriverio": "1.4.12"
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.4",
130
130
  "@types/mocha": "^9.1.1",
131
131
  "@types/node": "12",
132
132
  "@typescript-eslint/eslint-plugin": "^5.27.0",
package/types/index.d.ts CHANGED
@@ -425,6 +425,7 @@ export type CheckSettingsAutomationPlain = CheckSettingsImagePlain & {
425
425
  disableBrowserFetching?: boolean;
426
426
  layoutBreakpoints?: boolean | Array<number>;
427
427
  visualGridOptions?: { [key: string]: any; };
428
+ nmgOptions?: { [key: string]: any; };
428
429
  hooks?: { beforeCaptureScreenshot: string; };
429
430
  renderId?: string;
430
431
  timeout?: number;
@@ -446,6 +447,8 @@ export class CheckSettingsAutomation {
446
447
  beforeRenderScreenshotHook(script: string): CheckSettingsAutomation;
447
448
  ufgOption(key: string, value: any): CheckSettingsAutomation;
448
449
  ufgOptions(options: { [key: string]: any; }): CheckSettingsAutomation;
450
+ nmgOption(key: string, value: any): CheckSettingsAutomation;
451
+ nmgOptions(options: { [key: string]: any; }): CheckSettingsAutomation;
449
452
  renderId(renderId: string): CheckSettingsAutomation;
450
453
  timeout(timeout: number): CheckSettingsAutomation;
451
454
  waitBeforeCapture(waitBeforeCapture: number): CheckSettingsAutomation;