@applitools/nml-client 1.3.3 → 1.3.4
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/types.js +2 -0
- package/package.json +6 -7
- package/types/client.d.ts +4 -16
- package/types/req-broker.d.ts +1 -2
- package/types/types.d.ts +73 -0
package/dist/types.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/nml-client",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "Client to integrate the SDKs to the Native Mobile Library (NML)",
|
|
5
5
|
"homepage": "https://applitools.com",
|
|
6
6
|
"bugs": {
|
|
@@ -46,16 +46,15 @@
|
|
|
46
46
|
"postversion": "bongo postversion --skip-release-notification"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@applitools/logger": "1.1.
|
|
50
|
-
"@applitools/req": "1.1.
|
|
51
|
-
"@applitools/
|
|
52
|
-
"@applitools/utils": "1.3.12"
|
|
49
|
+
"@applitools/logger": "1.1.27",
|
|
50
|
+
"@applitools/req": "1.1.11",
|
|
51
|
+
"@applitools/utils": "1.3.13"
|
|
53
52
|
},
|
|
54
53
|
"devDependencies": {
|
|
55
54
|
"@applitools/bongo": "^2.2.0",
|
|
56
55
|
"@applitools/scripts": "^1.2.0",
|
|
57
|
-
"@applitools/spec-driver-selenium": "^1.5.
|
|
58
|
-
"@applitools/test-server": "^1.1.
|
|
56
|
+
"@applitools/spec-driver-selenium": "^1.5.2",
|
|
57
|
+
"@applitools/test-server": "^1.1.6",
|
|
59
58
|
"@applitools/test-utils": "^1.5.2",
|
|
60
59
|
"@types/mocha": "^9.1.1",
|
|
61
60
|
"@types/node": "12",
|
package/types/client.d.ts
CHANGED
|
@@ -1,25 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Screenshot, ScreenshotSettings as ClassicScreenshotSettings } from '@applitools/types/classic';
|
|
3
|
-
import type { AndroidVHS, IOSVHS } from '@applitools/types/ufg';
|
|
1
|
+
import type { ScreenshotSettings, Screenshot, SnapshotSettings, AndroidSnapshot, IOSSnapshot } from './types';
|
|
4
2
|
import { type Logger } from '@applitools/logger';
|
|
5
3
|
import { type ReqBrokerConfig } from './req-broker';
|
|
6
|
-
export declare type ScreenshotSettings = ReqBrokerConfig & ClassicScreenshotSettings<never, never> & {
|
|
7
|
-
name?: string;
|
|
8
|
-
selectorsToFindRegionsFor?: Selector[];
|
|
9
|
-
};
|
|
10
|
-
export declare type SnapshotSettings = ReqBrokerConfig & {
|
|
11
|
-
name?: string;
|
|
12
|
-
renderers: Renderer[];
|
|
13
|
-
resourceSeparation?: boolean;
|
|
14
|
-
waitBeforeCapture?: number;
|
|
15
|
-
};
|
|
16
4
|
export declare function takeScreenshot({ url, settings, logger, }: {
|
|
17
5
|
url: string;
|
|
18
|
-
settings: ScreenshotSettings;
|
|
6
|
+
settings: ReqBrokerConfig & ScreenshotSettings;
|
|
19
7
|
logger?: Logger;
|
|
20
8
|
}): Promise<Screenshot>;
|
|
21
9
|
export declare function takeSnapshots({ url, settings, logger, }: {
|
|
22
10
|
url: string;
|
|
23
|
-
settings: SnapshotSettings;
|
|
11
|
+
settings: ReqBrokerConfig & SnapshotSettings;
|
|
24
12
|
logger?: Logger;
|
|
25
|
-
}): Promise<
|
|
13
|
+
}): Promise<IOSSnapshot[] | AndroidSnapshot[]>;
|
package/types/req-broker.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { Proxy } from '@applitools/types';
|
|
2
1
|
import { type Logger } from '@applitools/logger';
|
|
3
|
-
import { type Req, type Options } from '@applitools/req';
|
|
2
|
+
import { type Req, type Options, type Proxy } from '@applitools/req';
|
|
4
3
|
export declare type ReqBrokerConfig = {
|
|
5
4
|
proxy?: Proxy;
|
|
6
5
|
agentId?: string;
|
package/types/types.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { Size, Location, Region } from '@applitools/utils';
|
|
3
|
+
export declare type Selector = string | {
|
|
4
|
+
selector: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
shadow?: Selector;
|
|
7
|
+
frame?: Selector;
|
|
8
|
+
};
|
|
9
|
+
export declare type ScreenshotSettings = {
|
|
10
|
+
region?: Region | Selector;
|
|
11
|
+
debugImages?: {
|
|
12
|
+
path: string;
|
|
13
|
+
prefix?: string;
|
|
14
|
+
};
|
|
15
|
+
fully?: boolean;
|
|
16
|
+
scrollRootElement?: Selector;
|
|
17
|
+
hideScrollbars?: boolean;
|
|
18
|
+
hideCaret?: boolean;
|
|
19
|
+
overlap?: {
|
|
20
|
+
top?: number;
|
|
21
|
+
bottom?: number;
|
|
22
|
+
};
|
|
23
|
+
waitBeforeCapture?: number;
|
|
24
|
+
waitBetweenStitches?: number;
|
|
25
|
+
lazyLoad?: boolean | {
|
|
26
|
+
scrollLength?: number;
|
|
27
|
+
waitingTime?: number;
|
|
28
|
+
maxAmountToScroll?: number;
|
|
29
|
+
};
|
|
30
|
+
webview?: boolean | string;
|
|
31
|
+
name?: string;
|
|
32
|
+
selectorsToFindRegionsFor?: Selector[];
|
|
33
|
+
};
|
|
34
|
+
export declare type Screenshot = {
|
|
35
|
+
image: Buffer | string;
|
|
36
|
+
size?: Size;
|
|
37
|
+
name?: string;
|
|
38
|
+
source?: string;
|
|
39
|
+
dom?: string;
|
|
40
|
+
locationInViewport?: Location;
|
|
41
|
+
locationInView?: Location;
|
|
42
|
+
fullViewSize?: Size;
|
|
43
|
+
};
|
|
44
|
+
export declare type SnapshotSettings = {
|
|
45
|
+
name?: string;
|
|
46
|
+
renderers: any[];
|
|
47
|
+
resourceSeparation?: boolean;
|
|
48
|
+
waitBeforeCapture?: number;
|
|
49
|
+
};
|
|
50
|
+
export declare type AndroidSnapshot = {
|
|
51
|
+
platformName: 'android';
|
|
52
|
+
vhsType: string;
|
|
53
|
+
vhsHash: {
|
|
54
|
+
hashFormat: string;
|
|
55
|
+
hash: string;
|
|
56
|
+
contentType: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export declare type IOSSnapshot = {
|
|
60
|
+
platformName: 'ios';
|
|
61
|
+
vhsCompatibilityParams: Record<string, any>;
|
|
62
|
+
} & ({
|
|
63
|
+
resourceContents: Record<string, {
|
|
64
|
+
type: string;
|
|
65
|
+
value: Buffer;
|
|
66
|
+
}>;
|
|
67
|
+
} | {
|
|
68
|
+
vhsHash: {
|
|
69
|
+
hashFormat: string;
|
|
70
|
+
hash: string;
|
|
71
|
+
contentType: string;
|
|
72
|
+
};
|
|
73
|
+
});
|