@testomatio/reporter 1.0.12-beta.2 → 1.0.12-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.
- package/lib/xmlReader.js +8 -4
- package/package.json +1 -1
package/lib/xmlReader.js
CHANGED
|
@@ -39,8 +39,8 @@ class XmlReader {
|
|
|
39
39
|
if (!this.adapter) throw new Error('XML adapter for this format not found');
|
|
40
40
|
|
|
41
41
|
this.opts = opts || {};
|
|
42
|
-
|
|
43
|
-
this.pipes = pipesFactory(opts, store);
|
|
42
|
+
this.store = {}
|
|
43
|
+
this.pipes = pipesFactory(opts, this.store);
|
|
44
44
|
|
|
45
45
|
this.parser = new XMLParser(options);
|
|
46
46
|
this.tests = []
|
|
@@ -353,8 +353,12 @@ class XmlReader {
|
|
|
353
353
|
let files = [];
|
|
354
354
|
if (test.files?.length) files = test.files.map(f => path.join(process.cwd(), f))
|
|
355
355
|
files = [...files, ...fetchFilesFromStackTrace(test.stack)];
|
|
356
|
-
|
|
357
|
-
|
|
356
|
+
|
|
357
|
+
if (!files.length) continue;
|
|
358
|
+
|
|
359
|
+
const runId = this.runId || this.store.runId || Date.now().toString();
|
|
360
|
+
test.artifacts = await Promise.all(files.map(f => upload.uploadFileByPath(f, runId)));
|
|
361
|
+
console.log(APP_PREFIX, `🗄️ Uploaded ${chalk.bold(`${files.length} artifacts`)} for test ${test.title}`);
|
|
358
362
|
}
|
|
359
363
|
}
|
|
360
364
|
|