@visual-regression-tracker/agent-cypress 5.3.0 → 5.4.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/README.md +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/plugin.js +3 -1
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -136,6 +136,7 @@ cy.vrtTrack("Whole page with additional options", {
|
|
|
136
136
|
diffTollerancePercent: 1,
|
|
137
137
|
ignoreAreas: [{ x: 1, y: 2, width: 100, height: 200 }],
|
|
138
138
|
retryLimit: 2,
|
|
139
|
+
keepScreenshot: false, // Keep screenshot local copy, false by default
|
|
139
140
|
});
|
|
140
141
|
```
|
|
141
142
|
|
package/dist/index.d.ts
CHANGED
|
@@ -17,10 +17,13 @@ declare namespace Cypress {
|
|
|
17
17
|
* ignoreAreas: [
|
|
18
18
|
* {x: 1, y: 2, width: 100, height: 200}
|
|
19
19
|
* ],
|
|
20
|
-
* retryLimit: 5
|
|
20
|
+
* retryLimit: 5,
|
|
21
|
+
* keepScreenshot: false,
|
|
21
22
|
* })
|
|
22
23
|
*/
|
|
23
|
-
vrtTrack(name: string, options?: Partial<Loggable & Timeoutable & ScreenshotOptions & TrackOptions
|
|
24
|
+
vrtTrack(name: string, options?: Partial<Loggable & Timeoutable & ScreenshotOptions & TrackOptions & {
|
|
25
|
+
keepScreenshot?: boolean;
|
|
26
|
+
}>): Chainable<null>;
|
|
24
27
|
vrtTrackBuffer(name: string, imageBuffer: Buffer, options?: Partial<Loggable & Timeoutable & ScreenshotOptions & TrackOptions>): Chainable<null>;
|
|
25
28
|
vrtTrackBase64(name: string, imageBase64: string, options?: Partial<Loggable & Timeoutable & ScreenshotOptions & TrackOptions>): Chainable<null>;
|
|
26
29
|
vrtStart(): null;
|
package/dist/plugin.js
CHANGED
|
@@ -106,7 +106,9 @@ function addVisualRegressionTrackerPlugin(on, config) {
|
|
|
106
106
|
return [4 /*yield*/, vrt["submitTestRunMultipart"](data)];
|
|
107
107
|
case 1:
|
|
108
108
|
result = _a.sent();
|
|
109
|
-
|
|
109
|
+
if (!props.keepScreenshot) {
|
|
110
|
+
(0, fs_1.unlinkSync)(props.imagePath);
|
|
111
|
+
}
|
|
110
112
|
return [2 /*return*/, result];
|
|
111
113
|
}
|
|
112
114
|
});
|
package/dist/utils.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare const toTestRunDto: ({ name, pixelRatio, options, }: {
|
|
|
16
16
|
customTags: any;
|
|
17
17
|
diffTollerancePercent: any;
|
|
18
18
|
ignoreAreas: any;
|
|
19
|
+
keepScreenshot: any;
|
|
19
20
|
};
|
|
20
21
|
export declare const trackWithRetry: (trackFn: () => Cypress.Chainable<TestRunResponse>, shouldStopFn: (result: TestRunResponse) => boolean, onStopFn: (result: TestRunResponse) => Cypress.Chainable<unknown>, retryLimit?: number) => unknown;
|
|
21
22
|
export declare const checkResult: (result: TestRunResponse) => Cypress.Chainable<unknown>;
|
package/dist/utils.js
CHANGED
|
@@ -40,6 +40,7 @@ var toTestRunDto = function (_a) {
|
|
|
40
40
|
customTags: options === null || options === void 0 ? void 0 : options.customTags,
|
|
41
41
|
diffTollerancePercent: options === null || options === void 0 ? void 0 : options.diffTollerancePercent,
|
|
42
42
|
ignoreAreas: options === null || options === void 0 ? void 0 : options.ignoreAreas,
|
|
43
|
+
keepScreenshot: options === null || options === void 0 ? void 0 : options.keepScreenshot,
|
|
43
44
|
});
|
|
44
45
|
};
|
|
45
46
|
exports.toTestRunDto = toTestRunDto;
|