protractor-image-comparison
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -0,1 +1,11 @@ | ||
<a name="0.1.3"></a> | ||
## [0.1.3](https://github.com/wswebcreation/protractor-image-comparison/compare/v0.1.2...v0.1.3) (2016-11-22) | ||
### Bug Fixes | ||
* **element:** fix issue with determine elm position on large screen, fix determin position ([0756520](https://github.com/wswebcreation/protractor-image-comparison/commit/0756520)) | ||
<a name="0.1.2"></a> | ||
@@ -2,0 +12,0 @@ ## [0.1.2](https://github.com/wswebcreation/protractor-image-comparison/compare/v0.1.1...v0.1.2) (2016-11-21) |
@@ -124,4 +124,4 @@ 'use strict'; | ||
.then(position => { | ||
x = Math.floor(position.x); | ||
y = Math.floor(position.y); | ||
x = Math.round(position.x); | ||
y = Math.round(position.y); | ||
@@ -139,3 +139,4 @@ if (x < this.resizeDimensions) { | ||
console.log('\n WARNING: The y-coordinate may not be negative. No height resizing of the element has been executed\n'); | ||
} else if (((y - this.resizeDimensions) + height + 2 * this.resizeDimensions) > this.height) { | ||
} else if ((y < this.height && ((y - this.resizeDimensions) + height + 2 * this.resizeDimensions) > this.height) || | ||
((y - this.resizeDimensions) + height + 2 * this.resizeDimensions) > this.screenshotHeight) { | ||
console.log('\n WARNING: The new coordinate may not be outside the screen. No height resizing of the element has been executed\n'); | ||
@@ -313,3 +314,3 @@ } else { | ||
// this.nativeWebScreenshot of the constructor can be overruled by the capabilities when the constructor value is false | ||
if(!this.nativeWebScreenshot){ | ||
if (!this.nativeWebScreenshot) { | ||
this.nativeWebScreenshot = browserConfig.capabilities.nativeWebScreenshot ? true : false; | ||
@@ -316,0 +317,0 @@ } |
{ | ||
"name": "protractor-image-comparison", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "npm-module to compare images with protractor", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -77,2 +77,3 @@ 'use strict'; | ||
browser.executeScript('arguments[0].scrollIntoView();', dangerAlert.getWebElement()) | ||
.then(() => browser.sleep(500)) | ||
.then(() => expect(browser.imageComparson.checkElement(dangerAlert, dangerAlertElement)).toEqual(0)); | ||
@@ -87,3 +88,5 @@ }); | ||
browser.executeScript('arguments[0].scrollIntoView();', dangerAlert.getWebElement()) | ||
.then(() => browser.sleep(500)) | ||
.then(() => expect(browser.imageComparson.checkElement(dangerAlert, `resizeDimensions-${dangerAlertElement}`, {resizeDimensions: 15})).toEqual(0)); | ||
}); | ||
@@ -99,2 +102,3 @@ | ||
browser.executeScript('arguments[0].scrollIntoView(); arguments[0].style.color = "#2d7091";', dangerAlert.getWebElement()) | ||
.then(() => browser.sleep(500)) | ||
.then(() => expect(browser.imageComparson.checkElement(dangerAlert, dangerAlertElementFail)).toBeGreaterThan(0)); | ||
@@ -101,0 +105,0 @@ }); |
@@ -164,2 +164,3 @@ 'use strict'; | ||
browser.executeScript('arguments[0].scrollIntoView(); arguments[0].style.color = "#2d7091";', dangerAlert.getWebElement()) | ||
.then(() => browser.sleep(500)) | ||
.then(() => browser.imageComparson.checkElement(dangerAlert, dangerAlertElementFail)) | ||
@@ -166,0 +167,0 @@ .then(() => expect(fs.existsSync(`${differencePath}/${dangerAlertElementFail}-${devices[logName]['name']}.png`)).toBe(true)); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
8675555
1625