@applitools/driver 1.16.1 → 1.16.5
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/CHANGELOG.md +37 -0
- package/dist/driver.js +8 -6
- package/package.json +2 -2
- package/types/spec-driver.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.16.5](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.16.4...js/driver@1.16.5) (2024-03-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* trigger js release again ([1695f3d](https://github.com/Applitools-Dev/sdk/commit/1695f3d9967c7ab7b5d8c8637e86faa935a9047f))
|
|
9
|
+
|
|
10
|
+
## [1.16.4](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.16.3...js/driver@1.16.4) (2024-03-18)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* trigger js release ([dbc9bf8](https://github.com/Applitools-Dev/sdk/commit/dbc9bf8da3ab5d93e570881ba2c61efa47a1b342))
|
|
16
|
+
|
|
17
|
+
## [1.16.3](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.16.2...js/driver@1.16.3) (2024-03-17)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* skip execution of getCurrentWorld and getWorlds when env var is set ([#2234](https://github.com/Applitools-Dev/sdk/issues/2234)) ([3a88602](https://github.com/Applitools-Dev/sdk/commit/3a886028b0437b73dae0474408d9bb74ba940dec))
|
|
23
|
+
* trigger build ([acb9c88](https://github.com/Applitools-Dev/sdk/commit/acb9c88161cf55e8b1e409425b5571d69a2e1d5c))
|
|
24
|
+
|
|
25
|
+
## [1.16.2](https://github.com/applitools/eyes.sdk.javascript1/compare/js/driver@1.16.1...js/driver@1.16.2) (2024-01-30)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* losing root context after layout breakpoints reload ([#2113](https://github.com/applitools/eyes.sdk.javascript1/issues/2113)) ([afa1473](https://github.com/applitools/eyes.sdk.javascript1/commit/afa14735e5539ab0f79aa610e6ec1ea8989a5922))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Dependencies
|
|
34
|
+
|
|
35
|
+
* @applitools/snippets bumped to 2.4.25
|
|
36
|
+
#### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* losing root context after layout breakpoints reload ([#2113](https://github.com/applitools/eyes.sdk.javascript1/issues/2113)) ([afa1473](https://github.com/applitools/eyes.sdk.javascript1/commit/afa14735e5539ab0f79aa610e6ec1ea8989a5922))
|
|
39
|
+
|
|
3
40
|
## [1.16.1](https://github.com/applitools/eyes.sdk.javascript1/compare/js/driver@1.16.0...js/driver@1.16.1) (2023-12-19)
|
|
4
41
|
|
|
5
42
|
|
package/dist/driver.js
CHANGED
|
@@ -77,7 +77,10 @@ class Driver {
|
|
|
77
77
|
this._currentContext = context;
|
|
78
78
|
}
|
|
79
79
|
async reloadPage() {
|
|
80
|
-
|
|
80
|
+
if (this._spec.reload)
|
|
81
|
+
await this._spec.reload(this.target);
|
|
82
|
+
else
|
|
83
|
+
await this.mainContext.execute(snippets.reloadPage).catch(() => null);
|
|
81
84
|
const refreshThis = await this.refresh({ reset: false });
|
|
82
85
|
const scrollingElement = await this.mainContext.getScrollingElement();
|
|
83
86
|
await (scrollingElement === null || scrollingElement === void 0 ? void 0 : scrollingElement.refresh());
|
|
@@ -192,11 +195,10 @@ class Driver {
|
|
|
192
195
|
return this._driverInfo;
|
|
193
196
|
}
|
|
194
197
|
async getCapabilities({ force } = {}) {
|
|
195
|
-
var _a, _b, _c, _d, _e
|
|
198
|
+
var _a, _b, _c, _d, _e;
|
|
196
199
|
if (((_a = this._driverInfo) === null || _a === void 0 ? void 0 : _a.capabilities) === undefined || force) {
|
|
197
200
|
(_b = this._driverInfo) !== null && _b !== void 0 ? _b : (this._driverInfo = {});
|
|
198
|
-
await ((_d = (_c = this._spec).getCapabilities) === null || _d === void 0 ? void 0 : _d.call(_c, this.target));
|
|
199
|
-
this._driverInfo.capabilities = (_g = (await ((_f = (_e = this._spec).getCapabilities) === null || _f === void 0 ? void 0 : _f.call(_e, this.target)))) !== null && _g !== void 0 ? _g : null;
|
|
201
|
+
this._driverInfo.capabilities = (_e = (await ((_d = (_c = this._spec).getCapabilities) === null || _d === void 0 ? void 0 : _d.call(_c, this.target)))) !== null && _e !== void 0 ? _e : null;
|
|
200
202
|
this._logger.log('Extracted driver capabilities', this._driverInfo.capabilities);
|
|
201
203
|
}
|
|
202
204
|
return this._driverInfo.capabilities;
|
|
@@ -491,7 +493,7 @@ class Driver {
|
|
|
491
493
|
}
|
|
492
494
|
}
|
|
493
495
|
async getWorlds() {
|
|
494
|
-
if (!this._spec.getWorlds)
|
|
496
|
+
if (!this._spec.getWorlds || utils.general.getEnvValue('SKIP_DEPRECATED_JWP_COMMANDS', 'boolean'))
|
|
495
497
|
return null;
|
|
496
498
|
this._logger.log('Extracting worlds');
|
|
497
499
|
try {
|
|
@@ -510,7 +512,7 @@ class Driver {
|
|
|
510
512
|
}
|
|
511
513
|
}
|
|
512
514
|
async getCurrentWorld() {
|
|
513
|
-
if (!this._spec.getCurrentWorld)
|
|
515
|
+
if (!this._spec.getCurrentWorld || utils.general.getEnvValue('SKIP_DEPRECATED_JWP_COMMANDS', 'boolean'))
|
|
514
516
|
return null;
|
|
515
517
|
try {
|
|
516
518
|
this._logger.log('Extracting current world');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/driver",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.5",
|
|
4
4
|
"description": "Applitools universal framework wrapper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@applitools/logger": "2.0.14",
|
|
77
|
-
"@applitools/snippets": "2.4.
|
|
77
|
+
"@applitools/snippets": "2.4.25",
|
|
78
78
|
"@applitools/utils": "1.7.0",
|
|
79
79
|
"semver": "7.5.4"
|
|
80
80
|
},
|
package/types/spec-driver.d.ts
CHANGED
|
@@ -127,6 +127,7 @@ export interface SpecDriver<T extends SpecType> {
|
|
|
127
127
|
getCurrentWorld?(driver: T['driver']): Promise<string>;
|
|
128
128
|
getWorlds?(driver: T['driver']): Promise<string[]>;
|
|
129
129
|
switchWorld?(driver: T['driver'], id: string): Promise<void>;
|
|
130
|
+
reload?(driver: T['driver']): Promise<void>;
|
|
130
131
|
}
|
|
131
132
|
export type WaitOptions = {
|
|
132
133
|
state?: 'exist' | 'visible';
|