@applitools/screenshoter 3.3.23 → 3.3.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/screenshoter",
3
- "version": "3.3.23",
3
+ "version": "3.3.26",
4
4
  "description": "Applitools universal screenshoter for web and native applications",
5
5
  "keywords": [
6
6
  "applitools",
@@ -25,6 +25,13 @@
25
25
  "name": "Applitools Team",
26
26
  "email": "team@applitools.com"
27
27
  },
28
+ "exports": {
29
+ ".": {
30
+ "default": "./index.js"
31
+ },
32
+ "./src/*": "./src/*",
33
+ "./package.json": "./package.json"
34
+ },
28
35
  "main": "./index.js",
29
36
  "files": [
30
37
  "src",
@@ -60,31 +67,31 @@
60
67
  }
61
68
  },
62
69
  "dependencies": {
63
- "@applitools/logger": "1.1.5",
70
+ "@applitools/logger": "1.1.8",
64
71
  "@applitools/snippets": "2.2.3",
65
- "@applitools/utils": "1.3.0",
72
+ "@applitools/utils": "1.3.3",
66
73
  "jpeg-js": "0.4.3",
67
74
  "png-async": "0.9.4"
68
75
  },
69
76
  "devDependencies": {
70
- "@applitools/bongo": "^2.0.3",
71
- "@applitools/driver": "^1.8.13",
77
+ "@applitools/bongo": "^2.1.1",
78
+ "@applitools/driver": "^1.8.15",
72
79
  "@applitools/scripts": "1.1.0",
73
- "@applitools/spec-driver-webdriverio": "1.2.9",
80
+ "@applitools/spec-driver-webdriverio": "1.2.10",
74
81
  "@applitools/test-utils": "1.3.2",
75
82
  "appium": "^1.22.3",
76
- "chromedriver": "^95.0.0",
77
- "eslint": "^7.9.0",
83
+ "chromedriver": "^101.0.0",
84
+ "eslint": "^8.16.0",
78
85
  "eslint-plugin-mocha-no-only": "^1.1.1",
79
86
  "eslint-plugin-node": "^11.1.0",
80
- "eslint-plugin-prettier": "^3.1.4",
87
+ "eslint-plugin-prettier": "^4.0.0",
81
88
  "husky": "^4.3.8",
82
- "mocha": "^9.2.0",
83
- "pixelmatch": "^5.2.1",
84
- "prettier": "1.19.0",
85
- "webdriverio": "^7.16.7"
89
+ "mocha": "^10.0.0",
90
+ "pixelmatch": "^5.3.0",
91
+ "prettier": "2.6.2",
92
+ "webdriverio": "^7.19.7"
86
93
  },
87
94
  "engines": {
88
- "node": ">= 10.0.0"
95
+ "node": ">=12.13.0"
89
96
  }
90
97
  }
package/src/image.js CHANGED
@@ -45,12 +45,12 @@ function makeImage(data) {
45
45
  const croppedSize = utils.geometry.size(transforms.crop || size)
46
46
  const scaledSize = utils.geometry.scale(croppedSize, transforms.scale)
47
47
  const rotatedSize = utils.geometry.rotate(scaledSize, transforms.rotate)
48
- return utils.geometry.round(rotatedSize)
48
+ return utils.geometry.ceil(rotatedSize)
49
49
  },
50
50
  get unscaledSize() {
51
51
  const croppedSize = utils.geometry.size(transforms.crop || size)
52
52
  const rotatedSize = utils.geometry.rotate(croppedSize, transforms.rotate)
53
- return utils.geometry.round(rotatedSize)
53
+ return utils.geometry.ceil(rotatedSize)
54
54
  },
55
55
  get rawSize() {
56
56
  return size
@@ -63,7 +63,9 @@ async function takeScreenshot({
63
63
  if (!window && !driver.isNative) {
64
64
  await scrollIntoViewport({context: target.context, region: target.region, scroller: target.scroller, logger})
65
65
  }
66
-
66
+ if (fully && !target.region && target.scroller) {
67
+ await target.scroller.moveTo({x: 0, y: 0})
68
+ }
67
69
  const screenshot =
68
70
  fully && target.scroller
69
71
  ? await takeStitchedScreenshot({