@applitools/driver 1.23.1 → 1.23.3
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 +19 -0
- package/dist/driver.js +10 -4
- package/package.json +3 -3
- package/types/types.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.23.3](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.23.2...js/driver@1.23.3) (2025-08-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* make orientation more robust | FLD-3470 ([#3166](https://github.com/Applitools-Dev/sdk/issues/3166)) ([3745427](https://github.com/Applitools-Dev/sdk/commit/37454279234b085dc9a159077b3f278cdccc203a))
|
|
9
|
+
|
|
10
|
+
## [1.23.2](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.23.1...js/driver@1.23.2) (2025-08-12)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Dependencies
|
|
14
|
+
|
|
15
|
+
* @applitools/utils bumped to 1.11.1
|
|
16
|
+
#### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* downgrade uuid to 9.0.1 ([#3169](https://github.com/Applitools-Dev/sdk/issues/3169)) ([30be8e3](https://github.com/Applitools-Dev/sdk/commit/30be8e35802b2c8bc970f62fdbd2d128f5a77fb7))
|
|
19
|
+
* @applitools/logger bumped to 2.2.2
|
|
20
|
+
|
|
21
|
+
|
|
3
22
|
## [1.23.1](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.23.0...js/driver@1.23.1) (2025-08-05)
|
|
4
23
|
|
|
5
24
|
|
package/dist/driver.js
CHANGED
|
@@ -792,7 +792,7 @@ class Driver {
|
|
|
792
792
|
return normalizedSize;
|
|
793
793
|
}
|
|
794
794
|
async getOrientation() {
|
|
795
|
-
var _a, _b, _c;
|
|
795
|
+
var _a, _b, _c, _d;
|
|
796
796
|
const environment = await this.getEnvironment();
|
|
797
797
|
if (!environment.isMobile)
|
|
798
798
|
return undefined;
|
|
@@ -804,13 +804,17 @@ class Driver {
|
|
|
804
804
|
}
|
|
805
805
|
else {
|
|
806
806
|
this._logger.log('Extracting device orientation using adb command on android');
|
|
807
|
-
|
|
807
|
+
let rotation = await this.execute('mobile:shell', {
|
|
808
808
|
command: "dumpsys window | grep 'mCurrentRotation' | cut -d = -f2",
|
|
809
809
|
})
|
|
810
810
|
.then(rotation => { var _a; return (_a = rotation === null || rotation === void 0 ? void 0 : rotation.trim) === null || _a === void 0 ? void 0 : _a.call(rotation); })
|
|
811
811
|
.catch(() => null);
|
|
812
812
|
if (rotation) {
|
|
813
|
-
|
|
813
|
+
if ((_b = rotation.includes) === null || _b === void 0 ? void 0 : _b.call(rotation, '\n')) {
|
|
814
|
+
this._logger.info('Device orientation extraction returned multiple lines, using the first one (primary display)', { rotation });
|
|
815
|
+
rotation = rotation.split('\n')[0].trim();
|
|
816
|
+
}
|
|
817
|
+
let orientation;
|
|
814
818
|
if (rotation === 'ROTATION_0' || rotation === '0')
|
|
815
819
|
orientation = 'portrait';
|
|
816
820
|
else if (rotation === 'ROTATION_90' || rotation === '3')
|
|
@@ -819,13 +823,15 @@ class Driver {
|
|
|
819
823
|
orientation = 'portrait-secondary';
|
|
820
824
|
else if (rotation === 'ROTATION_270' || rotation === '1')
|
|
821
825
|
orientation = 'landscape';
|
|
826
|
+
else
|
|
827
|
+
orientation = 'unknown';
|
|
822
828
|
this._logger.log('Extracted device orientation:', orientation);
|
|
823
829
|
return orientation;
|
|
824
830
|
}
|
|
825
831
|
}
|
|
826
832
|
}
|
|
827
833
|
this._logger.log('Extracting device orientation');
|
|
828
|
-
const orientation = await ((
|
|
834
|
+
const orientation = await ((_d = (_c = this._spec).getOrientation) === null || _d === void 0 ? void 0 : _d.call(_c, this.target));
|
|
829
835
|
this._logger.log('Extracted device orientation:', orientation);
|
|
830
836
|
return orientation;
|
|
831
837
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/driver",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.3",
|
|
4
4
|
"description": "Applitools universal framework wrapper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"test": "run --top-level mocha './test/**/*.spec.ts'"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@applitools/logger": "2.2.
|
|
76
|
+
"@applitools/logger": "2.2.2",
|
|
77
77
|
"@applitools/snippets": "2.7.0",
|
|
78
|
-
"@applitools/utils": "1.11.
|
|
78
|
+
"@applitools/utils": "1.11.1",
|
|
79
79
|
"semver": "7.6.2"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
package/types/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Location, Size, Region } from '@applitools/utils';
|
|
2
|
-
export type ScreenOrientation = 'portrait' | 'landscape' | 'portrait-secondary' | 'landscape-secondary';
|
|
2
|
+
export type ScreenOrientation = 'portrait' | 'landscape' | 'portrait-secondary' | 'landscape-secondary' | 'unknown';
|
|
3
3
|
export type Cookie = {
|
|
4
4
|
name: string;
|
|
5
5
|
value: string;
|