@sentinelqa/playwright-reporter 0.1.12 → 0.1.13

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.
@@ -20,6 +20,17 @@ const ARTIFACT_EXTENSIONS = {
20
20
  report: [".html", ".json"],
21
21
  attachment: []
22
22
  };
23
+ const normalizeTestStatus = (status) => {
24
+ if (!status)
25
+ return "unknown";
26
+ if (status === "expected")
27
+ return "passed";
28
+ if (status === "unexpected")
29
+ return "failed";
30
+ if (status === "flaky")
31
+ return "passed";
32
+ return status;
33
+ };
23
34
  const escapeHtml = (value) => value
24
35
  .replace(/&/g, "&")
25
36
  .replace(/</g, "&lt;")
@@ -161,7 +172,7 @@ const createReportTest = (test, titlePath) => {
161
172
  titlePath,
162
173
  file: test?.location?.file || null,
163
174
  projectName: test?.projectName || null,
164
- status: test?.status || lastResult?.status || "unknown",
175
+ status: normalizeTestStatus(test?.status || lastResult?.status || "unknown"),
165
176
  duration,
166
177
  errors,
167
178
  artifacts: []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentinelqa/playwright-reporter",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "private": false,
5
5
  "description": "Playwright reporter for CI debugging with optional Sentinel cloud dashboards",
6
6
  "license": "MIT",