@argos-ci/playwright 6.4.2 → 6.5.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/index.d.ts CHANGED
@@ -92,6 +92,10 @@ type ArgosScreenshotOptions = {
92
92
  * @default "./screenshots"
93
93
  */
94
94
  root?: string;
95
+ /**
96
+ * Tag or array of tags to attach to the screenshot.
97
+ */
98
+ tag?: string | string[];
95
99
  /**
96
100
  * Wait for the UI to stabilize before taking the screenshot.
97
101
  * Set to `false` to disable stabilization.
package/dist/index.js CHANGED
@@ -101,6 +101,7 @@ async function getTestMetadata(testInfo) {
101
101
  id: testInfo.testId,
102
102
  title: testInfo.title,
103
103
  titlePath: testInfo.titlePath,
104
+ tags: testInfo.tags.length > 0 ? testInfo.tags : void 0,
104
105
  retry: testInfo.retry,
105
106
  retries: testInfo.project.retries,
106
107
  repeat: testInfo.repeatEachIndex,
@@ -463,6 +464,9 @@ async function argosScreenshot(handler, name, options = {}) {
463
464
  testInfo,
464
465
  useArgosReporter
465
466
  });
467
+ if (options.tag) {
468
+ metadata.tags = Array.isArray(options.tag) ? options.tag : [options.tag];
469
+ }
466
470
  if (options.threshold !== void 0) {
467
471
  validateThreshold(options.threshold);
468
472
  metadata.transient.threshold = options.threshold;
package/dist/reporter.js CHANGED
@@ -73,6 +73,7 @@ async function getTestMetadataFromTestCase(testCase, testResult) {
73
73
  const testMetadata = {
74
74
  title: testCase.title,
75
75
  titlePath: testCase.titlePath(),
76
+ tags: testCase.tags.length > 0 ? testCase.tags : void 0,
76
77
  retry: testResult.retry,
77
78
  retries: testCase.retries,
78
79
  repeat: testCase.repeatEachIndex,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@argos-ci/playwright",
3
3
  "description": "Playwright SDK for visual testing with Argos.",
4
- "version": "6.4.2",
4
+ "version": "6.5.0",
5
5
  "author": "Smooth Code",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -48,8 +48,8 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@argos-ci/browser": "5.1.2",
51
- "@argos-ci/core": "5.1.1",
52
- "@argos-ci/util": "3.2.0",
51
+ "@argos-ci/core": "5.1.2",
52
+ "@argos-ci/util": "3.3.0",
53
53
  "chalk": "^5.6.2",
54
54
  "debug": "^4.4.3"
55
55
  },
@@ -69,5 +69,5 @@
69
69
  "lint": "eslint .",
70
70
  "test": "vitest src"
71
71
  },
72
- "gitHead": "52b2c59dc89e972ea9951dc7a94bf8f7d7922e4a"
72
+ "gitHead": "3e325792c50e801034c3248d94d7b1dc91bede71"
73
73
  }