@applitools/core 2.5.2 → 2.5.3-legacy
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/abort.js +40 -0
- package/dist/automation/abort.js +47 -0
- package/dist/automation/close.js +52 -0
- package/dist/automation/extract-text.js +3 -2
- package/dist/automation/get-nml-client.js +36 -0
- package/dist/automation/get-results.js +21 -0
- package/dist/automation/get-viewport-size.js +3 -2
- package/dist/automation/locate-text.js +3 -2
- package/dist/automation/locate.js +3 -2
- package/dist/automation/set-viewport-size.js +3 -2
- package/dist/automation/types.js +0 -15
- package/dist/automation/utils/report-kobiton.js +21 -0
- package/dist/automation/utils/take-screenshot.js +4 -2
- package/dist/automation/utils/to-base-check-settings.js +69 -7
- package/dist/automation/utils/to-environment-key.js +31 -0
- package/dist/automation/utils/uniquify-environments.js +27 -0
- package/dist/automation/utils/wait-for-lazy-load.js +9 -8
- package/dist/autonomous/core.js +25 -0
- package/dist/autonomous/create-render-results.js +49 -0
- package/dist/autonomous/create-render-target.js +19 -0
- package/dist/autonomous/get-render-results.js +55 -0
- package/dist/autonomous/open-eyes.js +13 -0
- package/dist/autonomous/start-renders.js +67 -0
- package/dist/autonomous/take-snapshots.js +16 -0
- package/dist/autonomous/types.js +17 -0
- package/dist/check-and-close.js +32 -15
- package/dist/check.js +33 -30
- package/dist/classic/check-and-close.js +189 -46
- package/dist/classic/check.js +319 -60
- package/dist/classic/core.js +6 -5
- package/dist/classic/get-base-eyes.js +27 -7
- package/dist/classic/open-eyes.js +47 -57
- package/dist/classic/utils/extract-default-environments.js +73 -0
- package/dist/classic/utils/take-dom-capture.js +2 -1
- package/dist/classic/utils/take-screenshots.js +63 -0
- package/dist/cli/cli.js +99 -3
- package/dist/close-batch.js +8 -7
- package/dist/close.js +32 -4
- package/dist/core.js +43 -9
- package/dist/delete-test.js +9 -7
- package/dist/extract-text.js +9 -5
- package/dist/get-account-info.js +36 -0
- package/dist/get-ec-client.js +3 -2
- package/dist/get-eyes-results.js +29 -3
- package/dist/get-manager-results.js +52 -18
- package/dist/get-typed-eyes.js +5 -6
- package/dist/index.js +3 -3
- package/dist/lang.js +31 -0
- package/dist/locate-text.js +7 -5
- package/dist/locate.js +7 -5
- package/dist/make-manager.js +34 -11
- package/dist/offline/merge-configs.js +42 -0
- package/dist/offline/run-offline-snapshots.js +341 -0
- package/dist/open-eyes.js +192 -48
- package/dist/run-offline-snapshots.js +336 -0
- package/dist/troubleshoot/check-network.js +5 -1
- package/dist/troubleshoot/eyes.js +3 -3
- package/dist/troubleshoot/logs.js +76 -0
- package/dist/troubleshoot/ufg.js +23 -16
- package/dist/ufg/check-and-close.js +109 -174
- package/dist/ufg/check.js +111 -178
- package/dist/ufg/core.js +10 -8
- package/dist/ufg/create-render-target-from-snapshot.js +21 -0
- package/dist/ufg/get-base-eyes.js +40 -12
- package/dist/ufg/get-ufg-client.js +13 -4
- package/dist/ufg/open-eyes.js +33 -57
- package/dist/ufg/take-snapshots.js +92 -0
- package/dist/ufg/utils/extract-default-environment.js +22 -0
- package/dist/ufg/utils/generate-safe-selectors.js +9 -32
- package/dist/ufg/utils/take-dom-snapshot.js +61 -26
- package/dist/ufg/utils/take-dom-snapshots.js +99 -68
- package/dist/ufg/utils/to-generated-selectors.js +67 -0
- package/dist/ufg/utils/to-safe-check-settings.js +69 -0
- package/dist/universal/core-server.js +53 -22
- package/dist/universal/core.js +23 -6
- package/dist/universal/history.js +9 -0
- package/dist/universal/spec-driver.js +46 -50
- package/dist/{ufg/get-nml-client.js → utils/ensure-offline-folder.js} +14 -13
- package/dist/utils/extract-branching-timestamp.js +56 -0
- package/dist/utils/extract-current-commit.js +72 -0
- package/dist/utils/extract-git-info.js +168 -0
- package/dist/utils/extract-start-info.js +100 -0
- package/dist/utils/extract-test-environment.js +70 -0
- package/dist/utils/memory-usage-logging.js +46 -0
- package/dist/utils/populate-eyes-server-settings.js +41 -0
- package/dist/utils/validate-sdk-version.js +89 -0
- package/package.json +3 -3
- package/types/abort.d.ts +13 -0
- package/types/automation/abort.d.ts +16 -0
- package/types/automation/close.d.ts +14 -0
- package/types/automation/extract-text.d.ts +1 -1
- package/types/automation/get-nml-client.d.ts +16 -0
- package/types/automation/get-results.d.ts +11 -0
- package/types/automation/get-viewport-size.d.ts +1 -1
- package/types/automation/locate-text.d.ts +1 -1
- package/types/automation/locate.d.ts +1 -1
- package/types/automation/set-viewport-size.d.ts +1 -1
- package/types/automation/types.d.ts +107 -16
- package/types/automation/utils/report-kobiton.d.ts +12 -0
- package/types/automation/utils/take-screenshot.d.ts +5 -2
- package/types/automation/utils/to-base-check-settings.d.ts +13 -3
- package/types/automation/utils/to-environment-key.d.ts +2 -0
- package/types/automation/utils/uniquify-environments.d.ts +2 -0
- package/types/automation/utils/wait-for-lazy-load.d.ts +4 -8
- package/types/autonomous/core.d.ts +19 -0
- package/types/autonomous/create-render-results.d.ts +10 -0
- package/types/autonomous/create-render-target.d.ts +12 -0
- package/types/autonomous/get-render-results.d.ts +12 -0
- package/types/autonomous/open-eyes.d.ts +13 -0
- package/types/autonomous/start-renders.d.ts +12 -0
- package/types/autonomous/take-snapshots.d.ts +15 -0
- package/types/autonomous/types.d.ts +57 -0
- package/types/check-and-close.d.ts +3 -3
- package/types/check.d.ts +3 -3
- package/types/classic/check-and-close.d.ts +12 -5
- package/types/classic/check.d.ts +6 -3
- package/types/classic/core.d.ts +8 -2
- package/types/classic/get-base-eyes.d.ts +4 -8
- package/types/classic/open-eyes.d.ts +3 -4
- package/types/classic/types.d.ts +4 -5
- package/types/classic/utils/extract-default-environments.d.ts +9 -0
- package/types/classic/utils/take-dom-capture.d.ts +8 -0
- package/types/classic/utils/take-screenshots.d.ts +18 -0
- package/types/close-batch.d.ts +1 -1
- package/types/close.d.ts +3 -2
- package/types/core.d.ts +11 -2
- package/types/delete-test.d.ts +1 -1
- package/types/extract-text.d.ts +1 -1
- package/types/get-account-info.d.ts +11 -0
- package/types/get-ec-client.d.ts +1 -1
- package/types/get-eyes-results.d.ts +1 -1
- package/types/get-manager-results.d.ts +1 -1
- package/types/get-typed-eyes.d.ts +2 -4
- package/types/index.d.ts +2 -1
- package/types/lang.d.ts +32 -0
- package/types/locate-text.d.ts +1 -1
- package/types/locate.d.ts +1 -1
- package/types/make-manager.d.ts +11 -2
- package/types/offline/merge-configs.d.ts +1 -0
- package/types/offline/run-offline-snapshots.d.ts +11 -0
- package/types/open-eyes.d.ts +11 -2
- package/types/run-offline-snapshots.d.ts +6 -0
- package/types/troubleshoot/logs.d.ts +25 -0
- package/types/types.d.ts +19 -11
- package/types/ufg/check-and-close.d.ts +18 -10
- package/types/ufg/check.d.ts +5 -4
- package/types/ufg/core.d.ts +8 -5
- package/types/ufg/create-render-target-from-snapshot.d.ts +8 -0
- package/types/ufg/get-base-eyes.d.ts +4 -9
- package/types/ufg/get-ufg-client.d.ts +6 -3
- package/types/ufg/open-eyes.d.ts +3 -4
- package/types/ufg/take-snapshots.d.ts +17 -0
- package/types/ufg/types.d.ts +39 -39
- package/types/ufg/utils/extract-default-environment.d.ts +5 -0
- package/types/ufg/utils/generate-safe-selectors.d.ts +3 -12
- package/types/ufg/utils/take-dom-snapshot.d.ts +16 -21
- package/types/ufg/utils/take-dom-snapshots.d.ts +14 -10
- package/types/ufg/utils/to-generated-selectors.d.ts +34 -0
- package/types/ufg/utils/to-safe-check-settings.d.ts +22 -0
- package/types/universal/core-server.d.ts +6 -2
- package/types/universal/core.d.ts +6 -2
- package/types/universal/spec-driver.d.ts +6 -5
- package/types/universal/types.d.ts +59 -51
- package/types/utils/ensure-offline-folder.d.ts +1 -0
- package/types/utils/extract-branching-timestamp.d.ts +16 -0
- package/types/utils/extract-current-commit.d.ts +24 -0
- package/types/utils/extract-git-info.d.ts +59 -0
- package/types/utils/extract-start-info.d.ts +29 -0
- package/types/utils/extract-test-environment.d.ts +2 -0
- package/types/utils/memory-usage-logging.d.ts +7 -0
- package/types/utils/populate-eyes-server-settings.d.ts +2 -0
- package/types/utils/validate-sdk-version.d.ts +42 -0
- package/CHANGELOG.md +0 -222
- package/dist/classic/abort.js +0 -22
- package/dist/classic/close.js +0 -22
- package/dist/ufg/abort.js +0 -32
- package/dist/ufg/close.js +0 -37
- package/dist/ufg/get-results.js +0 -27
- package/dist/ufg/utils/take-vhses.js +0 -153
- package/dist/ufg/utils/uniquify-renderers.js +0 -27
- package/dist/utils/extract-ci-provider.js +0 -31
- package/types/classic/abort.d.ts +0 -16
- package/types/classic/close.d.ts +0 -16
- package/types/ufg/abort.d.ts +0 -21
- package/types/ufg/close.d.ts +0 -19
- package/types/ufg/get-nml-client.d.ts +0 -17
- package/types/ufg/get-results.d.ts +0 -16
- package/types/ufg/utils/take-vhses.d.ts +0 -17
- package/types/ufg/utils/uniquify-renderers.d.ts +0 -2
- package/types/utils/extract-ci-provider.d.ts +0 -1
|
@@ -27,9 +27,10 @@ export type ClientSocket<TSpec extends SpecType, TType extends 'classic' | 'ufg'
|
|
|
27
27
|
export type ServerSocket<TSpec extends SpecType, TType extends 'classic' | 'ufg'> = unknown & Listener<Universalize<UniversalCore<TSpec, TType>, 'Core'>> & Emitter<Universalize<UniversalLogger, 'Logger'>> & Server<Universalize<MainCore.Core<TSpec, TType>, 'Core'>> & Server<Universalize<MainCore.EyesManager<TSpec, TType>, 'EyesManager', 'manager'>> & Server<Universalize<MainCore.Eyes<TSpec, TType>, 'Eyes', 'eyes'>> & Server<Universalize<UniversalDebug<TSpec>, 'Debug'>> & Client<Universalize<UniversalSpecDriver<TSpec>, 'Driver'>>;
|
|
28
28
|
export interface UniversalCore<TSpec extends SpecType, TType extends 'classic' | 'ufg'> {
|
|
29
29
|
makeCore(options: {
|
|
30
|
+
spec: 'webdriver' | (keyof UniversalSpecDriver<TSpec>)[];
|
|
30
31
|
agentId: string;
|
|
32
|
+
environment?: Record<string, any>;
|
|
31
33
|
cwd: string;
|
|
32
|
-
spec: 'webdriver' | (keyof UniversalSpecDriver<TSpec>)[];
|
|
33
34
|
}): Promise<MainCore.Core<TSpec, TType>>;
|
|
34
35
|
}
|
|
35
36
|
export interface UniversalLogger {
|
|
@@ -55,16 +56,6 @@ export interface UniversalSpecDriver<T extends SpecType> {
|
|
|
55
56
|
element1: T['element'];
|
|
56
57
|
element2: T['element'];
|
|
57
58
|
}): Promise<boolean>;
|
|
58
|
-
mainContext(options: {
|
|
59
|
-
context: T['context'];
|
|
60
|
-
}): Promise<T['context']>;
|
|
61
|
-
parentContext(options: {
|
|
62
|
-
context: T['context'];
|
|
63
|
-
}): Promise<T['context']>;
|
|
64
|
-
childContext(options: {
|
|
65
|
-
context: T['context'];
|
|
66
|
-
element: T['element'];
|
|
67
|
-
}): Promise<T['context']>;
|
|
68
59
|
executeScript(options: {
|
|
69
60
|
context: T['context'];
|
|
70
61
|
script: string;
|
|
@@ -86,6 +77,15 @@ export interface UniversalSpecDriver<T extends SpecType> {
|
|
|
86
77
|
parent?: T['element'];
|
|
87
78
|
options?: WaitOptions;
|
|
88
79
|
}): Promise<T['element'] | null>;
|
|
80
|
+
getElementRegion(options: {
|
|
81
|
+
context: T['context'];
|
|
82
|
+
element: T['element'];
|
|
83
|
+
}): Promise<Region>;
|
|
84
|
+
getElementAttribute(options: {
|
|
85
|
+
context: T['context'];
|
|
86
|
+
element: T['element'];
|
|
87
|
+
attr: string;
|
|
88
|
+
}): Promise<string>;
|
|
89
89
|
setElementText(options: {
|
|
90
90
|
context: T['context'];
|
|
91
91
|
element: T['element'];
|
|
@@ -95,6 +95,30 @@ export interface UniversalSpecDriver<T extends SpecType> {
|
|
|
95
95
|
context: T['context'];
|
|
96
96
|
element: T['element'];
|
|
97
97
|
}): Promise<string>;
|
|
98
|
+
hover(options: {
|
|
99
|
+
context: T['context'];
|
|
100
|
+
element: T['element'];
|
|
101
|
+
}): Promise<void>;
|
|
102
|
+
click(options: {
|
|
103
|
+
context: T['context'];
|
|
104
|
+
element: T['element'];
|
|
105
|
+
}): Promise<void>;
|
|
106
|
+
mainContext(options: {
|
|
107
|
+
context: T['context'];
|
|
108
|
+
}): Promise<T['context']>;
|
|
109
|
+
parentContext(options: {
|
|
110
|
+
context: T['context'];
|
|
111
|
+
}): Promise<T['context']>;
|
|
112
|
+
childContext(options: {
|
|
113
|
+
context: T['context'];
|
|
114
|
+
element: T['element'];
|
|
115
|
+
}): Promise<T['context']>;
|
|
116
|
+
getDriverInfo(options: {
|
|
117
|
+
driver: T['driver'];
|
|
118
|
+
}): Promise<DriverInfo>;
|
|
119
|
+
getCapabilities(options: {
|
|
120
|
+
driver: T['driver'];
|
|
121
|
+
}): Promise<Record<string, any>>;
|
|
98
122
|
setWindowSize(options: {
|
|
99
123
|
driver: T['driver'];
|
|
100
124
|
size: Size;
|
|
@@ -109,40 +133,6 @@ export interface UniversalSpecDriver<T extends SpecType> {
|
|
|
109
133
|
getViewportSize(options: {
|
|
110
134
|
driver: T['driver'];
|
|
111
135
|
}): Promise<Size>;
|
|
112
|
-
getCookies(options: {
|
|
113
|
-
driver: T['driver'] | T['context'];
|
|
114
|
-
context?: boolean;
|
|
115
|
-
}): Promise<Cookie[]>;
|
|
116
|
-
getDriverInfo(options: {
|
|
117
|
-
driver: T['driver'];
|
|
118
|
-
}): Promise<DriverInfo>;
|
|
119
|
-
getCapabilities(options: {
|
|
120
|
-
driver: T['driver'];
|
|
121
|
-
}): Promise<Record<string, any>>;
|
|
122
|
-
getTitle(options: {
|
|
123
|
-
driver: T['driver'];
|
|
124
|
-
}): Promise<string>;
|
|
125
|
-
getUrl(options: {
|
|
126
|
-
driver: T['driver'];
|
|
127
|
-
}): Promise<string>;
|
|
128
|
-
takeScreenshot(options: {
|
|
129
|
-
driver: T['driver'];
|
|
130
|
-
}): Promise<string>;
|
|
131
|
-
click(options: {
|
|
132
|
-
context: T['context'];
|
|
133
|
-
element: T['element'] | T['selector'];
|
|
134
|
-
}): Promise<void>;
|
|
135
|
-
visit(options: {
|
|
136
|
-
driver: T['driver'];
|
|
137
|
-
url: string;
|
|
138
|
-
}): Promise<void>;
|
|
139
|
-
getOrientation(options: {
|
|
140
|
-
driver: T['driver'];
|
|
141
|
-
}): Promise<'portrait' | 'landscape' | 'portrait-secondary' | 'landscape-secondary'>;
|
|
142
|
-
setOrientation(options: {
|
|
143
|
-
driver: T['driver'];
|
|
144
|
-
orientation: 'portrait' | 'landscape' | 'portrait-secondary' | 'landscape-secondary';
|
|
145
|
-
}): Promise<void>;
|
|
146
136
|
getSystemBars(options: {
|
|
147
137
|
driver: T['driver'];
|
|
148
138
|
}): Promise<{
|
|
@@ -161,19 +151,34 @@ export interface UniversalSpecDriver<T extends SpecType> {
|
|
|
161
151
|
width: number;
|
|
162
152
|
};
|
|
163
153
|
}>;
|
|
164
|
-
|
|
154
|
+
getOrientation(options: {
|
|
165
155
|
driver: T['driver'];
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
156
|
+
}): Promise<'portrait' | 'landscape' | 'portrait-secondary' | 'landscape-secondary'>;
|
|
157
|
+
setOrientation(options: {
|
|
158
|
+
driver: T['driver'];
|
|
159
|
+
orientation: 'portrait' | 'landscape' | 'portrait-secondary' | 'landscape-secondary';
|
|
160
|
+
}): Promise<void>;
|
|
161
|
+
getCookies(options: {
|
|
162
|
+
driver: T['driver'] | T['context'];
|
|
163
|
+
context?: boolean;
|
|
164
|
+
}): Promise<Cookie[]>;
|
|
165
|
+
getTitle(options: {
|
|
166
|
+
driver: T['driver'];
|
|
167
|
+
}): Promise<string>;
|
|
168
|
+
getUrl(options: {
|
|
169
|
+
driver: T['driver'];
|
|
170
|
+
}): Promise<string>;
|
|
171
|
+
takeScreenshot(options: {
|
|
169
172
|
driver: T['driver'];
|
|
170
|
-
element: T['element'];
|
|
171
|
-
attr: string;
|
|
172
173
|
}): Promise<string>;
|
|
173
174
|
performAction(options: {
|
|
174
175
|
driver: T['driver'];
|
|
175
176
|
steps: any[];
|
|
176
177
|
}): Promise<void>;
|
|
178
|
+
visit(options: {
|
|
179
|
+
driver: T['driver'];
|
|
180
|
+
url: string;
|
|
181
|
+
}): Promise<void>;
|
|
177
182
|
getCurrentWorld(options: {
|
|
178
183
|
driver: T['driver'];
|
|
179
184
|
}): Promise<string>;
|
|
@@ -184,5 +189,8 @@ export interface UniversalSpecDriver<T extends SpecType> {
|
|
|
184
189
|
driver: T['driver'];
|
|
185
190
|
name: string;
|
|
186
191
|
}): Promise<void>;
|
|
192
|
+
reload(options: {
|
|
193
|
+
driver: T['driver'];
|
|
194
|
+
}): Promise<void>;
|
|
187
195
|
}
|
|
188
196
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ensureOfflineFolder(): string | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { ExecOptions } from 'child_process';
|
|
3
|
+
import { type Logger } from '@applitools/logger';
|
|
4
|
+
export declare const extractBranchingTimestamp: typeof extractGitBranchingTimestamp & {
|
|
5
|
+
getCachedValues(): Promise<string>[];
|
|
6
|
+
setCachedValue(key: any, value: Promise<string>): void;
|
|
7
|
+
clearCache(): void;
|
|
8
|
+
};
|
|
9
|
+
type ExtractGitBranchingTimestampOptions = {
|
|
10
|
+
branchName: string;
|
|
11
|
+
execOptions?: ExecOptions;
|
|
12
|
+
logger?: Logger;
|
|
13
|
+
parentBranchName: string;
|
|
14
|
+
};
|
|
15
|
+
declare function extractGitBranchingTimestamp({ branchName, parentBranchName, execOptions, logger, }: ExtractGitBranchingTimestampOptions): Promise<string>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { ExecOptions } from 'child_process';
|
|
3
|
+
import { type Logger } from '@applitools/logger';
|
|
4
|
+
export declare const cacheKey = "extract-current-commit";
|
|
5
|
+
export declare const extractLatestCommitInfo: typeof extractCommitInfo & {
|
|
6
|
+
getCachedValues(): Promise<{
|
|
7
|
+
timestamp: string;
|
|
8
|
+
sha: string;
|
|
9
|
+
} | undefined>[];
|
|
10
|
+
setCachedValue(key: any, value: Promise<{
|
|
11
|
+
timestamp: string;
|
|
12
|
+
sha: string;
|
|
13
|
+
} | undefined>): void;
|
|
14
|
+
clearCache(): void;
|
|
15
|
+
};
|
|
16
|
+
type ExtractCurrentCommitTimestampOptions = {
|
|
17
|
+
execOptions?: ExecOptions;
|
|
18
|
+
logger?: Logger;
|
|
19
|
+
};
|
|
20
|
+
declare function extractCommitInfo({ execOptions, logger, }: ExtractCurrentCommitTimestampOptions): Promise<{
|
|
21
|
+
timestamp: string;
|
|
22
|
+
sha: string;
|
|
23
|
+
} | undefined>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { ExecOptions } from 'child_process';
|
|
3
|
+
import { type Logger } from '@applitools/logger';
|
|
4
|
+
type Options = {
|
|
5
|
+
execOptions?: ExecOptions;
|
|
6
|
+
logger: Logger;
|
|
7
|
+
};
|
|
8
|
+
type ExtractGitBranchingTimestampOptions = {
|
|
9
|
+
branchName: string;
|
|
10
|
+
execOptions?: ExecOptions;
|
|
11
|
+
logger?: Logger;
|
|
12
|
+
parentBranchName: string;
|
|
13
|
+
};
|
|
14
|
+
type ExtractCurrentCommitTimestampOptions = {
|
|
15
|
+
execOptions?: ExecOptions;
|
|
16
|
+
logger?: Logger;
|
|
17
|
+
};
|
|
18
|
+
export declare const cacheKey = "default";
|
|
19
|
+
export declare const extractLatestCommitInfo: (({ execOptions, logger, }: ExtractCurrentCommitTimestampOptions) => Promise<{
|
|
20
|
+
timestamp: string;
|
|
21
|
+
sha: string;
|
|
22
|
+
} | undefined>) & {
|
|
23
|
+
getCachedValues(): Promise<{
|
|
24
|
+
timestamp: string;
|
|
25
|
+
sha: string;
|
|
26
|
+
} | undefined>[];
|
|
27
|
+
setCachedValue(key: any, value: Promise<{
|
|
28
|
+
timestamp: string;
|
|
29
|
+
sha: string;
|
|
30
|
+
} | undefined>): void;
|
|
31
|
+
clearCache(): void;
|
|
32
|
+
};
|
|
33
|
+
export declare const extractGitBranch: (({ execOptions, logger }: Options) => Promise<string | undefined>) & {
|
|
34
|
+
getCachedValues(): Promise<string | undefined>[];
|
|
35
|
+
setCachedValue(key: any, value: Promise<string | undefined>): void;
|
|
36
|
+
clearCache(): void;
|
|
37
|
+
};
|
|
38
|
+
export declare const extractGitRepo: (({ execOptions, logger }: Options) => Promise<{
|
|
39
|
+
name?: string;
|
|
40
|
+
owner?: string;
|
|
41
|
+
}>) & {
|
|
42
|
+
getCachedValues(): Promise<{
|
|
43
|
+
name?: string | undefined;
|
|
44
|
+
owner?: string | undefined;
|
|
45
|
+
}>[];
|
|
46
|
+
setCachedValue(key: any, value: Promise<{
|
|
47
|
+
name?: string | undefined;
|
|
48
|
+
owner?: string | undefined;
|
|
49
|
+
}>): void;
|
|
50
|
+
clearCache(): void;
|
|
51
|
+
};
|
|
52
|
+
export declare function extractBuildIdFromCI(): Promise<string | undefined>;
|
|
53
|
+
export declare const extractBranchingTimestamp: (({ branchName, parentBranchName, execOptions, logger, }: ExtractGitBranchingTimestampOptions) => Promise<string | undefined>) & {
|
|
54
|
+
getCachedValues(): Promise<string | undefined>[];
|
|
55
|
+
setCachedValue(key: any, value: Promise<string | undefined>): void;
|
|
56
|
+
clearCache(): void;
|
|
57
|
+
};
|
|
58
|
+
export declare function isISODate(str: string): boolean;
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { ExecOptions } from 'child_process';
|
|
3
|
+
import { type Logger } from '@applitools/logger';
|
|
4
|
+
type Options = {
|
|
5
|
+
execOptions?: ExecOptions;
|
|
6
|
+
logger: Logger;
|
|
7
|
+
};
|
|
8
|
+
export declare const cacheKey = "default";
|
|
9
|
+
export declare const extractGitBranch: (({ execOptions, logger }: Options) => Promise<string | undefined>) & {
|
|
10
|
+
getCachedValues(): Promise<string | undefined>[];
|
|
11
|
+
setCachedValue(key: any, value: Promise<string | undefined>): void;
|
|
12
|
+
clearCache(): void;
|
|
13
|
+
};
|
|
14
|
+
export declare const extractGitRepo: (({ execOptions, logger }: Options) => Promise<{
|
|
15
|
+
name?: string;
|
|
16
|
+
owner?: string;
|
|
17
|
+
}>) & {
|
|
18
|
+
getCachedValues(): Promise<{
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
owner?: string | undefined;
|
|
21
|
+
}>[];
|
|
22
|
+
setCachedValue(key: any, value: Promise<{
|
|
23
|
+
name?: string | undefined;
|
|
24
|
+
owner?: string | undefined;
|
|
25
|
+
}>): void;
|
|
26
|
+
clearCache(): void;
|
|
27
|
+
};
|
|
28
|
+
export declare function extractBuildIdFromCI(): Promise<string | undefined>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type Logger } from '@applitools/logger';
|
|
2
|
+
declare const extractors: {
|
|
3
|
+
js: typeof extractLatestJsPackageVersion & {
|
|
4
|
+
getCachedValues(): Promise<string>[];
|
|
5
|
+
setCachedValue(key: any, value: Promise<string>): void;
|
|
6
|
+
clearCache(): void;
|
|
7
|
+
};
|
|
8
|
+
java: typeof extractLatestJavaPackageVersion & {
|
|
9
|
+
getCachedValues(): Promise<string>[];
|
|
10
|
+
setCachedValue(key: any, value: Promise<string>): void;
|
|
11
|
+
clearCache(): void;
|
|
12
|
+
};
|
|
13
|
+
dotnet: typeof extractLatestDotNetPackageVersion & {
|
|
14
|
+
getCachedValues(): Promise<string>[];
|
|
15
|
+
setCachedValue(key: any, value: Promise<string>): void;
|
|
16
|
+
clearCache(): void;
|
|
17
|
+
};
|
|
18
|
+
python: typeof extractLatestPythonPackageVersion & {
|
|
19
|
+
getCachedValues(): Promise<string>[];
|
|
20
|
+
setCachedValue(key: any, value: Promise<string>): void;
|
|
21
|
+
clearCache(): void;
|
|
22
|
+
};
|
|
23
|
+
ruby: typeof extractLatestRubyPackageVersion & {
|
|
24
|
+
getCachedValues(): Promise<string>[];
|
|
25
|
+
setCachedValue(key: any, value: Promise<string>): void;
|
|
26
|
+
clearCache(): void;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export declare function validateSdkVersion(sdk: {
|
|
30
|
+
lang: keyof typeof extractors;
|
|
31
|
+
name: string;
|
|
32
|
+
currentVersion: string;
|
|
33
|
+
latestVersion?: string;
|
|
34
|
+
}, { logger }: {
|
|
35
|
+
logger: Logger;
|
|
36
|
+
}): Promise<void>;
|
|
37
|
+
export declare function extractLatestJsPackageVersion(name: string): Promise<string>;
|
|
38
|
+
export declare function extractLatestJavaPackageVersion(name: string): Promise<string>;
|
|
39
|
+
export declare function extractLatestDotNetPackageVersion(name: string): Promise<string>;
|
|
40
|
+
export declare function extractLatestPythonPackageVersion(name: string): Promise<string>;
|
|
41
|
+
export declare function extractLatestRubyPackageVersion(name: string): Promise<string>;
|
|
42
|
+
export {};
|
package/CHANGELOG.md
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
## Unreleased
|
|
4
|
-
|
|
5
|
-
## 2.5.2 - 2023/4/19
|
|
6
|
-
|
|
7
|
-
### Features
|
|
8
|
-
### Bug fixes
|
|
9
|
-
- Fixed functional test feature issues in ec client
|
|
10
|
-
|
|
11
|
-
## 2.5.1 - 2023/4/18
|
|
12
|
-
|
|
13
|
-
### Features
|
|
14
|
-
### Bug fixes
|
|
15
|
-
- Fixed the issue with session metadata extraction
|
|
16
|
-
|
|
17
|
-
## 2.5.0 - 2023/4/18
|
|
18
|
-
|
|
19
|
-
### Features
|
|
20
|
-
- Added functional session feature
|
|
21
|
-
### Bug fixes
|
|
22
|
-
- Fixed issue with when webview were wasn't recognized as web compatible world
|
|
23
|
-
|
|
24
|
-
## 2.4.13 - 2023/4/16
|
|
25
|
-
|
|
26
|
-
### Features
|
|
27
|
-
### Bug fixes
|
|
28
|
-
- format result `hostDisplaySize`
|
|
29
|
-
|
|
30
|
-
## 2.4.12 - 2023/4/12
|
|
31
|
-
|
|
32
|
-
### Features
|
|
33
|
-
### Bug fixes
|
|
34
|
-
- Expose types for eyes-cypress
|
|
35
|
-
|
|
36
|
-
## 2.4.11 - 2023/4/11
|
|
37
|
-
|
|
38
|
-
### Features
|
|
39
|
-
- Make `locate` to return coordinates that could be directly used with the driver
|
|
40
|
-
### Bug fixes
|
|
41
|
-
- Fix issue when `locate` return wrong type of the region, with `left` and `top` properties instead of `x` and `y`
|
|
42
|
-
|
|
43
|
-
## 2.4.10 - 2023/4/10
|
|
44
|
-
|
|
45
|
-
### Features
|
|
46
|
-
### Bug fixes
|
|
47
|
-
- Improved appium prefixed capabilities parsing
|
|
48
|
-
|
|
49
|
-
## 2.4.9 - 2023/4/7
|
|
50
|
-
|
|
51
|
-
### Features
|
|
52
|
-
### Bug fixes
|
|
53
|
-
- Fixed issue in dom snapshot that prevented urls that start with a whitespace to be mapped
|
|
54
|
-
|
|
55
|
-
## 2.4.8 - 2023/4/5
|
|
56
|
-
|
|
57
|
-
### Features
|
|
58
|
-
### Bug fixes
|
|
59
|
-
- Fixed screenshot framing
|
|
60
|
-
- Fixed issue with css fetching for dom capture
|
|
61
|
-
|
|
62
|
-
## 2.4.7 - 2023/4/4
|
|
63
|
-
|
|
64
|
-
### Features
|
|
65
|
-
### Bug fixes
|
|
66
|
-
- Fixed issue with emulation driver detection
|
|
67
|
-
|
|
68
|
-
## 2.4.6 - 2023/4/4
|
|
69
|
-
|
|
70
|
-
### Features
|
|
71
|
-
### Bug fixes
|
|
72
|
-
- Fixed relative url resolution in css files
|
|
73
|
-
- Added timeout to css fetching during preparing dom capture
|
|
74
|
-
|
|
75
|
-
## 2.4.5 - 2023/3/31
|
|
76
|
-
|
|
77
|
-
### Features
|
|
78
|
-
- Added `removeDuplicateTests` property to the `GetManagerResultsSettings`
|
|
79
|
-
### Bug fixes
|
|
80
|
-
|
|
81
|
-
## 2.4.4 - 2023/3/30
|
|
82
|
-
|
|
83
|
-
### Features
|
|
84
|
-
### Bug fixes
|
|
85
|
-
- Improve performance in DOM snapshot
|
|
86
|
-
|
|
87
|
-
## 2.4.3 - 2023/3/22
|
|
88
|
-
|
|
89
|
-
### Features
|
|
90
|
-
- Changed `makeManager` api to accept `settings`
|
|
91
|
-
### Bug fixes
|
|
92
|
-
- Fixed retry interval during poll requests to eyes back-end
|
|
93
|
-
|
|
94
|
-
## 2.4.2 - 2023/3/17
|
|
95
|
-
|
|
96
|
-
### Features
|
|
97
|
-
### Bug fixes
|
|
98
|
-
- Fixed issue with concurrency of the renders in ufg mode
|
|
99
|
-
|
|
100
|
-
## 2.4.1 - 2023/3/17
|
|
101
|
-
|
|
102
|
-
### Features
|
|
103
|
-
- Improved extraction of nml element
|
|
104
|
-
### Bug fixes
|
|
105
|
-
- Fixed issue with concurrency of the renders in ufg mode
|
|
106
|
-
|
|
107
|
-
## 2.4.0 - 2023/3/12
|
|
108
|
-
|
|
109
|
-
### Features
|
|
110
|
-
### Bug fixes
|
|
111
|
-
- Fixed ufg concurrency regression
|
|
112
|
-
|
|
113
|
-
## 2.3.14 - 2023/3/7
|
|
114
|
-
|
|
115
|
-
### Features
|
|
116
|
-
### Bug fixes
|
|
117
|
-
- Upgrade tunnel version
|
|
118
|
-
|
|
119
|
-
## 2.3.13 - 2023/3/7
|
|
120
|
-
|
|
121
|
-
### Features
|
|
122
|
-
### Bug fixes
|
|
123
|
-
- Fixed selector transformation for scroll root elements for ufg
|
|
124
|
-
|
|
125
|
-
## 2.3.12 - 2023/3/7
|
|
126
|
-
|
|
127
|
-
### Features
|
|
128
|
-
- Update broker url using last response instead of using driver
|
|
129
|
-
### Bug fixes
|
|
130
|
-
- Replaced broker url cache with nml element cache
|
|
131
|
-
|
|
132
|
-
## 2.3.11 - 2023/3/6
|
|
133
|
-
|
|
134
|
-
### Features
|
|
135
|
-
### Bug fixes
|
|
136
|
-
- setting the universal cli for javascript right
|
|
137
|
-
|
|
138
|
-
## 2.3.10 - 2023/3/3
|
|
139
|
-
|
|
140
|
-
### Features
|
|
141
|
-
- Added `Resize` stitch mode value
|
|
142
|
-
### Bug fixes
|
|
143
|
-
- Fixed issue when `.visualgrid` was not added to agent id
|
|
144
|
-
- Fixed issue with aborting ufg tests
|
|
145
|
-
|
|
146
|
-
## 2.3.9 - 2023/3/2
|
|
147
|
-
|
|
148
|
-
### Features
|
|
149
|
-
### Bug fixes
|
|
150
|
-
- Update `@applitools/execution-grid-tunnel` dependency
|
|
151
|
-
|
|
152
|
-
## 2.3.8 - 2023/3/2
|
|
153
|
-
|
|
154
|
-
### Features
|
|
155
|
-
### Bug fixes
|
|
156
|
-
- upgrade dom-snapshot with a fix to CSP
|
|
157
|
-
|
|
158
|
-
## 2.3.7 - 2023/2/23
|
|
159
|
-
|
|
160
|
-
### Features
|
|
161
|
-
- Added caching for broker url to avoid looking for the nml element multiple times
|
|
162
|
-
- Passing density metric for PPI support in the sdk
|
|
163
|
-
### Bug fixes
|
|
164
|
-
- Fixed issue with universal protocol when manager ref was deleted once `EyesManager.getResults` was called
|
|
165
|
-
- Fixed vulnerabilities of EC client
|
|
166
|
-
|
|
167
|
-
## 2.3.6 - 2023/2/17
|
|
168
|
-
|
|
169
|
-
### Features
|
|
170
|
-
### Bug fixes
|
|
171
|
-
- Update some type declarations
|
|
172
|
-
|
|
173
|
-
## 2.3.5 - 2023/2/17
|
|
174
|
-
|
|
175
|
-
### Features
|
|
176
|
-
- Improve logging in core server
|
|
177
|
-
### Bug fixes
|
|
178
|
-
- Fixed issue when core server was hanging if any command was called immediately after `Core.makeCore` command
|
|
179
|
-
- Fixed issue when `StaticDriver` and `StaticElement` were not recognized as a valid driver or element objects
|
|
180
|
-
|
|
181
|
-
## 2.3.4 - 2023/2/16
|
|
182
|
-
|
|
183
|
-
### Features
|
|
184
|
-
### Bug fixes
|
|
185
|
-
- Fixed ws types
|
|
186
|
-
|
|
187
|
-
## 2.3.3 - 2023/2/16
|
|
188
|
-
|
|
189
|
-
### Features
|
|
190
|
-
### Bug fixes
|
|
191
|
-
- Fixed debug mode
|
|
192
|
-
- Fixed logs
|
|
193
|
-
|
|
194
|
-
## 2.3.2 - 2023/2/16
|
|
195
|
-
|
|
196
|
-
### Features
|
|
197
|
-
- Added arm64 binary
|
|
198
|
-
### Bug fixes
|
|
199
|
-
|
|
200
|
-
## 2.3.1 - 2023/2/15
|
|
201
|
-
|
|
202
|
-
### Features
|
|
203
|
-
- Avoid helper initialization on native devices before it required
|
|
204
|
-
### Bug fixes
|
|
205
|
-
|
|
206
|
-
## 2.3.0 - 2023/2/15
|
|
207
|
-
|
|
208
|
-
### Features
|
|
209
|
-
- Integrate universal protocol to run core via transport
|
|
210
|
-
### Bug fixes
|
|
211
|
-
|
|
212
|
-
## 2.2.0 - 2023/2/15
|
|
213
|
-
|
|
214
|
-
### Features
|
|
215
|
-
- Integrate universal protocol to run core via transport
|
|
216
|
-
### Bug fixes
|
|
217
|
-
|
|
218
|
-
## 2.0.2 - 2022/12/27
|
|
219
|
-
|
|
220
|
-
### Features
|
|
221
|
-
- Created
|
|
222
|
-
### Bug fixes
|
package/dist/classic/abort.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeAbort = void 0;
|
|
4
|
-
const driver_1 = require("@applitools/driver");
|
|
5
|
-
function makeAbort({ eyes, target, spec, logger: defaultLogger }) {
|
|
6
|
-
return async function abort({ settings, logger = defaultLogger, } = {}) {
|
|
7
|
-
logger.log('Command "abort" is called with settings', settings);
|
|
8
|
-
settings !== null && settings !== void 0 ? settings : (settings = {});
|
|
9
|
-
if (!settings.testMetadata) {
|
|
10
|
-
try {
|
|
11
|
-
const driver = (0, driver_1.isDriver)(target, spec) ? await (0, driver_1.makeDriver)({ spec, driver: target, logger }) : null;
|
|
12
|
-
settings.testMetadata = await (driver === null || driver === void 0 ? void 0 : driver.getSessionMetadata());
|
|
13
|
-
}
|
|
14
|
-
catch (error) {
|
|
15
|
-
logger.warn('Command "abort" received an error during extracting driver metadata', error);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
const baseEyes = await eyes.getBaseEyes();
|
|
19
|
-
await Promise.all(baseEyes.map(baseEyes => baseEyes.abort({ settings, logger })));
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
exports.makeAbort = makeAbort;
|
package/dist/classic/close.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeClose = void 0;
|
|
4
|
-
const driver_1 = require("@applitools/driver");
|
|
5
|
-
function makeClose({ eyes, target, spec, logger: defaultLogger }) {
|
|
6
|
-
return async function close({ settings, logger = defaultLogger, } = {}) {
|
|
7
|
-
logger.log('Command "close" is called with settings', settings);
|
|
8
|
-
settings !== null && settings !== void 0 ? settings : (settings = {});
|
|
9
|
-
if (!settings.testMetadata) {
|
|
10
|
-
try {
|
|
11
|
-
const driver = (0, driver_1.isDriver)(target, spec) ? await (0, driver_1.makeDriver)({ spec, driver: target, logger }) : null;
|
|
12
|
-
settings.testMetadata = await (driver === null || driver === void 0 ? void 0 : driver.getSessionMetadata());
|
|
13
|
-
}
|
|
14
|
-
catch (error) {
|
|
15
|
-
logger.warn('Command "close" received an error during extracting driver metadata', error);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
const baseEyes = await eyes.getBaseEyes();
|
|
19
|
-
await Promise.all(baseEyes.map(baseEyes => baseEyes.close({ settings, logger })));
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
exports.makeClose = makeClose;
|
package/dist/ufg/abort.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeAbort = void 0;
|
|
4
|
-
const driver_1 = require("@applitools/driver");
|
|
5
|
-
function makeAbort({ storage, target, spec, controller, logger: defaultLogger, }) {
|
|
6
|
-
return async function abort({ settings, logger = defaultLogger, } = {}) {
|
|
7
|
-
logger.log('Command "abort" is called with settings', settings);
|
|
8
|
-
controller.abort();
|
|
9
|
-
settings !== null && settings !== void 0 ? settings : (settings = {});
|
|
10
|
-
if (!settings.testMetadata) {
|
|
11
|
-
try {
|
|
12
|
-
const driver = (0, driver_1.isDriver)(target, spec) ? await (0, driver_1.makeDriver)({ spec, driver: target, logger }) : null;
|
|
13
|
-
settings.testMetadata = await (driver === null || driver === void 0 ? void 0 : driver.getSessionMetadata());
|
|
14
|
-
}
|
|
15
|
-
catch (error) {
|
|
16
|
-
logger.warn('Command "abort" received an error during extracting driver metadata', error);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
storage.forEach(async (promises) => {
|
|
20
|
-
var _a, _b;
|
|
21
|
-
try {
|
|
22
|
-
const { eyes } = await Promise.race(promises);
|
|
23
|
-
await eyes.abort({ settings, logger });
|
|
24
|
-
}
|
|
25
|
-
catch (error) {
|
|
26
|
-
logger.warn('Command "abort" received an error during waiting for eyes instances in background', error);
|
|
27
|
-
await ((_b = (_a = error === null || error === void 0 ? void 0 : error.info) === null || _a === void 0 ? void 0 : _a.eyes) === null || _b === void 0 ? void 0 : _b.abort({ settings, logger }));
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
exports.makeAbort = makeAbort;
|