@alwaysmeticulous/api 2.173.0 → 2.177.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 CHANGED
@@ -2,6 +2,7 @@ export { Organization } from "./organization.types";
2
2
  export { Project, ProjectSettingsScreenshottingOptions } from "./project.types";
3
3
  export { EndStateScreenshot, ScreenshotAfterEvent, ScreenshotDiffResult, ScreenshotDiffResultCompared, ScreenshotDiffResultDifferentSize, ScreenshotDiffResultMissingBase, ScreenshotDiffResultMissingBaseAndHead, ScreenshotDiffResultMissingHead, ScreenshotDiffResultDifference, ScreenshotDiffResultNoDifference, ScreenshotIdentifier, ScreenshotVariant, SingleTryScreenshotDiffResult, ScreenshotDiffRetryResult, SingleTryScreenshotDiffRetryResult, RedactedScreenshotIncompatible, RedactedScreenshotsCompared, } from "./sdk-bundle-api/bundle-to-sdk/screenshot-diff-result";
4
4
  export { TestCase, TestCaseReplayOptions, TestRunStatus, TestCaseResult, TestCaseResultStatus, } from "./replay/test-run.types";
5
+ export { TestRunChunkStatus } from "./replay/test-run-chunk.types";
5
6
  export * from "./sdk-bundle-api/sdk-to-bundle/test-run-environment";
6
7
  export { ReplayableEvent } from "./sdk-bundle-api/bidirectional/replayable-event";
7
8
  export { HarEntry, HarLog, HarRequest, HarResponse, } from "./sdk-bundle-api/sdk-to-bundle/har-log";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA4BA,sFAAoE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA6BA,sFAAoE"}
@@ -0,0 +1,7 @@
1
+ import { TestRunStatus } from "./test-run.types";
2
+ /**
3
+ * Execution of a chunk of a test run chunk.
4
+ *
5
+ * The values and their meanings are the same as for {@link TestRunStatus}.
6
+ */
7
+ export type TestRunChunkStatus = TestRunStatus;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=test-run-chunk.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-run-chunk.types.js","sourceRoot":"","sources":["../../src/replay/test-run-chunk.types.ts"],"names":[],"mappings":""}
@@ -24,6 +24,12 @@ export interface TestCaseReplayOptions extends Partial<ScreenshotDiffOptions> {
24
24
  * into 'Running' in this case, if the worker retries it.
25
25
  */
26
26
  export type TestRunStatus = "Scheduled" | "Running" | "Success" | "Failure" | "ExecutionError";
27
+ /**
28
+ * Execution of a chunk of a test run chunk.
29
+ *
30
+ * The values and their meanings are the same as for {@link TestRunStatus}.
31
+ */
32
+ export type TestRunChunkStatus = TestRunStatus;
27
33
  export type TestCaseResultStatus = "pass" | "fail" | "flake";
28
34
  export interface TestCaseResult extends TestCase {
29
35
  headReplayId: string;
@@ -76,10 +76,16 @@ export interface ScreenshotDiffResultCompared {
76
76
  * The result of comparing the redacted screenshots (i.e. screenshots taken after elements
77
77
  * to ignore have been hidden/removed).
78
78
  *
79
- * Present only if there were redacted screenshots to compare, or if the original normal
80
- * screenshots did not differ so there was no need to compare the redacted screenshots.
79
+ * Present if there were redacted screenshots to compare and either:
80
+ * 1. the original normal screenshots differed or
81
+ * 2. this comparison was a retry and the original comparison result was from the redacted screenshots
81
82
  */
82
- redactedScreenshotsComparisonResult?: RedactedScreenshotsCompared | RedactedScreenshotIncompatible;
83
+ redactedScreenshotsComparisonResult?: {
84
+ /**
85
+ * This field will only be true if we are in situation 2 above and the original comparison was a no diff.
86
+ */
87
+ wasOriginalComparisonNoDiff?: boolean;
88
+ } & (RedactedScreenshotsCompared | RedactedScreenshotIncompatible);
83
89
  }
84
90
  export interface ScreenshotDiffResultNoDifference extends ScreenshotDiffResultCompared {
85
91
  outcome: "no-diff";
@@ -133,7 +139,16 @@ export interface ScreenshotDiffResultFlake {
133
139
  */
134
140
  diffsToHeadScreenshotOnRetries: ScreenshotDiffRetryResult[];
135
141
  }
136
- export type FlakeEvidence = "varied-results-on-retry" | "diff-is-known-flake";
142
+ /**
143
+ * - **varied-results-on-retry**: The head screenshot was retaken one or more times and at least one of
144
+ * the new head screenshots differed from the first head screenshot.
145
+ *
146
+ * - **varied-redacted-results-on-retry**: The comparison between the retry screenshot and the original screenshot did not have
147
+ * a diff but when we compared the redacted versions of the screenshot we found a diff.
148
+ *
149
+ * - **diff-is-known-flake**: The diff screenshot's hash matches the hash of a flake that was previously detected by one of the methods above.
150
+ */
151
+ export type FlakeEvidence = "varied-results-on-retry" | "varied-redacted-results-on-retry" | "diff-is-known-flake";
137
152
  export type ScreenshotDiffRetryResult = SingleTryScreenshotDiffRetryResult | ScreenshotDiffResultMissingBaseAndHead;
138
153
  export type SingleTryScreenshotDiffRetryResult = {
139
154
  /**
@@ -26,6 +26,7 @@ export interface ScreenshotDiffOptions {
26
26
  diffThreshold: number;
27
27
  diffPixelThreshold: number;
28
28
  diffHashesToIgnoreByScreenshotFilename?: Record<string, string[]>;
29
+ shouldUseRedactedScreenshotByScreenshotFilename?: Record<string, boolean>;
29
30
  }
30
31
  export type ElementToIgnore = CSSSelectorToIgnore;
31
32
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwaysmeticulous/api",
3
- "version": "2.173.0",
3
+ "version": "2.177.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": "4aa9b139353dae57284d22afa2b879eebd2487f3"
38
+ "gitHead": "99b38cab406ba8de7e0fde5fd53cd98a81449ed1"
39
39
  }