@applitools/eyes 1.11.3 → 1.12.0
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 +144 -0
- package/dist/Eyes.js +34 -27
- package/dist/output/TestResultContainer.js +7 -4
- package/package.json +5 -5
- package/types/Eyes.d.ts +1 -0
- package/types/index.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,149 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.12.0](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes@1.11.4...js/eyes@1.12.0) (2023-11-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* added `enableEyesLogs` configuration to the eyes service ([639ca8a](https://github.com/applitools/eyes.sdk.javascript1/commit/639ca8a021008d06fc09d19ca58ac3d00a18e4c3))
|
|
9
|
+
* added `useExecutionCloud` configuration to the eyes service ([#2033](https://github.com/applitools/eyes.sdk.javascript1/issues/2033)) ([639ca8a](https://github.com/applitools/eyes.sdk.javascript1/commit/639ca8a021008d06fc09d19ca58ac3d00a18e4c3))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* error to unknown type in exception ([#2035](https://github.com/applitools/eyes.sdk.javascript1/issues/2035)) ([16d78c3](https://github.com/applitools/eyes.sdk.javascript1/commit/16d78c3cce90a5cb50cc2aa4e9ab6a58b7b93f89))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Dependencies
|
|
18
|
+
|
|
19
|
+
* @applitools/utils bumped to 1.6.3
|
|
20
|
+
#### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* don't throw error for missing configuration file ([#2034](https://github.com/applitools/eyes.sdk.javascript1/issues/2034)) ([d084e7b](https://github.com/applitools/eyes.sdk.javascript1/commit/d084e7bf6e1727e3969622b4e597881f18241eb3))
|
|
23
|
+
* @applitools/logger bumped to 2.0.13
|
|
24
|
+
|
|
25
|
+
* @applitools/req bumped to 1.6.3
|
|
26
|
+
|
|
27
|
+
* @applitools/image bumped to 1.1.8
|
|
28
|
+
|
|
29
|
+
* @applitools/dom-snapshot bumped to 4.7.14
|
|
30
|
+
#### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* preserve css declarations order in dom-snapshot ([#2037](https://github.com/applitools/eyes.sdk.javascript1/issues/2037)) ([1381851](https://github.com/applitools/eyes.sdk.javascript1/commit/1381851d46f28ea7e7724025c4eab33c81c4e144))
|
|
33
|
+
* @applitools/spec-driver-webdriver bumped to 1.0.50
|
|
34
|
+
#### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* send devtool commands in chromium ([#2039](https://github.com/applitools/eyes.sdk.javascript1/issues/2039)) ([ff42043](https://github.com/applitools/eyes.sdk.javascript1/commit/ff42043c3d9f110eb7b22ab1a8448d77859923b4))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
* @applitools/spec-driver-puppeteer bumped to 1.3.0
|
|
41
|
+
#### Features
|
|
42
|
+
|
|
43
|
+
* added notification about outdated sdk version ([#2012](https://github.com/applitools/eyes.sdk.javascript1/issues/2012)) ([0f0a646](https://github.com/applitools/eyes.sdk.javascript1/commit/0f0a6462a56e7c97f9a22173c3b63af91e220adb))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
* @applitools/core-base bumped to 1.7.3
|
|
48
|
+
#### Bug Fixes
|
|
49
|
+
|
|
50
|
+
* remove connection timeout in case of a long running tasks ([#2006](https://github.com/applitools/eyes.sdk.javascript1/issues/2006)) ([49a596a](https://github.com/applitools/eyes.sdk.javascript1/commit/49a596ac1b022a66b5c07ecfee458cc061891ce0))
|
|
51
|
+
* return result when error in the ufg ([#2020](https://github.com/applitools/eyes.sdk.javascript1/issues/2020)) ([28cdcc5](https://github.com/applitools/eyes.sdk.javascript1/commit/28cdcc5a859641d0edde032165c5068fcc580c8d))
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
* @applitools/socket bumped to 1.1.13
|
|
56
|
+
|
|
57
|
+
* @applitools/spec-driver-selenium bumped to 1.5.64
|
|
58
|
+
|
|
59
|
+
* @applitools/driver bumped to 1.15.1
|
|
60
|
+
|
|
61
|
+
* @applitools/screenshoter bumped to 3.8.16
|
|
62
|
+
|
|
63
|
+
* @applitools/nml-client bumped to 1.5.16
|
|
64
|
+
|
|
65
|
+
* @applitools/tunnel-client bumped to 1.3.1
|
|
66
|
+
|
|
67
|
+
* @applitools/ufg-client bumped to 1.9.8
|
|
68
|
+
|
|
69
|
+
* @applitools/ec-client bumped to 1.7.16
|
|
70
|
+
|
|
71
|
+
* @applitools/core bumped to 4.2.0
|
|
72
|
+
#### Features
|
|
73
|
+
|
|
74
|
+
* added notification about outdated sdk version ([#2012](https://github.com/applitools/eyes.sdk.javascript1/issues/2012)) ([0f0a646](https://github.com/applitools/eyes.sdk.javascript1/commit/0f0a6462a56e7c97f9a22173c3b63af91e220adb))
|
|
75
|
+
* log driver environment info to splank ([#2023](https://github.com/applitools/eyes.sdk.javascript1/issues/2023)) ([11d0546](https://github.com/applitools/eyes.sdk.javascript1/commit/11d0546e76962b4c231e140b0229b8402da27f69))
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
#### Bug Fixes
|
|
79
|
+
|
|
80
|
+
* return result when error in the ufg ([#2020](https://github.com/applitools/eyes.sdk.javascript1/issues/2020)) ([28cdcc5](https://github.com/applitools/eyes.sdk.javascript1/commit/28cdcc5a859641d0edde032165c5068fcc580c8d))
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## [1.11.4](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes@1.11.3...js/eyes@1.11.4) (2023-11-07)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### Bug Fixes
|
|
89
|
+
|
|
90
|
+
* fixed issue when w3c properties were added to legacy capabilities object in `Eyes.setMobileCapabilities` method ([94d785f](https://github.com/applitools/eyes.sdk.javascript1/commit/94d785f0428df101c207d6f09a55c46f2bdbf19e))
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
### Dependencies
|
|
94
|
+
|
|
95
|
+
* @applitools/dom-shared bumped to 1.0.11
|
|
96
|
+
#### Bug Fixes
|
|
97
|
+
|
|
98
|
+
* (java/eyes-appium-java5): fix incorrect stitchMode mapping in checkSettings ([c70428e](https://github.com/applitools/eyes.sdk.javascript1/commit/c70428ec83e26b8b5e398ff11814f8376ca97d56))
|
|
99
|
+
* @applitools/dom-capture bumped to 11.2.4
|
|
100
|
+
#### Bug Fixes
|
|
101
|
+
|
|
102
|
+
* (java/eyes-appium-java5): fix incorrect stitchMode mapping in checkSettings ([c70428e](https://github.com/applitools/eyes.sdk.javascript1/commit/c70428ec83e26b8b5e398ff11814f8376ca97d56))
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
* @applitools/dom-snapshot bumped to 4.7.13
|
|
107
|
+
#### Bug Fixes
|
|
108
|
+
|
|
109
|
+
* (java/eyes-appium-java5): fix incorrect stitchMode mapping in checkSettings ([c70428e](https://github.com/applitools/eyes.sdk.javascript1/commit/c70428ec83e26b8b5e398ff11814f8376ca97d56))
|
|
110
|
+
* handled duplicated style properties in inline style tags ([#2014](https://github.com/applitools/eyes.sdk.javascript1/issues/2014)) ([2f8bada](https://github.com/applitools/eyes.sdk.javascript1/commit/2f8bada9cd44c65a69e54cbd08f57534632f12d2))
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
* @applitools/driver bumped to 1.15.0
|
|
115
|
+
#### Features
|
|
116
|
+
|
|
117
|
+
* added warning when driver used with capabilities that may conflict with applitools lib workflow ([#2011](https://github.com/applitools/eyes.sdk.javascript1/issues/2011)) ([081006d](https://github.com/applitools/eyes.sdk.javascript1/commit/081006d879894db03a2713129b66586496b6eb02))
|
|
118
|
+
* @applitools/screenshoter bumped to 3.8.15
|
|
119
|
+
|
|
120
|
+
* @applitools/nml-client bumped to 1.5.15
|
|
121
|
+
|
|
122
|
+
* @applitools/ufg-client bumped to 1.9.7
|
|
123
|
+
#### Bug Fixes
|
|
124
|
+
|
|
125
|
+
* added retries on ufg requests that respond with 503 status code ([7d78917](https://github.com/applitools/eyes.sdk.javascript1/commit/7d78917d559fa182c6723ca34cef2118cf08a036))
|
|
126
|
+
* @applitools/spec-driver-webdriver bumped to 1.0.49
|
|
127
|
+
|
|
128
|
+
* @applitools/spec-driver-selenium bumped to 1.5.63
|
|
129
|
+
|
|
130
|
+
* @applitools/spec-driver-puppeteer bumped to 1.2.5
|
|
131
|
+
|
|
132
|
+
* @applitools/ec-client bumped to 1.7.15
|
|
133
|
+
|
|
134
|
+
* @applitools/core bumped to 4.1.0
|
|
135
|
+
#### Features
|
|
136
|
+
|
|
137
|
+
* added warning when driver used with capabilities that may conflict with applitools lib workflow ([#2011](https://github.com/applitools/eyes.sdk.javascript1/issues/2011)) ([081006d](https://github.com/applitools/eyes.sdk.javascript1/commit/081006d879894db03a2713129b66586496b6eb02))
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
#### Bug Fixes
|
|
141
|
+
|
|
142
|
+
* fixed issue that caused dom snapshots to be taken for different viewport sizes when layout breakpoints were explicitly turned off ([4121876](https://github.com/applitools/eyes.sdk.javascript1/commit/4121876189f133b6023cfea52ca91c02c31079fb))
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
3
147
|
## [1.11.3](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes@1.11.2...js/eyes@1.11.3) (2023-10-30)
|
|
4
148
|
|
|
5
149
|
|
package/dist/Eyes.js
CHANGED
|
@@ -75,9 +75,11 @@ class Eyes {
|
|
|
75
75
|
url.password = config.proxy.password;
|
|
76
76
|
envs.APPLITOOLS_PROXY_URL = url.toString();
|
|
77
77
|
}
|
|
78
|
+
const isW3C = Object.keys(capabilities).some(capability => capability.includes(':'));
|
|
79
|
+
const prefix = isW3C ? 'appium:' : '';
|
|
78
80
|
return Object.assign(capabilities, {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
[`${prefix}optionalIntentArguments`]: `--es APPLITOOLS '${JSON.stringify(envs)}'`,
|
|
82
|
+
[`${prefix}processArguments`]: JSON.stringify({
|
|
81
83
|
args: [],
|
|
82
84
|
env: {
|
|
83
85
|
DYLD_INSERT_LIBRARIES: '@executable_path/Frameworks/Applitools_iOS.xcframework/ios-arm64/Applitools_iOS.framework/Applitools_iOS:@executable_path/Frameworks/Applitools_iOS.xcframework/ios-arm64_x86_64-simulator/Applitools_iOS.framework/Applitools_iOS',
|
|
@@ -373,35 +375,13 @@ class Eyes {
|
|
|
373
375
|
}, Promise.resolve([]));
|
|
374
376
|
}
|
|
375
377
|
async close(throwErr = true) {
|
|
376
|
-
var _a;
|
|
377
378
|
if (this._config.isDisabled)
|
|
378
379
|
return null;
|
|
379
380
|
if (!this.isOpen)
|
|
380
381
|
throw new EyesError_1.EyesError('Eyes not open');
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
const [result] = await this._eyes.getResults({ settings: { throwErr } });
|
|
385
|
-
return new TestResults_1.TestResultsData({ result, core: this._core });
|
|
386
|
-
}
|
|
387
|
-
catch (err) {
|
|
388
|
-
if ((_a = err.info) === null || _a === void 0 ? void 0 : _a.result) {
|
|
389
|
-
const result = new TestResults_1.TestResultsData({ result: err.info.result, core: this._core });
|
|
390
|
-
if (err.reason === 'test failed') {
|
|
391
|
-
throw new TestFailedError_1.TestFailedError(err.message, result);
|
|
392
|
-
}
|
|
393
|
-
else if (err.reason === 'test different') {
|
|
394
|
-
throw new DiffsFoundError_1.DiffsFoundError(err.message, result);
|
|
395
|
-
}
|
|
396
|
-
else if (err.reason === 'test new') {
|
|
397
|
-
throw new NewTestError_1.NewTestError(err.message, result);
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
throw err;
|
|
401
|
-
}
|
|
402
|
-
finally {
|
|
403
|
-
this._eyes = undefined;
|
|
404
|
-
}
|
|
382
|
+
await this.closeAsync();
|
|
383
|
+
const [result] = await this.getResults(throwErr);
|
|
384
|
+
return result;
|
|
405
385
|
}
|
|
406
386
|
async closeAsync() {
|
|
407
387
|
var _a;
|
|
@@ -432,6 +412,33 @@ class Eyes {
|
|
|
432
412
|
async abortIfNotClosed() {
|
|
433
413
|
return this.abort();
|
|
434
414
|
}
|
|
415
|
+
async getResults(throwErr = false) {
|
|
416
|
+
var _a;
|
|
417
|
+
if (this._config.isDisabled)
|
|
418
|
+
return null;
|
|
419
|
+
try {
|
|
420
|
+
const results = await this._eyes.getResults({ settings: { throwErr } });
|
|
421
|
+
return results.map(result => new TestResults_1.TestResultsData({ result, core: this._core }));
|
|
422
|
+
}
|
|
423
|
+
catch (error) {
|
|
424
|
+
if ((_a = error.info) === null || _a === void 0 ? void 0 : _a.result) {
|
|
425
|
+
const result = new TestResults_1.TestResultsData({ result: error.info.result, core: this._core });
|
|
426
|
+
if (error.reason === 'test failed') {
|
|
427
|
+
throw new TestFailedError_1.TestFailedError(error.message, result);
|
|
428
|
+
}
|
|
429
|
+
else if (error.reason === 'test different') {
|
|
430
|
+
throw new DiffsFoundError_1.DiffsFoundError(error.message, result);
|
|
431
|
+
}
|
|
432
|
+
else if (error.reason === 'test new') {
|
|
433
|
+
throw new NewTestError_1.NewTestError(error.message, result);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
throw error;
|
|
437
|
+
}
|
|
438
|
+
finally {
|
|
439
|
+
this._eyes = undefined;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
435
442
|
// #region CONFIG
|
|
436
443
|
async getViewportSize() {
|
|
437
444
|
var _a;
|
|
@@ -15,7 +15,10 @@ class TestResultContainerData {
|
|
|
15
15
|
return this.testResults && new TestResults_1.TestResultsData({ result: this.testResults, core: this._core });
|
|
16
16
|
}
|
|
17
17
|
get exception() {
|
|
18
|
-
|
|
18
|
+
if (!this._container.error || this._container.error instanceof Error)
|
|
19
|
+
return this._container.error;
|
|
20
|
+
else
|
|
21
|
+
return new Error(String(this._container.error));
|
|
19
22
|
}
|
|
20
23
|
getException() {
|
|
21
24
|
return this.exception;
|
|
@@ -29,9 +32,9 @@ class TestResultContainerData {
|
|
|
29
32
|
/** @internal */
|
|
30
33
|
toObject() {
|
|
31
34
|
return {
|
|
32
|
-
testResults: this.
|
|
33
|
-
exception: this.
|
|
34
|
-
browserInfo: this.
|
|
35
|
+
testResults: this.testResults,
|
|
36
|
+
exception: this.exception,
|
|
37
|
+
browserInfo: this.browserInfo,
|
|
35
38
|
};
|
|
36
39
|
}
|
|
37
40
|
/** @internal */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"applitools",
|
|
6
6
|
"eyes",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"test": "run --top-level mocha './test/**/*.spec.ts'"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@applitools/core": "4.0
|
|
49
|
-
"@applitools/logger": "2.0.
|
|
50
|
-
"@applitools/utils": "1.6.
|
|
48
|
+
"@applitools/core": "4.2.0",
|
|
49
|
+
"@applitools/logger": "2.0.13",
|
|
50
|
+
"@applitools/utils": "1.6.3"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@applitools/req": "^1.6.
|
|
53
|
+
"@applitools/req": "^1.6.3",
|
|
54
54
|
"@types/node": "^12.20.55"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
package/types/Eyes.d.ts
CHANGED
|
@@ -141,6 +141,7 @@ export declare class Eyes<TSpec extends Core.SpecType = Core.SpecType> {
|
|
|
141
141
|
abortAsync(): Promise<void>;
|
|
142
142
|
/** @deprecated */
|
|
143
143
|
abortIfNotClosed(): Promise<TestResults>;
|
|
144
|
+
getResults(throwErr?: boolean): Promise<TestResultsData[]>;
|
|
144
145
|
getViewportSize(): Promise<RectangleSizeData>;
|
|
145
146
|
setViewportSize(size: RectangleSize): Promise<void>;
|
|
146
147
|
getScrollRootElement(): TSpec['element'] | EyesSelector<TSpec['selector']>;
|
package/types/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export { NewTestError } from './errors/NewTestError';
|
|
|
22
22
|
export { AccessibilityMatchSettings as AccessibilityMatchSettingsPlain, AccessibilityMatchSettingsData as AccessibilityMatchSettings, } from './input/AccessibilityMatchSettings';
|
|
23
23
|
export { AccessibilitySettings } from './input/AccessibilitySettings';
|
|
24
24
|
export { BatchInfo as BatchInfoPlain, BatchInfoData as BatchInfo } from './input/BatchInfo';
|
|
25
|
+
export { Image } from './input/Image';
|
|
25
26
|
export { CheckSettingsImage as CheckSettingsImagePlain, CheckSettingsImageFluent as CheckSettingsImage, CheckSettingsAutomation as CheckSettingsAutomationPlain, CheckSettingsAutomationFluent as CheckSettingsAutomation, TargetImage, TargetAutomation, Target, } from './input/CheckSettings';
|
|
26
27
|
export { Configuration as ConfigurationPlain, ConfigurationData as Configuration } from './input/Configuration';
|
|
27
28
|
export { CutProvider as CutProviderPlain, CutProviderData as CutProvider, FixedCutProviderData as FixedCutProvider, UnscaledFixedCutProviderData as UnscaledFixedCutProvider, } from './input/CutProvider';
|