@alwaysmeticulous/api 2.39.0 → 2.40.1

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
@@ -1,7 +1,7 @@
1
1
  export { Organization } from "./organization.types";
2
2
  export { Project, ProjectConfigurationData } from "./project.types";
3
3
  export { EndStateScreenshot, ReplayDiff, ReplayDiffData, ScreenshotAfterEvent, ScreenshotAssertionsEnabledOptions, ScreenshotAssertionsOptions, ScreenshotDiffOptions, ScreenshotDiffResult, ScreenshotDiffResultCompared, ScreenshotDiffResultDifferentSize, ScreenshotDiffResultMissingBase, ScreenshotDiffResultMissingBaseAndHead, ScreenshotDiffResultMissingHead, ScreenshotIdentifier, ScreenshottingEnabledOptions, SingleTryScreenshotDiffResult, StoryboardOptions, } from "./replay/replay-diff.types";
4
- export { TestCase, TestCaseReplayOptions, TestRunArguments, TestRunConfigData, TestRunEnvironment, } from "./replay/test-run.types";
4
+ export { TestCase, TestCaseReplayOptions, TestRunArguments, TestRunConfigData, TestRunEnvironment, TestRun, TestRunStatus, TestCaseResult, TestCaseResultStatus, } from "./replay/test-run.types";
5
5
  export { ReplayableEvent } from "./sdk-bundle-api/bidirectional/replayable-event";
6
6
  export { SDKReplayTimelineEntry, SDKReplayTimelineData, } from "./sdk-bundle-api/bundle-to-sdk/timeline.types";
7
7
  export { HarEntry, HarLog, HarRequest, HarResponse, } from "./sdk-bundle-api/sdk-to-bundle/har-log";
@@ -28,7 +28,6 @@ export interface ScreenshotAssertionsEnabledOptions extends ScreenshottingEnable
28
28
  }
29
29
  export interface ScreenshottingEnabledOptions {
30
30
  enabled: true;
31
- screenshotSelector: string | null;
32
31
  storyboardOptions: StoryboardOptions;
33
32
  }
34
33
  export declare type StoryboardOptions = {
@@ -46,10 +45,19 @@ export type ScreenshotDiffResult = {
46
45
  identifier: ScreenshotIdentifier;
47
46
  } & (SingleTryScreenshotDiffResult | ScreenshotDiffResultFlake);
48
47
  export type ScreenshotIdentifier = EndStateScreenshot | ScreenshotAfterEvent;
49
- export interface EndStateScreenshot {
48
+ export interface LogicVersioned {
49
+ /**
50
+ * The version of the logic used to generate the screenshot. This should be bumped
51
+ * whenever the Meticulous code changes such that two screenshots on different logic versions
52
+ * are incomparable. This field is used to avoid falsely flagging a diff to our users when
53
+ * the logic to generate a screenshot or execute a replay changes.
54
+ */
55
+ logicVersion?: number;
56
+ }
57
+ export interface EndStateScreenshot extends LogicVersioned {
50
58
  type: "end-state";
51
59
  }
52
- export interface ScreenshotAfterEvent {
60
+ export interface ScreenshotAfterEvent extends LogicVersioned {
53
61
  type: "after-event";
54
62
  /** 0 indexed */
55
63
  eventNumber: number;
@@ -1,3 +1,4 @@
1
+ import { Project } from "../project.types";
1
2
  import { ScreenshotDiffOptions } from "./replay-diff.types";
2
3
  /** Represents the configuration used for a test run */
3
4
  export interface TestRunConfigData {
@@ -18,7 +19,6 @@ export interface TestCaseReplayOptions extends Partial<ScreenshotDiffOptions> {
18
19
  * If present will run the session against a local server serving up previously snapshotted assets (HTML, JS, CSS etc.) from the specified prior replay, instead of against a URL.
19
20
  */
20
21
  simulationIdForAssets?: string | undefined;
21
- screenshotSelector?: string;
22
22
  moveBeforeClick?: boolean;
23
23
  }
24
24
  export interface TestRunArguments {
@@ -73,3 +73,24 @@ export interface TestRunGitHubWorkflowDispatchContext {
73
73
  /** Resolved head commit hash */
74
74
  headSha: string;
75
75
  }
76
+ export type TestRunStatus = "Running" | "Success" | "Failure";
77
+ export interface TestRun {
78
+ id: string;
79
+ status: TestRunStatus;
80
+ project: Project;
81
+ resultData?: {
82
+ results: TestCaseResult[];
83
+ [key: string]: any;
84
+ };
85
+ [key: string]: any;
86
+ }
87
+ export type TestCaseResultStatus = "pass" | "fail" | "flake";
88
+ export interface TestCaseResult extends TestCase {
89
+ headReplayId: string;
90
+ /**
91
+ * A test case is marked as a flake if there were screenshot comparison failures,
92
+ * but for every one of those failures regenerating the screenshot on head sometimes gave
93
+ * a different screenshot to the original screenshot taken on head.
94
+ */
95
+ result: TestCaseResultStatus;
96
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwaysmeticulous/api",
3
- "version": "2.39.0",
3
+ "version": "2.40.1",
4
4
  "description": "Meticulous API types",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",
@@ -34,5 +34,5 @@
34
34
  "bugs": {
35
35
  "url": "https://github.com/alwaysmeticulous/meticulous-sdk/issues"
36
36
  },
37
- "gitHead": "b6488b15a8233fcd1380b1607ec254d5d3bc0378"
37
+ "gitHead": "b56c6ec8cf1ac2d0f935e0f2500a3e55463574a8"
38
38
  }