@applitools/eyes-images
Advanced tools
Comparing version 4.8.0 to 4.8.1
@@ -6,2 +6,14 @@ # Change Log | ||
## [4.8.1](https://github.com/applitools/eyes.sdk.javascript1/compare/@applitools/eyes-images@4.8.0...@applitools/eyes-images@4.8.1) (2019-02-27) | ||
### Bug Fixes | ||
* **eyes-images:** fix match of images by remote url using `Target.url()` ([88bb5ea](https://github.com/applitools/eyes.sdk.javascript1/commit/88bb5ea)) | ||
* **eyes-images:** fix use of screenshot retrieved from ImageProvider ([02d90c2](https://github.com/applitools/eyes.sdk.javascript1/commit/02d90c2)) | ||
# [4.8.0](https://github.com/applitools/eyes.sdk.javascript1/compare/@applitools/eyes-images@4.7.0...@applitools/eyes-images@4.8.0) (2019-02-19) | ||
@@ -8,0 +20,0 @@ |
@@ -271,6 +271,9 @@ 'use strict'; | ||
if (this._screenshotProvider) { | ||
this._screenshot = await this._screenshotProvider.getImage(); | ||
const screenshot = await this._screenshotProvider.getImage(); | ||
return new EyesSimpleScreenshot(screenshot); | ||
} else if (this._screenshot) { | ||
return new EyesSimpleScreenshot(this._screenshot); | ||
} | ||
return new EyesSimpleScreenshot(this._screenshot); | ||
return undefined; | ||
} | ||
@@ -277,0 +280,0 @@ |
'use strict'; | ||
const { CheckSettings, Location } = require('@applitools/eyes-sdk-core'); | ||
const { CheckSettings, Location, RectangleSize } = require('@applitools/eyes-sdk-core'); | ||
@@ -96,5 +96,10 @@ class ImagesCheckSettings extends CheckSettings { | ||
* @param {string} imageUrl | ||
* @param {RectangleSize|RectangleSizeObject} [imageSize] | ||
*/ | ||
setImageUrl(imageUrl) { | ||
setImageUrl(imageUrl, imageSize) { | ||
this._imageUrl = imageUrl; | ||
if (imageSize) { | ||
this.imageSize(imageSize); | ||
} | ||
} | ||
@@ -119,8 +124,7 @@ | ||
/** | ||
* @package | ||
* @param {RectangleSize} imageSize | ||
* @return {this} This instance of the settings object. | ||
*/ | ||
setImageSize(imageSize) { | ||
this._imageSize = imageSize; | ||
imageSize(imageSize) { | ||
this._imageSize = new RectangleSize(imageSize); | ||
return this; | ||
@@ -127,0 +131,0 @@ } |
@@ -86,4 +86,3 @@ 'use strict'; | ||
const checkSettings = new ImagesCheckSettings(); | ||
checkSettings.setImageUrl(imageUrl); | ||
checkSettings.setImageSize(imageSize); | ||
checkSettings.setImageUrl(imageUrl, imageSize); | ||
return checkSettings; | ||
@@ -90,0 +89,0 @@ } |
{ | ||
"name": "@applitools/eyes-images", | ||
"version": "4.8.0", | ||
"description": "The simplest implemnetation of Applitools Eyes SDK, uploads images for validation", | ||
"version": "4.8.1", | ||
"description": "The simplest implementation of Applitools Eyes SDK, uploads images for validation", | ||
"keywords": [ | ||
@@ -34,12 +34,12 @@ "eyes-images", | ||
"dependencies": { | ||
"@applitools/eyes-common": "^1.3.0", | ||
"@applitools/eyes-sdk-core": "^4.8.0" | ||
"@applitools/eyes-common": "^1.3.1", | ||
"@applitools/eyes-sdk-core": "^4.9.0" | ||
}, | ||
"devDependencies": { | ||
"axios": "^0.18.0", | ||
"mocha": "^5.2.0" | ||
"mocha": "^6.0.2" | ||
}, | ||
"scripts": { | ||
"test": "mocha --no-timeouts \"test/**/*.spec.js\"", | ||
"test:e2e": "mocha --no-timeouts \"test/e2e/**/*.spec.js\"" | ||
"test:it": "mocha --no-timeouts \"test/it/**/*.spec.js\"" | ||
}, | ||
@@ -50,3 +50,3 @@ "license": "SEE LICENSE IN LICENSE", | ||
}, | ||
"gitHead": "1e1eb86043169895a3d1e5535fd123fe4a8217c1" | ||
"gitHead": "904e77937820d97ca5e61bd5f0a9e11f867e61e5" | ||
} |
41121
567