@visual-regression-tracker/agent-cypress 5.2.0 → 5.3.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.
@@ -14,7 +14,7 @@ jobs:
14
14
  fetch-depth: 0
15
15
 
16
16
  - name: Setup Node.js environment
17
- uses: actions/setup-node@v1.4.4
17
+ uses: actions/setup-node@v2
18
18
 
19
19
  - name: Install dependencies
20
20
  run: npm ci
package/dist/utils.d.ts CHANGED
@@ -17,7 +17,7 @@ export declare const toTestRunDto: ({ name, pixelRatio, options, }: {
17
17
  diffTollerancePercent: any;
18
18
  ignoreAreas: any;
19
19
  };
20
- export declare const trackWithRetry: (trackFn: () => Cypress.Chainable<TestRunResponse>, shouldStopFn: (result: TestRunResponse) => boolean, onStopFn: (result: TestRunResponse) => Cypress.Chainable<unknown>, retryLimit?: number) => Cypress.Chainable<unknown>;
20
+ export declare const trackWithRetry: (trackFn: () => Cypress.Chainable<TestRunResponse>, shouldStopFn: (result: TestRunResponse) => boolean, onStopFn: (result: TestRunResponse) => Cypress.Chainable<unknown>, retryLimit?: number) => unknown;
21
21
  export declare const checkResult: (result: TestRunResponse) => Cypress.Chainable<unknown>;
22
22
  export declare const shouldStopRetry: (result: TestRunResponse) => boolean;
23
23
  export declare const trackImage: (subject: any, name: string, options: any) => Cypress.Chainable<TestRunResponse>;
package/dist/utils.js CHANGED
@@ -34,7 +34,7 @@ var toTestRunDto = function (_a) {
34
34
  return ({
35
35
  name: name,
36
36
  browser: Cypress.browser.name,
37
- viewport: (_b = options === null || options === void 0 ? void 0 : options.viewport) !== null && _b !== void 0 ? _b : Cypress.config("viewportWidth") * pixelRatio + "x" + Cypress.config("viewportHeight") * pixelRatio,
37
+ viewport: (_b = options === null || options === void 0 ? void 0 : options.viewport) !== null && _b !== void 0 ? _b : "".concat(Cypress.config("viewportWidth") * pixelRatio, "x").concat(Cypress.config("viewportHeight") * pixelRatio),
38
38
  os: options === null || options === void 0 ? void 0 : options.os,
39
39
  device: options === null || options === void 0 ? void 0 : options.device,
40
40
  customTags: options === null || options === void 0 ? void 0 : options.customTags,
@@ -50,7 +50,7 @@ var trackWithRetry = function (trackFn, shouldStopFn, onStopFn, retryLimit) {
50
50
  onStopFn(result);
51
51
  return;
52
52
  }
53
- (0, exports.log)("Diff found... Remaining retry attempts **" + retryLimit + "**");
53
+ (0, exports.log)("Diff found... Remaining retry attempts **".concat(retryLimit, "**"));
54
54
  return (0, exports.trackWithRetry)(trackFn, shouldStopFn, onStopFn, retryLimit - 1);
55
55
  });
56
56
  };
@@ -73,19 +73,19 @@ var trackImage = function (subject, name, options) {
73
73
  pixelRatio = props.pixelRatio;
74
74
  return options === null || options === void 0 ? void 0 : options.onAfterScreenshot;
75
75
  } }))
76
- .then(function () { return (0, exports.log)("tracking " + name); })
76
+ .then(function () { return (0, exports.log)("tracking ".concat(name)); })
77
77
  .then(function () {
78
78
  return cy.task("VRT_TRACK_IMAGE_MULTIPART", __assign(__assign({}, (0, exports.toTestRunDto)({ name: name, pixelRatio: pixelRatio, options: options })), { imagePath: imagePath }), { log: false });
79
79
  });
80
80
  };
81
81
  exports.trackImage = trackImage;
82
82
  var trackBuffer = function (name, imageBuffer, options) {
83
- (0, exports.log)("tracking " + name);
83
+ (0, exports.log)("tracking ".concat(name));
84
84
  return cy.task("VRT_TRACK_BUFFER_MULTIPART", __assign(__assign({}, (0, exports.toTestRunDto)({ name: name, options: options })), { imageBuffer: imageBuffer }), { log: false });
85
85
  };
86
86
  exports.trackBuffer = trackBuffer;
87
87
  var trackBase64 = function (name, imageBase64, options) {
88
- (0, exports.log)("tracking " + name);
88
+ (0, exports.log)("tracking ".concat(name));
89
89
  return cy.task("VRT_TRACK_IMAGE_BASE64", __assign(__assign({}, (0, exports.toTestRunDto)({ name: name, options: options })), { imageBase64: imageBase64 }), { log: false });
90
90
  };
91
91
  exports.trackBase64 = trackBase64;
package/package.json CHANGED
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "name": "@visual-regression-tracker/agent-cypress",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "description": "Visual Regression Tracker integration plugin",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
5
7
  "scripts": {
6
8
  "test": "cypress run --spec 'cypress/integration/regression.spec.ts'",
7
9
  "build": "tsc",
@@ -23,16 +25,16 @@
23
25
  },
24
26
  "homepage": "https://github.com/Visual-Regression-Tracker/agent-cypress#readme",
25
27
  "dependencies": {
26
- "@visual-regression-tracker/sdk-js": "5.2.0"
28
+ "@visual-regression-tracker/sdk-js": "5.3.0"
27
29
  },
28
30
  "devDependencies": {
29
- "@types/jest": "^26.0.24",
30
- "@types/node": "^16.7.7",
31
- "cypress": "^8.3.1",
32
- "jest": "^26.6.3",
33
- "semantic-release": "^17.4.7",
34
- "ts-jest": "^26.5.6",
35
- "typescript": "^4.4.2"
31
+ "@types/jest": "^27.4.1",
32
+ "@types/node": "^17.0.23",
33
+ "cypress": "^9.5.2",
34
+ "jest": "^27.5.1",
35
+ "semantic-release": "^19.0.2",
36
+ "ts-jest": "^27.1.4",
37
+ "typescript": "^4.6.3"
36
38
  },
37
39
  "publishConfig": {
38
40
  "access": "public"