protractor-image-comparison
Advanced tools
Comparing version 1.6.0 to 1.6.1
# CHANGELOG | ||
<a name="1.6.1"></a> | ||
# [1.6.1](https://github.com/wswebcreation/protractor-image-comparison/compare/v1.6.0...v1.6.1) (2018-04-01) | ||
### Bugfix | ||
* Fix `imageHeight` to set it correctly, if `screens.length === 1`, see [54](https://github.com/wswebcreation/protractor-image-comparison/pull/54), tnx to [JochenDiekenbrock](https://github.com/JochenDiekenbrock ) | ||
<a name="1.6.0"></a> | ||
@@ -4,0 +11,0 @@ # [1.6.0](https://github.com/wswebcreation/protractor-image-comparison/compare/v1.5.1...v1.6.0) (2018-03-04) |
10
index.js
@@ -168,3 +168,11 @@ 'use strict'; | ||
// Calculate total canvas size | ||
const imageHeight = screens.reduce((previous, current) => (previous instanceof Buffer ? previous.readUInt32BE(20) : previous) + current.readUInt32BE(20)); | ||
let imageHeight; | ||
if (screens.length > 1) { | ||
imageHeight = screens.reduce( | ||
(previous, current) => (previous instanceof Buffer ? previous.readUInt32BE(20) : previous) + current.readUInt32BE(20)); | ||
} else { | ||
imageHeight = screens[0].readUInt32BE(20); | ||
} | ||
const imageWidth = screens[0].readUInt32BE(16); | ||
@@ -171,0 +179,0 @@ const imageOutput = PNGJSImage.createImage(imageWidth, imageHeight); |
{ | ||
"name": "protractor-image-comparison", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "npm-module to compare images with protractor", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,2 +10,4 @@ protractor-image-comparison | ||
> **DUE TO CHROME REMOVING THE `disable-infobars` IN CHROME 65 MANY AUTOMATED VISUAL TESTS ON CHROME FAIL. I'M WORKING ON A SOLUTION FOR PROTRACTOR-IMAGE-COMPARISON. SORRY FOR THE INCONVENIENCE** | ||
## What can it do? | ||
@@ -12,0 +14,0 @@ *protractor-image-comparison* is a lightweight *protractor* plugin for browsers / mobile browsers / hybrid apps to do image comparison on screens or elements. |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
18989379
173
2354
95
25
1