@applitools/eyes 1.0.2 → 1.1.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/dist/Runners.js
CHANGED
|
@@ -44,7 +44,7 @@ class EyesRunner {
|
|
|
44
44
|
/** @internal */
|
|
45
45
|
async openEyes(options) {
|
|
46
46
|
var _a;
|
|
47
|
-
(_a = this._manager) !== null && _a !== void 0 ? _a : (this._manager = await this._core.makeManager({ type: this.type, settings: this.
|
|
47
|
+
(_a = this._manager) !== null && _a !== void 0 ? _a : (this._manager = await this._core.makeManager({ type: this.type, settings: this._managerSettings }));
|
|
48
48
|
return await this._manager.openEyes(options);
|
|
49
49
|
}
|
|
50
50
|
async getAllTestResults(throwErr = true) {
|
|
@@ -62,7 +62,7 @@ class EyesRunner {
|
|
|
62
62
|
},
|
|
63
63
|
});
|
|
64
64
|
try {
|
|
65
|
-
const summary = await this._manager.getResults({ settings: { throwErr } });
|
|
65
|
+
const summary = await this._manager.getResults({ settings: { throwErr, ...this._getResultsSettings } });
|
|
66
66
|
return new TestResultsSummary_1.TestResultsSummaryData({ summary, deleteTest });
|
|
67
67
|
}
|
|
68
68
|
catch (err) {
|
|
@@ -84,49 +84,45 @@ class EyesRunner {
|
|
|
84
84
|
}
|
|
85
85
|
exports.EyesRunner = EyesRunner;
|
|
86
86
|
class VisualGridRunner extends EyesRunner {
|
|
87
|
-
/** @internal */
|
|
88
|
-
get settings() {
|
|
89
|
-
return {
|
|
90
|
-
concurrency: this._testConcurrency,
|
|
91
|
-
legacyConcurrency: this._legacyConcurrency,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
87
|
constructor(optionsOrLegacyConcurrency) {
|
|
95
88
|
super();
|
|
96
89
|
/** @internal */
|
|
97
90
|
this.type = 'ufg';
|
|
98
91
|
if (utils.types.isNumber(optionsOrLegacyConcurrency)) {
|
|
99
|
-
this.
|
|
92
|
+
this._managerSettings = { legacyConcurrency: optionsOrLegacyConcurrency };
|
|
100
93
|
}
|
|
101
94
|
else if (optionsOrLegacyConcurrency) {
|
|
102
95
|
const options = optionsOrLegacyConcurrency instanceof RunnerOptions_1.RunnerOptionsFluent
|
|
103
96
|
? optionsOrLegacyConcurrency.toJSON()
|
|
104
97
|
: optionsOrLegacyConcurrency;
|
|
105
|
-
this.
|
|
98
|
+
this._managerSettings = { concurrency: options.testConcurrency };
|
|
99
|
+
this._getResultsSettings = { removeDuplicateTests: options.removeDuplicateTests };
|
|
106
100
|
}
|
|
107
101
|
}
|
|
108
102
|
get testConcurrency() {
|
|
109
|
-
|
|
103
|
+
var _a;
|
|
104
|
+
return (_a = this._managerSettings) === null || _a === void 0 ? void 0 : _a.concurrency;
|
|
110
105
|
}
|
|
111
106
|
/** @deprecated */
|
|
112
107
|
get legacyConcurrency() {
|
|
113
|
-
|
|
108
|
+
var _a;
|
|
109
|
+
return (_a = this._managerSettings) === null || _a === void 0 ? void 0 : _a.legacyConcurrency;
|
|
114
110
|
}
|
|
115
111
|
/** @deprecated */
|
|
116
112
|
getConcurrentSessions() {
|
|
117
|
-
|
|
113
|
+
var _a;
|
|
114
|
+
return (_a = this._managerSettings) === null || _a === void 0 ? void 0 : _a.legacyConcurrency;
|
|
118
115
|
}
|
|
119
116
|
}
|
|
120
117
|
exports.VisualGridRunner = VisualGridRunner;
|
|
121
118
|
class ClassicRunner extends EyesRunner {
|
|
122
|
-
constructor() {
|
|
123
|
-
super(
|
|
119
|
+
constructor(options) {
|
|
120
|
+
super();
|
|
124
121
|
/** @internal */
|
|
125
122
|
this.type = 'classic';
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
return {};
|
|
123
|
+
if (options) {
|
|
124
|
+
this._getResultsSettings = { removeDuplicateTests: options.removeDuplicateTests };
|
|
125
|
+
}
|
|
130
126
|
}
|
|
131
127
|
}
|
|
132
128
|
exports.ClassicRunner = ClassicRunner;
|
|
@@ -336,6 +336,12 @@ class TestResultsData {
|
|
|
336
336
|
setUrl(_url) {
|
|
337
337
|
// DEPRECATED
|
|
338
338
|
}
|
|
339
|
+
get server() {
|
|
340
|
+
return this._result.server;
|
|
341
|
+
}
|
|
342
|
+
get keepIfDuplicate() {
|
|
343
|
+
return this._result.keepIfDuplicate;
|
|
344
|
+
}
|
|
339
345
|
isPassed() {
|
|
340
346
|
return this._result.status === TestResultsStatus_1.TestResultsStatusEnum.Passed;
|
|
341
347
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"applitools",
|
|
6
6
|
"eyes",
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
"postversion": "bongo postversion"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@applitools/core": "2.4.
|
|
56
|
+
"@applitools/core": "2.4.5",
|
|
57
57
|
"@applitools/logger": "1.1.48",
|
|
58
58
|
"@applitools/utils": "1.3.32"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@applitools/bongo": "^3.0.
|
|
61
|
+
"@applitools/bongo": "^3.0.3",
|
|
62
62
|
"@applitools/req": "^1.1.33",
|
|
63
63
|
"@types/node": "^12.20.55"
|
|
64
64
|
},
|
package/types/Runners.d.ts
CHANGED
|
@@ -7,10 +7,11 @@ export declare abstract class EyesRunner {
|
|
|
7
7
|
private _core?;
|
|
8
8
|
private _manager?;
|
|
9
9
|
private _eyes;
|
|
10
|
-
/** @internal */
|
|
11
10
|
abstract readonly type: 'classic' | 'ufg';
|
|
12
11
|
/** @internal */
|
|
13
|
-
|
|
12
|
+
protected readonly _managerSettings?: Core.ManagerSettings;
|
|
13
|
+
/** @internal */
|
|
14
|
+
protected readonly _getResultsSettings?: Core.GetManagerResultsSettings<'classic' | 'ufg'>;
|
|
14
15
|
/** @internal */
|
|
15
16
|
attach<TSpec extends Core.SpecType = Core.SpecType>(eyes: Eyes<TSpec>, core: Core.Core<TSpec, 'classic' | 'ufg'>): void;
|
|
16
17
|
/** @internal */
|
|
@@ -23,15 +24,13 @@ export declare abstract class EyesRunner {
|
|
|
23
24
|
getAllTestResults(throwErr?: boolean): Promise<TestResultsSummaryData>;
|
|
24
25
|
}
|
|
25
26
|
export declare class VisualGridRunner extends EyesRunner {
|
|
26
|
-
private _testConcurrency?;
|
|
27
|
-
private _legacyConcurrency?;
|
|
28
27
|
/** @internal */
|
|
29
28
|
readonly type: "ufg";
|
|
30
29
|
/** @internal */
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
/** @internal */
|
|
31
|
+
protected readonly _managerSettings?: Core.ManagerSettings;
|
|
32
|
+
/** @internal */
|
|
33
|
+
protected readonly _getResultsSettings?: Core.GetManagerResultsSettings<'ufg'>;
|
|
35
34
|
constructor(options?: RunnerOptions);
|
|
36
35
|
/** @deprecated */
|
|
37
36
|
constructor(options?: RunnerOptionsFluent);
|
|
@@ -47,5 +46,6 @@ export declare class ClassicRunner extends EyesRunner {
|
|
|
47
46
|
/** @internal */
|
|
48
47
|
readonly type: "classic";
|
|
49
48
|
/** @internal */
|
|
50
|
-
|
|
49
|
+
protected readonly _getResultsSettings?: Core.GetManagerResultsSettings<'classic'>;
|
|
50
|
+
constructor(options?: RunnerOptions);
|
|
51
51
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type * as Core from '@applitools/core';
|
|
2
2
|
import { TestResultsStatus, TestResultsStatusEnum } from '../enums/TestResultsStatus';
|
|
3
|
+
import { ProxySettings } from '../input/ProxySettings';
|
|
3
4
|
import { RectangleSize, RectangleSizeData } from '../input/RectangleSize';
|
|
4
5
|
import { TestAccessibilityStatus } from './TestAccessibilityStatus';
|
|
5
6
|
import { SessionUrls, SessionUrlsData } from './SessionUrls';
|
|
@@ -35,6 +36,12 @@ export type TestResults = {
|
|
|
35
36
|
readonly layoutMatches?: number;
|
|
36
37
|
readonly noneMatches?: number;
|
|
37
38
|
readonly url?: string;
|
|
39
|
+
readonly server: {
|
|
40
|
+
serverUrl: string;
|
|
41
|
+
apiKey: string;
|
|
42
|
+
proxy?: ProxySettings;
|
|
43
|
+
};
|
|
44
|
+
readonly keepIfDuplicate: boolean;
|
|
38
45
|
};
|
|
39
46
|
export declare class TestResultsData implements Required<TestResults> {
|
|
40
47
|
private _result;
|
|
@@ -164,6 +171,8 @@ export declare class TestResultsData implements Required<TestResults> {
|
|
|
164
171
|
getUrl(): string;
|
|
165
172
|
/** @deprecated */
|
|
166
173
|
setUrl(_url: string): void;
|
|
174
|
+
get server(): Core.ServerSettings;
|
|
175
|
+
get keepIfDuplicate(): boolean;
|
|
167
176
|
isPassed(): boolean;
|
|
168
177
|
delete(): Promise<void>;
|
|
169
178
|
/** @deprecated */
|