playwright-ctrf-json-reporter 0.0.21 → 0.0.22

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.
@@ -142,6 +142,20 @@ class GenerateCtrfReport {
142
142
  if (this.reporterConfigOptions.annotations !== undefined) {
143
143
  test.extra = { annotations: testCase.annotations };
144
144
  }
145
+ if (testCase.results.length > 1) {
146
+ const retryResults = testCase.results.slice(0, -1);
147
+ test.retryAttempts = [];
148
+ for (const retryResult of retryResults) {
149
+ const retryAttempt = {
150
+ status: this.mapPlaywrightStatusToCtrf(retryResult.status),
151
+ duration: retryResult.duration,
152
+ message: this.extractFailureDetails(retryResult).message,
153
+ trace: this.extractFailureDetails(retryResult).trace,
154
+ snippet: this.extractFailureDetails(retryResult).snippet,
155
+ };
156
+ test.retryAttempts.push(retryAttempt);
157
+ }
158
+ }
145
159
  }
146
160
  ctrfReport.results.tests.push(test);
147
161
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright-ctrf-json-reporter",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "A Playwright JSON test reporter to create test results reports",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {