Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@applitools/screenshoter

Package Overview
Dependencies
Maintainers
33
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/screenshoter - npm Package Compare versions

Comparing version 3.7.1 to 3.7.2

src/extract-coordinates-for-selectors-and-elements.js

4

package.json
{
"name": "@applitools/screenshoter",
"version": "3.7.1",
"version": "3.7.2",
"description": "Applitools universal screenshoter for web and native applications",

@@ -75,3 +75,3 @@ "keywords": [

"dependencies": {
"@applitools/image": "1.0.4",
"@applitools/image": "1.0.5",
"@applitools/logger": "1.1.27",

@@ -78,0 +78,0 @@ "@applitools/snippets": "2.4.6",

@@ -6,13 +6,6 @@ const utils = require('@applitools/utils')

const screenshotRegion = utils.geometry.region(cropRegion, stitchedImage.size)
if (JSON.stringify(preMoveOffset) === JSON.stringify(postMoveOffset)) return screenshotRegion
const moveOffset = utils.geometry.offsetNegative(postMoveOffset, preMoveOffset)
const compensatedScreenshotRegion = utils.geometry.offset(screenshotRegion, moveOffset)
if (preMoveOffset.y === postMoveOffset.y && preMoveOffset.x !== postMoveOffset.x)
compensatedScreenshotRegion.x = preMoveOffset.x
return compensatedScreenshotRegion
return utils.geometry.offset(screenshotRegion, moveOffset)
}
module.exports = calculateScreenshotRegion

@@ -6,3 +6,3 @@ const {makeLogger} = require('@applitools/logger')

const takeSimpleScreenshot = require('./take-simple-screenshot')
const extractCoodinatesForSelectorsAndElements = require('./extract-coodinates-for-selectors-and-elements')
const extractCoordinatesForSelectorsAndElements = require('./extract-coordinates-for-selectors-and-elements')

@@ -96,3 +96,8 @@ async function takeScreenshot({

const calculatedRegions = await extractCoodinatesForSelectorsAndElements({regionsToCalculate, screenshot, context})
const calculatedRegions = await extractCoordinatesForSelectorsAndElements({
regionsToCalculate,
screenshot,
context,
logger,
})

@@ -99,0 +104,0 @@ if (hooks && hooks.afterScreenshot) {

@@ -148,2 +148,3 @@ const utils = require('@applitools/utils')

logger.verbose('restoring scroller state', scrollerState)
await scroller.restoreState(scrollerState)

@@ -150,0 +151,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc