@argos-ci/cypress 7.1.6 → 7.2.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.
Files changed (2) hide show
  1. package/dist/support.mjs +8 -3
  2. package/package.json +4 -4
package/dist/support.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import "cypress-wait-until";
2
2
  import { getGlobalScript, resolveViewport } from "@argos-ci/browser";
3
- import { getMetadataPath, getScreenshotName, normalizeBaseNames, validateThreshold } from "@argos-ci/util/browser";
3
+ import { getMetadataPath, getScreenshotName, getTestRunKey, nextCaptureIndex, normalizeBaseNames, validateThreshold } from "@argos-ci/util/browser";
4
4
  //#region package.json
5
- var version = "7.1.5";
5
+ var version = "7.1.6";
6
6
  //#endregion
7
7
  //#region src/shared.ts
8
8
  /**
@@ -82,6 +82,10 @@ Cypress.Commands.add("argosScreenshot", { prevSubject: [
82
82
  message: name
83
83
  });
84
84
  injectArgos();
85
+ const captureIndex = nextCaptureIndex(getTestRunKey({
86
+ titlePath: Cypress.currentTest.titlePath,
87
+ retry: Cypress.currentRetry
88
+ }));
85
89
  const afterAll = beforeAll(options);
86
90
  function stabilizeAndScreenshot(name, baseNames) {
87
91
  waitForReadiness(options);
@@ -123,7 +127,8 @@ Cypress.Commands.add("argosScreenshot", { prevSubject: [
123
127
  sdk: {
124
128
  name: "@argos-ci/cypress",
125
129
  version
126
- }
130
+ },
131
+ capture: { index: captureIndex }
127
132
  };
128
133
  metadata.transient = {};
129
134
  if (baseNames) metadata.transient.baseName = baseNames;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@argos-ci/cypress",
3
3
  "description": "Cypress SDK for visual testing with Argos.",
4
- "version": "7.1.6",
4
+ "version": "7.2.0",
5
5
  "author": "Smooth Code",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -45,8 +45,8 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@argos-ci/browser": "6.4.5",
48
- "@argos-ci/core": "6.8.2",
49
- "@argos-ci/util": "4.1.0",
48
+ "@argos-ci/core": "6.8.3",
49
+ "@argos-ci/util": "4.2.0",
50
50
  "cypress-wait-until": "^3.0.2"
51
51
  },
52
52
  "peerDependencies": {
@@ -66,5 +66,5 @@
66
66
  "check-format": "prettier --check --ignore-unknown --ignore-path=../../.gitignore --ignore-path=../../.prettierignore .",
67
67
  "lint": "eslint ."
68
68
  },
69
- "gitHead": "30a374b2c0f2b67b7a90fd4d22e395b70c191e0c"
69
+ "gitHead": "b2a9a9d84dc14e148a68295f56cfdfec03f887f1"
70
70
  }