@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.
- package/dist/localReport.js +12 -1
- package/package.json +1 -1
package/dist/localReport.js
CHANGED
|
@@ -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, "<")
|
|
@@ -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: []
|