eyes.selenium
Advanced tools
Comparing version 3.8.11 to 3.9.0
@@ -6,2 +6,7 @@ # Changelog | ||
## 3.9.0 - 2020/5/19 | ||
- support accessibility validation | ||
- added SDK agent id header for eyes server requests | ||
## 3.8.11 - 2020/3/29 | ||
@@ -8,0 +13,0 @@ |
@@ -22,3 +22,3 @@ 'use strict' | ||
var EyesSDK = require('eyes.sdk') | ||
var EyesSDK = require('@applitools/eyes-sdk-core-legacy') | ||
exports.ConsoleLogHandler = EyesSDK.ConsoleLogHandler | ||
@@ -59,3 +59,3 @@ exports.ContextBasedScaleProvider = EyesSDK.ContextBasedScaleProvider | ||
var EyesUtils = require('eyes.utils') | ||
var EyesUtils = require('@applitools/eyes-common-legacy') | ||
exports.ArgumentGuard = EyesUtils.ArgumentGuard | ||
@@ -62,0 +62,0 @@ exports.GeneralUtils = EyesUtils.GeneralUtils |
{ | ||
"name": "eyes.selenium", | ||
"version": "3.8.11", | ||
"version": "3.9.0", | ||
"description": "Applitools Eyes SDK For Selenium JavaScript WebDriver", | ||
@@ -47,4 +47,4 @@ "keywords": [ | ||
"dependencies": { | ||
"eyes.sdk": "5.0.0", | ||
"eyes.utils": "4.0.0" | ||
"@applitools/eyes-common-legacy": "1.0.1", | ||
"@applitools/eyes-sdk-core-legacy": "1.0.0" | ||
}, | ||
@@ -54,2 +54,3 @@ "devDependencies": { | ||
"@types/node": "*", | ||
"axios": "^0.19.2", | ||
"chai": "^4.2.0", | ||
@@ -67,6 +68,3 @@ "chai-as-promised": "^7.1.1", | ||
"scripts": { | ||
"vv": "bongo --verify-versions", | ||
"vc": "bongo --verify-changelog", | ||
"uc": "bongo --update-changelog", | ||
"verify-commits": "bongo --verify-commits", | ||
"lint": "eslint . --ext .js --no-eslintrc --config ../../.eslintrc", | ||
"test": "npm run test:unit && npm run test:e2e", | ||
@@ -80,5 +78,5 @@ "test:e2e": "npm run test:selenium", | ||
"typings": "tsc --declaration", | ||
"preversion": "yarn vv && yarn vc && yarn verify-commits", | ||
"version": "yarn uc && git add CHANGELOG.md", | ||
"postversion": "git push --follow-tags" | ||
"preversion": "bongo preversion", | ||
"version": "bongo version", | ||
"postversion": "bongo postversion --skip-release-notification" | ||
}, | ||
@@ -85,0 +83,0 @@ "license": "SEE LICENSE IN LICENSE", |
;(function() { | ||
'use strict' | ||
var EyesSDK = require('eyes.sdk'), | ||
EyesUtils = require('eyes.utils'), | ||
var EyesSDK = require('@applitools/eyes-sdk-core-legacy'), | ||
EyesUtils = require('@applitools/eyes-common-legacy'), | ||
ScrollPositionProvider = require('../ScrollPositionProvider').ScrollPositionProvider, | ||
@@ -7,0 +7,0 @@ FrameChain = require('../FrameChain').FrameChain |
'use strict' | ||
const {ImageProvider, MutableImage} = require('eyes.sdk') | ||
const {ImageProvider, MutableImage} = require('@applitools/eyes-sdk-core-legacy') | ||
@@ -5,0 +5,0 @@ const {EyesWebDriverScreenshot} = require('./EyesWebDriverScreenshot') |
'use strict' | ||
const {BrowserNames} = require('eyes.utils') | ||
const {BrowserNames} = require('@applitools/eyes-common-legacy') | ||
@@ -5,0 +5,0 @@ const {TakesScreenshotImageProvider} = require('./TakesScreenshotImageProvider') |
'use strict' | ||
const {By} = require('selenium-webdriver') | ||
const {OSNames} = require('eyes.utils') | ||
const {ImageProvider, MutableImage} = require('eyes.sdk') | ||
const {OSNames} = require('@applitools/eyes-common-legacy') | ||
const {ImageProvider, MutableImage} = require('@applitools/eyes-sdk-core-legacy') | ||
@@ -7,0 +7,0 @@ const {ScrollPositionProvider} = require('../ScrollPositionProvider') |
'use strict' | ||
const {ImageProvider, MutableImage} = require('eyes.sdk') | ||
const {ImageProvider, MutableImage} = require('@applitools/eyes-sdk-core-legacy') | ||
@@ -5,0 +5,0 @@ /** |
;(function() { | ||
'use strict' | ||
var EyesSDK = require('eyes.sdk'), | ||
EyesUtils = require('eyes.utils'), | ||
var EyesSDK = require('@applitools/eyes-sdk-core-legacy'), | ||
EyesUtils = require('@applitools/eyes-common-legacy'), | ||
EyesSeleniumUtils = require('./EyesSeleniumUtils').EyesSeleniumUtils | ||
@@ -7,0 +7,0 @@ var PositionProvider = EyesSDK.PositionProvider, |
;(function() { | ||
'use strict' | ||
var EyesUtils = require('eyes.utils'), | ||
var EyesUtils = require('@applitools/eyes-common-legacy'), | ||
EyesRemoteWebElement = require('./EyesRemoteWebElement').EyesRemoteWebElement | ||
@@ -6,0 +6,0 @@ var GeneralUtils = EyesUtils.GeneralUtils |
;(function() { | ||
'use strict' | ||
var EyesSDK = require('eyes.sdk'), | ||
EyesUtils = require('eyes.utils') | ||
var EyesSDK = require('@applitools/eyes-sdk-core-legacy'), | ||
EyesUtils = require('@applitools/eyes-common-legacy') | ||
var PositionProvider = EyesSDK.PositionProvider, | ||
@@ -7,0 +7,0 @@ ArgumentGuard = EyesUtils.ArgumentGuard |
@@ -14,3 +14,3 @@ ;(function() { | ||
ScaleProviderIdentityFactory, | ||
} = require('eyes.sdk') | ||
} = require('@applitools/eyes-sdk-core-legacy') | ||
var { | ||
@@ -22,3 +22,3 @@ PromiseFactory, | ||
UserAgent, | ||
} = require('eyes.utils') | ||
} = require('@applitools/eyes-common-legacy') | ||
var EyesWebDriver = require('./EyesWebDriver').EyesWebDriver, | ||
@@ -84,8 +84,4 @@ ImageProviderFactory = require('./capture/ImageProviderFactory').ImageProviderFactory, | ||
Eyes.prototype.constructor = Eyes | ||
Eyes.prototype._getBaseAgentId = () => 'eyes.selenium.javascript/' + VERSION | ||
//noinspection JSUnusedGlobalSymbols | ||
Eyes.prototype._getBaseAgentId = function() { | ||
return 'eyes.selenium.javascript/' + VERSION | ||
} | ||
function _init(that, flow) { | ||
@@ -294,3 +290,3 @@ // Set PromiseFactory to work with the protractor control flow and promises | ||
if (!isElementObject(element)) { | ||
throw new Error('Unsupported floating region type: ' + typeof element) | ||
throw new Error('Unsupported floating region type: ' + element) | ||
} | ||
@@ -310,2 +306,21 @@ | ||
if (target.getAccessibilityObjects().length) { | ||
target.getAccessibilityObjects().forEach(function(obj) { | ||
promise = promise | ||
.then(function() { | ||
debugger | ||
var element = findElementByLocator(that, obj.element) | ||
if (!isElementObject(element)) { | ||
throw new Error('Unsupported accessibility region type: ' + typeof element) | ||
} | ||
return getRegionFromWebElement(element) | ||
}) | ||
.then(function(region) { | ||
region.regionType = obj.regionType | ||
target.accessibility(region) | ||
}) | ||
}) | ||
} | ||
that._logger.verbose( | ||
@@ -425,2 +440,9 @@ 'match starting with params', | ||
floating: target.getFloatingRegions(), | ||
accessibility: target.getAccessibilityRegions().map(x => ({ | ||
left: x.left, | ||
top: x.top, | ||
width: x.width, | ||
height: x.height, | ||
type: x.regionType, | ||
})), | ||
exact: null, | ||
@@ -427,0 +449,0 @@ } |
;(function() { | ||
'use strict' | ||
var EyesUtils = require('eyes.utils'), | ||
EyesSDK = require('eyes.sdk'), | ||
var EyesUtils = require('@applitools/eyes-common-legacy'), | ||
EyesSDK = require('@applitools/eyes-sdk-core-legacy'), | ||
EyesWebDriverScreenshot = require('./capture/EyesWebDriverScreenshot').EyesWebDriverScreenshot | ||
@@ -7,0 +7,0 @@ var RegionProvider = EyesSDK.RegionProvider, |
;(function() { | ||
'use strict' | ||
var EyesSDK = require('eyes.sdk'), | ||
EyesUtils = require('eyes.utils') | ||
var EyesSDK = require('@applitools/eyes-sdk-core-legacy'), | ||
EyesUtils = require('@applitools/eyes-common-legacy') | ||
var MouseAction = EyesSDK.Triggers.MouseAction, | ||
@@ -7,0 +7,0 @@ GeneralUtils = EyesUtils.GeneralUtils, |
;(function() { | ||
'use strict' | ||
var EyesSDK = require('eyes.sdk'), | ||
EyesUtils = require('eyes.utils') | ||
var EyesSDK = require('@applitools/eyes-sdk-core-legacy'), | ||
EyesUtils = require('@applitools/eyes-common-legacy') | ||
var MutableImage = EyesSDK.MutableImage, | ||
@@ -7,0 +7,0 @@ CoordinatesType = EyesSDK.CoordinatesType, |
;(function() { | ||
'use strict' | ||
var EyesUtils = require('eyes.utils'), | ||
var EyesUtils = require('@applitools/eyes-common-legacy'), | ||
FrameChain = require('./FrameChain').FrameChain, | ||
@@ -6,0 +6,0 @@ ScrollPositionProvider = require('./ScrollPositionProvider').ScrollPositionProvider, |
@@ -5,3 +5,3 @@ ;(function() { | ||
var webdriver = require('selenium-webdriver'), | ||
GeneralUtils = require('eyes.utils').GeneralUtils, | ||
GeneralUtils = require('@applitools/eyes-common-legacy').GeneralUtils, | ||
Frame = require('./Frame').Frame, | ||
@@ -8,0 +8,0 @@ FrameChain = require('./FrameChain').FrameChain, |
;(function() { | ||
'use strict' | ||
var ArgumentGuard = require('eyes.utils').ArgumentGuard | ||
var ArgumentGuard = require('@applitools/eyes-common-legacy').ArgumentGuard | ||
@@ -6,0 +6,0 @@ /** |
;(function() { | ||
'use strict' | ||
var EyesUtils = require('eyes.utils'), | ||
var EyesUtils = require('@applitools/eyes-common-legacy'), | ||
Frame = require('./Frame').Frame | ||
@@ -6,0 +6,0 @@ var ArgumentGuard = EyesUtils.ArgumentGuard, |
;(function() { | ||
'use strict' | ||
var ArgumentGuard = require('eyes.utils').ArgumentGuard | ||
var PositionProvider = require('eyes.sdk').PositionProvider | ||
var ArgumentGuard = require('@applitools/eyes-common-legacy').ArgumentGuard | ||
var PositionProvider = require('@applitools/eyes-sdk-core-legacy').PositionProvider | ||
var EyesSeleniumUtils = require('./EyesSeleniumUtils').EyesSeleniumUtils | ||
@@ -7,0 +7,0 @@ |
;(function() { | ||
'use strict' | ||
var GeometryUtils = require('eyes.utils').GeometryUtils | ||
var GeometryUtils = require('@applitools/eyes-common-legacy').GeometryUtils | ||
@@ -12,2 +12,5 @@ /** | ||
* maxLeftOffset: number, maxRightOffset: number, maxUpOffset: number, maxDownOffset: number}} FloatingElement | ||
* @typedef {{left: number, top: number, width: number, height: number, type: AccessibilityRegionType}} AccessibilityRegion | ||
* @typedef {{element: webdriver.WebElement|EyesRemoteWebElement|webdriver.By, | ||
* left: number, top: number, width: number, height: number, type: AccessibilityRegionType}} AccessibilityElement | ||
*/ | ||
@@ -30,5 +33,7 @@ | ||
this._floatingRegions = [] | ||
this._accessibilityRegions = [] | ||
this._ignoreObjects = [] | ||
this._floatingObjects = [] | ||
this._accessibilityObjects = [] | ||
} | ||
@@ -162,2 +167,21 @@ | ||
/** | ||
* @param {...(AccessibilityRegion|AccessibilityElement)} accessibilityRegion | ||
* @return {Target} | ||
*/ | ||
Target.prototype.accessibility = function(accessibilityRegion) { | ||
for (var i = 0, l = arguments.length; i < l; i++) { | ||
if (!arguments[i]) { | ||
throw new Error("Accesibility region can't be null or empty.") | ||
} | ||
if (GeometryUtils.isRegion(arguments[i]) && 'regionType' in arguments[i]) { | ||
this._accessibilityRegions.push(arguments[i]) | ||
} else { | ||
this._accessibilityObjects.push(arguments[i]) | ||
} | ||
} | ||
return this | ||
} | ||
/** | ||
* @return {Region|webdriver.WebElement|EyesRemoteWebElement|webdriver.By|null} | ||
@@ -254,2 +278,16 @@ */ | ||
/** | ||
* @return {AccessibilityRegion[]} | ||
*/ | ||
Target.prototype.getAccessibilityRegions = function() { | ||
return this._accessibilityRegions | ||
} | ||
/** | ||
* @return {AccessibilityElement[]} | ||
*/ | ||
Target.prototype.getAccessibilityObjects = function() { | ||
return this._accessibilityObjects | ||
} | ||
/** | ||
* @return {FloatingElement[]} | ||
@@ -256,0 +294,0 @@ */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
244526
6065
10
+ Added@applitools/eyes-common-legacy@1.0.1(transitive)
+ Added@applitools/eyes-sdk-core-legacy@1.0.0(transitive)
- Removedeyes.sdk@5.0.0
- Removedeyes.utils@4.0.0
- Removedeyes.sdk@5.0.0(transitive)
- Removedeyes.utils@4.0.0(transitive)