@applitools/driver
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -7,5 +7,5 @@ { | ||
"version": "file:../dry-run.tgz", | ||
"integrity": "sha512-wjMYlCrsc2UVVTWOM9lhTqd0y1yXwWeZILYL8CKyaX4bNqFh+dbAWcN2mcrqk9rNLz6X7innLCAiPLQOdwsV5Q==", | ||
"integrity": "sha512-N5y0yZDNbHa5IBxtT8teYlLYzxDPHZhuti01cdsiDKJb0EIaBTHyMIVrJnYT/Doi3tCG+JUdxtKZeVQWatfYMQ==", | ||
"requires": { | ||
"@applitools/snippets": "2.1.5", | ||
"@applitools/snippets": "2.1.6", | ||
"@applitools/types": "1.0.12", | ||
@@ -16,5 +16,5 @@ "@applitools/utils": "1.2.2" | ||
"@applitools/snippets": { | ||
"version": "2.1.5", | ||
"resolved": "https://registry.npmjs.org/@applitools/snippets/-/snippets-2.1.5.tgz", | ||
"integrity": "sha512-kgTE5NoSBauhpW+0klJRSsCD9Y/FCprVfUZXbrdM/QApnn1rmIYj5eY3IQ0KIxE7ekaIdM+UKzPp4wPN4gjN0g==" | ||
"version": "2.1.6", | ||
"resolved": "https://registry.npmjs.org/@applitools/snippets/-/snippets-2.1.6.tgz", | ||
"integrity": "sha512-0TIUBzPWyYNvCoKkpZEAPWh4K0ceGkB+OFuquinCHDoV1yjQr63b9jglNNQkCbg3cYtL3VfF6VEi0vyHRF6xrg==" | ||
}, | ||
@@ -21,0 +21,0 @@ "@applitools/types": { |
@@ -6,2 +6,6 @@ # Change Log | ||
## 1.1.5 - 2021/9/6 | ||
- updated to @applitools/snippets@2.1.6 (from 2.1.5) | ||
## 1.1.4 - 2021/9/6 | ||
@@ -8,0 +12,0 @@ |
{ | ||
"name": "@applitools/driver", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "Applitools universal framework wrapper", | ||
@@ -47,3 +47,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@applitools/snippets": "2.1.5", | ||
"@applitools/snippets": "2.1.6", | ||
"@applitools/types": "1.0.12", | ||
@@ -53,3 +53,3 @@ "@applitools/utils": "1.2.2" | ||
"devDependencies": { | ||
"@applitools/sdk-release-kit": "0.13.0", | ||
"@applitools/sdk-release-kit": "0.13.2", | ||
"@types/mocha": "^9.0.0", | ||
@@ -56,0 +56,0 @@ "@types/node": "^16.3.3", |
@@ -142,10 +142,12 @@ const {inspect} = require('util') | ||
this.mockScript(snippets.addElementIds, ([elements, ids]) => { | ||
for (const [index, el] of elements.entries()) { | ||
const selectors = [] | ||
for (const [index, element] of elements.entries()) { | ||
const elementId = ids[index] | ||
el.attributes = el.attributes || [] | ||
el.attributes.push({name: 'data-applitools-marker', value: ids[index]}) | ||
el.attributes.push({name: 'data-applitools-selector', value: elementId}) | ||
const selector = `[data-applitools-selector~="${elementId}"]` | ||
this.mockSelector(selector, element) | ||
selectors.push([selector]) | ||
} | ||
return ids.reduce((selectors, id) => { | ||
selectors[id] = [`[data-applitools-selector~="${id}"]`] | ||
return selectors | ||
}, {}) | ||
return selectors | ||
}) | ||
@@ -179,11 +181,5 @@ this.mockScript(snippets.cleanupElementIds, ([elements]) => { | ||
} | ||
let elements = this._elements.get(selector) | ||
if (!elements) { | ||
elements = [] | ||
this._elements.set(selector, elements) | ||
} | ||
if (element.shadow) { | ||
element.shadowRootId = Symbol('shadowId' + (element.name || Math.floor(Math.random() * 100))) | ||
} | ||
elements.push(element) | ||
if (element.frame) { | ||
@@ -209,2 +205,3 @@ const contextId = Symbol('contextId' + (element.name || Math.floor(Math.random() * 100))) | ||
} | ||
this.mockSelector(selector, element) | ||
return element | ||
@@ -224,2 +221,10 @@ } | ||
} | ||
mockSelector(selector, element) { | ||
let elements = this._elements.get(selector) | ||
if (!elements) { | ||
elements = [] | ||
this._elements.set(selector, elements) | ||
} | ||
elements.push(element) | ||
} | ||
wrapMethod(name, wrapper) { | ||
@@ -226,0 +231,0 @@ if (!this[name] || name.startsWith('_') || !utils.types.isFunction(this[name])) return |
Sorry, the diff of this file is not supported yet
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
232218
4188
0
+ Added@applitools/snippets@2.1.6(transitive)
- Removed@applitools/snippets@2.1.5(transitive)
Updated@applitools/snippets@2.1.6