@applitools/screenshoter
Advanced tools
Comparing version 3.2.5 to 3.2.6
@@ -7,3 +7,3 @@ { | ||
"version": "file:../dry-run.tgz", | ||
"integrity": "sha512-4dg3I0S18BIPhwzVzASacB3gOR5nKVzybivZJRsyJ2l/BQVY2g3FtV4oZp1RjkCty/FIQpv9E/BPrF/yE7Dylg==", | ||
"integrity": "sha512-Sr1U/Jv+3UlZy4KsSyJWFHRZiOpANrYKcvBRg9DFFv8J5GtMgP8j5NvyC6KPQ7wWp/sq0eHll0sCtfLsNCeqzw==", | ||
"requires": { | ||
@@ -10,0 +10,0 @@ "@applitools/snippets": "2.1.7", |
@@ -7,2 +7,6 @@ | ||
## 3.2.6 - 2021/10/12 | ||
- handle a case when scrolling element does not exist | ||
## 3.2.5 - 2021/10/5 | ||
@@ -9,0 +13,0 @@ |
{ | ||
"name": "@applitools/screenshoter", | ||
"version": "3.2.5", | ||
"version": "3.2.6", | ||
"description": "Applitools universal screenshoter for web and native applications", | ||
@@ -56,3 +56,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@applitools/driver": "1.2.5", | ||
"@applitools/driver": "1.2.6", | ||
"@applitools/sdk-release-kit": "0.13.3", | ||
@@ -59,0 +59,0 @@ "eslint": "^7.9.0", |
@@ -57,5 +57,6 @@ const utils = require('@applitools/utils') | ||
const screenshot = fully | ||
? await takeStitchedScreenshot({...target, withStatusBar, overlap, framed, wait, stabilization, debug, logger}) | ||
: await takeViewportScreenshot({...target, withStatusBar, wait, stabilization, debug, logger}) | ||
const screenshot = | ||
fully && target.scroller | ||
? await takeStitchedScreenshot({...target, withStatusBar, overlap, framed, wait, stabilization, debug, logger}) | ||
: await takeViewportScreenshot({...target, withStatusBar, wait, stabilization, debug, logger}) | ||
@@ -72,3 +73,5 @@ if (hooks && hooks.afterScreenshot) { | ||
} finally { | ||
await target.scroller.restoreScrollbars() | ||
if (target.scroller) { | ||
await target.scroller.restoreScrollbars() | ||
} | ||
@@ -98,3 +101,3 @@ // if there was active element and we have blurred it, then restore focus | ||
context: context.main, | ||
scroller: makeScroller({element: scrollingElement, scrollingMode, logger}), | ||
scroller: scrollingElement ? makeScroller({element: scrollingElement, scrollingMode, logger}) : null, | ||
} | ||
@@ -108,3 +111,3 @@ } else if (region) { | ||
region, | ||
scroller: makeScroller({element: scrollingElement, scrollingMode, logger}), | ||
scroller: scrollingElement ? makeScroller({element: scrollingElement, scrollingMode, logger}) : null, | ||
} | ||
@@ -128,3 +131,3 @@ } else { | ||
region, | ||
scroller: makeScroller({element: scrollingElement, scrollingMode, logger}), | ||
scroller: scrollingElement ? makeScroller({element: scrollingElement, scrollingMode, logger}) : null, | ||
} | ||
@@ -136,3 +139,3 @@ } else { | ||
region: await element.getRegion(), | ||
scroller: makeScroller({element: scrollingElement, scrollingMode, logger}), | ||
scroller: scrollingElement ? makeScroller({element: scrollingElement, scrollingMode, logger}) : null, | ||
} | ||
@@ -147,3 +150,3 @@ } | ||
context, | ||
scroller: makeScroller({logger, element: scrollingElement, scrollingMode}), | ||
scroller: scrollingElement ? makeScroller({logger, element: scrollingElement, scrollingMode}) : null, | ||
} | ||
@@ -156,3 +159,3 @@ } else { | ||
region: await element.getRegion(), // IMHO we should use CLIENT (without borders) region here | ||
scroller: makeScroller({logger, element: scrollingElement, scrollingMode}), | ||
scroller: scrollingElement ? makeScroller({logger, element: scrollingElement, scrollingMode}) : null, | ||
} | ||
@@ -159,0 +162,0 @@ } |
@@ -56,4 +56,8 @@ const assert = require('assert') | ||
it('take full app screenshot (non-scrollable)', () => { | ||
return fullApp({type: 'non-scrollable'}) | ||
}) | ||
it('take region screenshot', () => { | ||
region() | ||
return region() | ||
}) | ||
@@ -118,2 +122,5 @@ | ||
} | ||
} else if (type === 'non-scrollable') { | ||
buttonSelector = {type: 'id', selector: 'btn_edit_text'} | ||
expectedPath = `./test/fixtures/android/app-fully-non-scrollable${options.withStatusBar ? '-statusbar' : ''}.png` | ||
} else { | ||
@@ -120,0 +127,0 @@ buttonSelector = {type: 'id', selector: 'btn_scroll_view_footer_header'} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
27693470
80
2343
0