@applitools/eyes-webdriverio 5.42.0 → 5.42.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,12 @@
10
10
 
11
11
 
12
12
 
13
+ ## 5.42.1 - 2023/3/7
14
+
15
+ ### Features
16
+ - Added support for scroll root elements in ufg (only for native apps)
17
+ ### Bug fixes
18
+
13
19
  ## 5.42.0 - 2023/2/17
14
20
 
15
21
  ### Features
package/README.md CHANGED
@@ -397,6 +397,23 @@ eyes.check(Target.webview('webview-id'))
397
397
 
398
398
  After the check command, the SDK will switch the driver back to the app context that it was prior to performing the check.
399
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
+
400
417
  ###### Other checkSettings configuration
401
418
 
402
419
  <!-- TODO add explanation -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-webdriverio",
3
- "version": "5.42.0",
3
+ "version": "5.42.1",
4
4
  "description": "Applitools Eyes SDK for WebdriverIO",
5
5
  "keywords": [
6
6
  "eyes-webdriverio",
@@ -101,7 +101,7 @@
101
101
  "setup": "yarn docker:setup",
102
102
  "docker:setup": "node ../../scripts/generate-docker-compose-config.js && docker-compose up -d",
103
103
  "docker:teardown": "docker-compose down",
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",
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 @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 eyes-sdk-core visual-grid-client eyes-api spec-driver-webdriverio utils driver snippets screenshoter'",
@@ -111,14 +111,14 @@
111
111
  "postversion": "bongo postversion"
112
112
  },
113
113
  "dependencies": {
114
- "@applitools/core": "2.3.6",
115
- "@applitools/eyes-api": "1.13.6",
116
- "@applitools/spec-driver-webdriverio": "1.4.27"
114
+ "@applitools/core": "2.3.13",
115
+ "@applitools/eyes-api": "1.13.11",
116
+ "@applitools/spec-driver-webdriverio": "1.4.30"
117
117
  },
118
118
  "devDependencies": {
119
119
  "@applitools/api-extractor": "1.2.11",
120
120
  "@applitools/bongo": "^2.2.5",
121
- "@applitools/sdk-coverage-tests": "^2.7.10",
121
+ "@applitools/sdk-coverage-tests": "^2.7.12",
122
122
  "@applitools/test-utils": "1.5.12",
123
123
  "@types/mocha": "^9.1.1",
124
124
  "@types/node": "16",
package/types/index.d.ts CHANGED
@@ -73,7 +73,9 @@ export class Eyes {
73
73
  }, settings: Array<OCRRegion>): Promise<Array<string>>;
74
74
  extractText(settings: Array<OCRRegion>): Promise<Array<string>>;
75
75
  close(throwErr?: undefined | boolean): Promise<TestResults>;
76
+ closeAsync(): Promise<void>;
76
77
  abort(): Promise<TestResults>;
78
+ abortAsync(): Promise<void>;
77
79
  getViewportSize(): Promise<RectangleSize>;
78
80
  setViewportSize(size: RectangleSizePlain): Promise<void>;
79
81
  getScrollRootElement(): Element | EyesSelector<Selector>;
@@ -456,6 +458,7 @@ export class CheckSettingsAutomation {
456
458
  timeout(timeout: number): CheckSettingsAutomation;
457
459
  waitBeforeCapture(waitBeforeCapture: number): CheckSettingsAutomation;
458
460
  lazyLoad(options?: undefined | boolean | { scrollLength?: undefined | number; waitingTime?: undefined | number; maxAmountToScroll?: undefined | number; }): CheckSettingsAutomation;
461
+ densityMetrics(options: { scaleRatio?: undefined | number; xdpi?: undefined | number; ydpi?: undefined | number; }): CheckSettingsAutomation;
459
462
  name(name: string): CheckSettingsAutomation;
460
463
  withName(name: string): CheckSettingsAutomation;
461
464
  ignoreRegion(region: (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: undefined | string; shadow?: undefined | EyesSelector<Selector>; frame?: undefined | EyesSelector<Selector>; }))) | LegacyRegionPlain | { region: RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: undefined | string; shadow?: undefined | EyesSelector<Selector>; frame?: undefined | EyesSelector<Selector>; })); padding?: undefined | number | { top: number; bottom: number; left: number; right: number; }; regionId?: undefined | string; }): CheckSettingsAutomation;
@@ -866,6 +869,7 @@ export type CheckSettingsImagePlain = {
866
869
  }>;
867
870
  pageId?: undefined | string;
868
871
  variationGroupId?: undefined | string;
872
+ densityMetrics?: undefined | { scaleRatio?: undefined | number; xdpi?: undefined | number; ydpi?: undefined | number; };
869
873
  };
870
874
  export class CheckSettingsImage {
871
875
  constructor(settings?: undefined | CheckSettingsImage | CheckSettingsImagePlain, target?: undefined | {