@alwaysmeticulous/api 2.137.0 → 2.140.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/index.d.ts +1 -0
- package/dist/sdk-bundle-api/bundle-to-sdk/replay-divergence.d.ts +46 -0
- package/dist/sdk-bundle-api/bundle-to-sdk/replay-divergence.js +3 -0
- package/dist/sdk-bundle-api/bundle-to-sdk/replay-divergence.js.map +1 -0
- package/dist/sdk-bundle-api/bundle-to-sdk/screenshot-diff-result.d.ts +10 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -12,3 +12,4 @@ export { ScreenshotAssertionsOptions, ScreenshotAssertionsEnabledOptions, Screen
|
|
|
12
12
|
export { NetworkStubbingMode, StubAllRequests, StubNonSSRRequests, NoStubbing, CustomStubbing, RequestFilter, } from "./sdk-bundle-api/sdk-to-bundle/network-stubbing";
|
|
13
13
|
export { ConsoleMessageWithStackTracePointer, VirtualTimeChange, MeticulousConsoleMessage, ApplicationConsoleMessage, ConsoleMessageCoreData, ConsoleMessageType, ConsoleMessageLocation, } from "./sdk-bundle-api/bundle-to-sdk/console-message";
|
|
14
14
|
export { InjectableRequestHeader, StaticHeaderValue, DynamicHeaderValue, AllRequests, AppUrlRequestsOnly, CustomRequests, } from "./sdk-bundle-api/sdk-to-bundle/header-injection";
|
|
15
|
+
export { Divergence, DivergenceIndicator, NetworkActivityDivergenceIndicator, ScreenshotDivergenceIdentifier, UrlChangeEventDivergenceIndicator, UserEventDivergenceIndicator, } from "./sdk-bundle-api/bundle-to-sdk/replay-divergence";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ScreenshotDiffResult } from "./screenshot-diff-result";
|
|
2
|
+
export type DivergenceIndicator = UserEventDivergenceIndicator | UrlChangeEventDivergenceIndicator | NetworkActivityDivergenceIndicator;
|
|
3
|
+
export interface UserEventDivergenceIndicator {
|
|
4
|
+
type: "user-event";
|
|
5
|
+
beforeEventIdx: number;
|
|
6
|
+
afterEventIdx: number;
|
|
7
|
+
}
|
|
8
|
+
export interface UrlChangeEventDivergenceIndicator {
|
|
9
|
+
type: "url-change";
|
|
10
|
+
beforeEventIdx?: number;
|
|
11
|
+
afterEventIdx?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface NetworkActivityDivergenceIndicator {
|
|
14
|
+
type: "network-activity";
|
|
15
|
+
beforeEventIndices?: number[] | undefined;
|
|
16
|
+
afterEventIndices: number[];
|
|
17
|
+
}
|
|
18
|
+
export interface ScreenshotDivergenceIdentifier {
|
|
19
|
+
filename: string;
|
|
20
|
+
outcome: ScreenshotDiffResult["outcome"];
|
|
21
|
+
virtualTime: number;
|
|
22
|
+
}
|
|
23
|
+
export interface Divergence {
|
|
24
|
+
/**
|
|
25
|
+
* The type of the first divergence indicator that occurred chronologically.
|
|
26
|
+
*/
|
|
27
|
+
reason: "none" | DivergenceIndicator["type"];
|
|
28
|
+
divergenceIndicators: DivergenceIndicator[];
|
|
29
|
+
/**
|
|
30
|
+
* The first diff in the divergence (inclusive).
|
|
31
|
+
*/
|
|
32
|
+
startScreenshotDiffId: ScreenshotDivergenceIdentifier;
|
|
33
|
+
/**
|
|
34
|
+
* The last diff in the divergence (inclusive).
|
|
35
|
+
*/
|
|
36
|
+
endScreenshotDiffId: ScreenshotDivergenceIdentifier;
|
|
37
|
+
/**
|
|
38
|
+
* The most recent 'no-diff' prior to startScreenshotDiff, if one exists. Note that there could be some
|
|
39
|
+
* missing bases or missing heads etc. between lastMatchingScreenshotDiff and startScreenshotDiff.
|
|
40
|
+
*/
|
|
41
|
+
lastMatchingScreenshotDiffId?: ScreenshotDivergenceIdentifier | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* The number of screenshot diffs between startScreenshotDiff and endScreenshotDiff inclusive.
|
|
44
|
+
*/
|
|
45
|
+
length: number;
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replay-divergence.js","sourceRoot":"","sources":["../../../src/sdk-bundle-api/bundle-to-sdk/replay-divergence.ts"],"names":[],"mappings":""}
|
|
@@ -68,6 +68,10 @@ export interface ScreenshotDiffResultCompared {
|
|
|
68
68
|
height: number;
|
|
69
69
|
mismatchPixels: number;
|
|
70
70
|
mismatchFraction: number;
|
|
71
|
+
/**
|
|
72
|
+
* First 8 characters of the hash of the diff image.
|
|
73
|
+
*/
|
|
74
|
+
diffHash?: string;
|
|
71
75
|
/**
|
|
72
76
|
* The result of comparing the redacted screenshots (i.e. screenshots taken after elements
|
|
73
77
|
* to ignore have been hidden/removed).
|
|
@@ -91,6 +95,10 @@ export interface RedactedScreenshotsCompared {
|
|
|
91
95
|
type: "no-diff" | "diff" | undefined;
|
|
92
96
|
mismatchPixels: number;
|
|
93
97
|
mismatchFraction: number;
|
|
98
|
+
/**
|
|
99
|
+
* First 8 characters of the hash of the diff image.
|
|
100
|
+
*/
|
|
101
|
+
diffHash?: string;
|
|
94
102
|
}
|
|
95
103
|
export interface RedactedScreenshotIncompatible {
|
|
96
104
|
type: "missing-base" | "missing-head" | "different-size";
|
|
@@ -110,6 +118,7 @@ export interface ScreenshotDiffResultDifference extends ScreenshotDiffResultComp
|
|
|
110
118
|
*/
|
|
111
119
|
export interface ScreenshotDiffResultFlake {
|
|
112
120
|
outcome: "flake";
|
|
121
|
+
evidence?: FlakeEvidence;
|
|
113
122
|
/**
|
|
114
123
|
* The original diff. Can be any outcome.
|
|
115
124
|
*/
|
|
@@ -124,6 +133,7 @@ export interface ScreenshotDiffResultFlake {
|
|
|
124
133
|
*/
|
|
125
134
|
diffsToHeadScreenshotOnRetries: ScreenshotDiffRetryResult[];
|
|
126
135
|
}
|
|
136
|
+
export type FlakeEvidence = "varied-results-on-retry" | "diff-is-known-flake";
|
|
127
137
|
export type ScreenshotDiffRetryResult = SingleTryScreenshotDiffRetryResult | ScreenshotDiffResultMissingBaseAndHead;
|
|
128
138
|
export type SingleTryScreenshotDiffRetryResult = {
|
|
129
139
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwaysmeticulous/api",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.140.0",
|
|
4
4
|
"description": "Meticulous API types",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"bugs": {
|
|
36
36
|
"url": "https://github.com/alwaysmeticulous/meticulous-sdk/issues"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "63755ec0c02e90e1f8cbea96fd06d3e5e0946ec2"
|
|
39
39
|
}
|