@argos-ci/cypress 6.2.11 → 6.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.
package/dist/support.d.ts CHANGED
@@ -22,6 +22,10 @@ type ArgosScreenshotOptions = Partial<Cypress.Loggable & Cypress.Timeoutable & C
22
22
  * @default true
23
23
  */
24
24
  stabilize?: boolean | StabilizationPluginOptions;
25
+ /**
26
+ * Tag or array of tags to attach to the screenshot.
27
+ */
28
+ tag?: string | string[];
25
29
  };
26
30
  declare global {
27
31
  namespace Cypress {
package/dist/support.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  } from "@argos-ci/util/browser";
12
12
 
13
13
  // package.json
14
- var version = "6.2.10";
14
+ var version = "6.2.12";
15
15
 
16
16
  // src/shared.ts
17
17
  var NAME_PREFIX = "argos/";
@@ -86,7 +86,7 @@ Cypress.Commands.add(
86
86
  "argosScreenshot",
87
87
  { prevSubject: ["optional", "element", "window", "document"] },
88
88
  (subject, name, options = {}) => {
89
- const { viewports, argosCSS: _argosCSS, ...cypressOptions } = options;
89
+ const { viewports, argosCSS: _argosCSS, tag, ...cypressOptions } = options;
90
90
  if (!name) {
91
91
  throw new Error("The `name` argument is required.");
92
92
  }
@@ -143,6 +143,9 @@ Cypress.Commands.add(
143
143
  }
144
144
  };
145
145
  metadata.transient = {};
146
+ if (tag) {
147
+ metadata.tags = Array.isArray(tag) ? tag : [tag];
148
+ }
146
149
  if (options.threshold !== void 0) {
147
150
  validateThreshold(options.threshold);
148
151
  metadata.transient.threshold = options.threshold;
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": "6.2.11",
4
+ "version": "6.3.0",
5
5
  "author": "Smooth Code",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -46,8 +46,8 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@argos-ci/browser": "5.1.2",
49
- "@argos-ci/core": "5.1.0",
50
- "@argos-ci/util": "3.2.0",
49
+ "@argos-ci/core": "5.1.2",
50
+ "@argos-ci/util": "3.3.0",
51
51
  "cypress-wait-until": "^3.0.2"
52
52
  },
53
53
  "peerDependencies": {
@@ -67,5 +67,5 @@
67
67
  "check-format": "prettier --check --ignore-unknown --ignore-path=../../.gitignore --ignore-path=../../.prettierignore .",
68
68
  "lint": "eslint ."
69
69
  },
70
- "gitHead": "a13deaa740c8126c3d98499330ef42d6871b96d7"
70
+ "gitHead": "3e325792c50e801034c3248d94d7b1dc91bede71"
71
71
  }