@test-station/adapter-playwright 0.2.22 → 0.2.24
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/package.json +1 -1
- package/src/index.js +12 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -49,7 +49,7 @@ export function createPlaywrightAdapter() {
|
|
|
49
49
|
content: JSON.stringify(payload, null, 2),
|
|
50
50
|
},
|
|
51
51
|
];
|
|
52
|
-
const warnings =
|
|
52
|
+
const warnings = extractTopLevelErrorMessages(payload);
|
|
53
53
|
let coverage = null;
|
|
54
54
|
|
|
55
55
|
if (browserCoverageEnabled && coverageDir) {
|
|
@@ -239,6 +239,17 @@ function parsePlaywrightReport(report, workspaceDir) {
|
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
+
function extractTopLevelErrorMessages(report) {
|
|
243
|
+
return (Array.isArray(report?.errors) ? report.errors : [])
|
|
244
|
+
.map((error) => {
|
|
245
|
+
if (typeof error?.message === 'string' && error.message.trim().length > 0) {
|
|
246
|
+
return trimForReport(error.message.trim(), 1000);
|
|
247
|
+
}
|
|
248
|
+
return trimForReport(JSON.stringify(error, null, 2), 1000);
|
|
249
|
+
})
|
|
250
|
+
.filter(Boolean);
|
|
251
|
+
}
|
|
252
|
+
|
|
242
253
|
function mergeBrowserCoverage(options) {
|
|
243
254
|
const payloads = readCoveragePayloads(options.coverageDir);
|
|
244
255
|
if (payloads.length === 0) {
|