@arghajit/dummy 0.1.0-beta-2 → 0.1.0-beta-3
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.
|
@@ -177,10 +177,9 @@ class PlaywrightPulseReporter {
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
async onTestEnd(test, result) {
|
|
180
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
180
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
181
181
|
const project = (_a = test.parent) === null || _a === void 0 ? void 0 : _a.project();
|
|
182
|
-
const
|
|
183
|
-
const browserName = ((_c = project === null || project === void 0 ? void 0 : project.use) === null || _c === void 0 ? void 0 : _c.defaultBrowserType) || (project === null || project === void 0 ? void 0 : project.name) || "unknown";
|
|
182
|
+
const browserName = await this.getBrowserInfo(test);
|
|
184
183
|
const testStatus = convertStatus(result.status, test);
|
|
185
184
|
const startTime = new Date(result.startTime);
|
|
186
185
|
const endTime = new Date(startTime.getTime() + result.duration);
|
|
@@ -202,7 +201,7 @@ class PlaywrightPulseReporter {
|
|
|
202
201
|
};
|
|
203
202
|
let codeSnippet = undefined;
|
|
204
203
|
try {
|
|
205
|
-
if (((
|
|
204
|
+
if (((_b = test.location) === null || _b === void 0 ? void 0 : _b.file) && ((_c = test.location) === null || _c === void 0 ? void 0 : _c.line) && ((_d = test.location) === null || _d === void 0 ? void 0 : _d.column)) {
|
|
206
205
|
const relativePath = path.relative(this.config.rootDir, test.location.file);
|
|
207
206
|
codeSnippet = `Test defined at: ${relativePath}:${test.location.line}:${test.location.column}`;
|
|
208
207
|
}
|
|
@@ -227,16 +226,16 @@ class PlaywrightPulseReporter {
|
|
|
227
226
|
id: uniqueTestId,
|
|
228
227
|
runId: "TBD",
|
|
229
228
|
name: test.titlePath().join(" > "),
|
|
230
|
-
suiteName: (project === null || project === void 0 ? void 0 : project.name) || ((
|
|
229
|
+
suiteName: (project === null || project === void 0 ? void 0 : project.name) || ((_e = this.config.projects[0]) === null || _e === void 0 ? void 0 : _e.name) || "Default Suite",
|
|
231
230
|
status: testStatus,
|
|
232
231
|
duration: result.duration,
|
|
233
232
|
startTime: startTime,
|
|
234
233
|
endTime: endTime,
|
|
235
234
|
browser: browserName,
|
|
236
235
|
retries: result.retry,
|
|
237
|
-
steps: ((
|
|
238
|
-
errorMessage: (
|
|
239
|
-
stackTrace: (
|
|
236
|
+
steps: ((_f = result.steps) === null || _f === void 0 ? void 0 : _f.length) ? await processAllSteps(result.steps) : [],
|
|
237
|
+
errorMessage: (_g = result.error) === null || _g === void 0 ? void 0 : _g.message,
|
|
238
|
+
stackTrace: (_h = result.error) === null || _h === void 0 ? void 0 : _h.stack,
|
|
240
239
|
codeSnippet: codeSnippet,
|
|
241
240
|
tags: test.tags.map((tag) => tag.startsWith("@") ? tag.substring(1) : tag),
|
|
242
241
|
screenshots: [],
|
package/package.json
CHANGED