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

@percy/webdriver-utils

Package Overview
Dependencies
Maintainers
6
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@percy/webdriver-utils - npm Package Compare versions

Comparing version 1.27.0-beta.1 to 1.27.0-beta.2

15

dist/providers/automateProvider.js

@@ -92,4 +92,6 @@ import utils from '@percy/sdk-utils';

async getTiles(headerHeight, footerHeight, fullscreen) {
var _responseValue$metada;
if (!this.driver) throw new Error('Driver is null, please initialize driver with createDriver().');
log.debug('Starting actual screenshotting phase');
const dpr = await this.metaData.devicePixelRatio();
const response = await TimeIt.run('percyScreenshot:screenshot', async () => {

@@ -100,3 +102,3 @@ return await this.browserstackExecutor('percyScreenshot', {

screenshotType: 'singlepage',
scaleFactor: await this.metaData.devicePixelRatio(),
scaleFactor: dpr,
options: this.options

@@ -112,6 +114,7 @@ });

log.debug('Tiles captured successfully');
const windowHeight = (responseValue === null || responseValue === void 0 ? void 0 : (_responseValue$metada = responseValue.metadata) === null || _responseValue$metada === void 0 ? void 0 : _responseValue$metada.window_height) || 0;
for (let tileData of tileResponse.sha) {
tiles.push(new Tile({
statusBarHeight: 0,
navBarHeight: 0,
statusBarHeight: tileResponse.header_height || 0,
navBarHeight: tileResponse.footer_height || 0,
headerHeight,

@@ -124,5 +127,9 @@ footerHeight,

const metadata = {
windowHeight: Math.ceil(windowHeight * dpr)
};
return {
tiles: tiles,
domInfoSha: tileResponse.dom_sha
domInfoSha: tileResponse.dom_sha,
metadata: metadata
};

@@ -129,0 +136,0 @@ }

@@ -135,3 +135,4 @@ import utils from '@percy/sdk-utils';

clientInfo: [...this.clientInfo].join(' '),
domInfoSha: tiles.domInfoSha
domInfoSha: tiles.domInfoSha,
metadata: tiles.metadata || null
};

@@ -145,2 +146,10 @@ }

}
async getWindowHeight() {
// execute script and return window height
return await this.driver.executeScript({
script: 'return window.innerHeight',
args: []
});
;
}
async getTiles(headerHeight, footerHeight, fullscreen) {

@@ -160,3 +169,6 @@ if (!this.driver) throw new Error('Driver is null, please initialize driver with createDriver().');

// TODO: Add Generic support sha for contextual diff for non-automate
domInfoSha: await this.getDomContent()
domInfoSha: await this.getDomContent(),
metadata: {
windowHeight: await this.getWindowHeight()
}
};

@@ -163,0 +175,0 @@ }

{
"name": "@percy/webdriver-utils",
"version": "1.27.0-beta.1",
"version": "1.27.0-beta.2",
"license": "MIT",

@@ -32,6 +32,6 @@ "repository": {

"dependencies": {
"@percy/config": "1.27.0-beta.1",
"@percy/sdk-utils": "1.27.0-beta.1"
"@percy/config": "1.27.0-beta.2",
"@percy/sdk-utils": "1.27.0-beta.2"
},
"gitHead": "40cdf9c38613ccaf5e3707cd2cd2d2778ffbd5dd"
"gitHead": "bac46d4a3352884d4466cbc543ea599af33536ca"
}
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