@applitools/driver 1.8.10 → 1.8.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/context.js +1 -1
- package/dist/element.js +3 -2
- package/package.json +1 -1
package/dist/context.js
CHANGED
|
@@ -482,7 +482,7 @@ class Context {
|
|
|
482
482
|
// TODO revisit
|
|
483
483
|
if ((utils.geometry.contains(contextRegion, region) || !currentContext.isMain) &&
|
|
484
484
|
!utils.geometry.equals(contextRegion, region)) {
|
|
485
|
-
this._logger.log('Intersecting context region',
|
|
485
|
+
this._logger.log('Intersecting context region', contextRegion, 'with context region', region);
|
|
486
486
|
region = utils.geometry.intersect(contextRegion, utils.geometry.offset(region, contextRegion));
|
|
487
487
|
// region = utils.geometry.intersect(contextScrollingRegion, region)
|
|
488
488
|
region = utils.geometry.offsetNegative(region, parentContextInnerOffset);
|
package/dist/element.js
CHANGED
|
@@ -102,7 +102,7 @@ class Element {
|
|
|
102
102
|
innerElement = innerElement instanceof Element ? innerElement.target : innerElement;
|
|
103
103
|
if (this.driver.isWeb) {
|
|
104
104
|
this._logger.log('Checking if web element with selector', this.selector, 'contains element', innerElement);
|
|
105
|
-
return false; // TODO implement a
|
|
105
|
+
return false; // TODO implement a snipped for web
|
|
106
106
|
}
|
|
107
107
|
else {
|
|
108
108
|
this._logger.log('Checking if native element with selector', this.selector, 'contains element', innerElement);
|
|
@@ -115,6 +115,7 @@ class Element {
|
|
|
115
115
|
return utils.geometry.contains(region, innerRegion);
|
|
116
116
|
}
|
|
117
117
|
});
|
|
118
|
+
this._logger.log('Element with selector', this.selector, contains ? 'contains' : `doesn't contain`, innerElement);
|
|
118
119
|
return contains;
|
|
119
120
|
}
|
|
120
121
|
async init(context) {
|
|
@@ -304,7 +305,7 @@ class Element {
|
|
|
304
305
|
}
|
|
305
306
|
async scrollTo(offset) {
|
|
306
307
|
return this.withRefresh(async () => {
|
|
307
|
-
offset = utils.geometry.round(offset);
|
|
308
|
+
offset = utils.geometry.round({ x: Math.max(offset.x, 0), y: Math.max(offset.y, 0) });
|
|
308
309
|
if (this.driver.isWeb) {
|
|
309
310
|
let actualOffset = await this.context.execute(snippets.scrollTo, [this, offset]);
|
|
310
311
|
// iOS has an issue when scroll offset is read immediately after it is been set it will always return the exact value that was set
|