@testomatio/reporter 0.5.1 → 0.5.2
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/Changelog.md +4 -0
- package/lib/adapter/cypress-plugin/index.js +12 -2
- package/package.json +1 -1
package/Changelog.md
CHANGED
|
@@ -15,7 +15,9 @@ const testomatioReporter = on => {
|
|
|
15
15
|
const videos = [results.video];
|
|
16
16
|
|
|
17
17
|
for (const test of results.tests) {
|
|
18
|
-
const
|
|
18
|
+
const lastAttemptIndex = test.attempts.length - 1;
|
|
19
|
+
const latestAttempt = test.attempts[lastAttemptIndex];
|
|
20
|
+
|
|
19
21
|
const time = latestAttempt.duration;
|
|
20
22
|
const error = latestAttempt.error;
|
|
21
23
|
|
|
@@ -23,11 +25,19 @@ const testomatioReporter = on => {
|
|
|
23
25
|
const suiteTitle = test.title.pop();
|
|
24
26
|
|
|
25
27
|
const testId = parseTest(title);
|
|
26
|
-
const suiteId =
|
|
28
|
+
const suiteId = parseSuite(suiteTitle);
|
|
29
|
+
|
|
30
|
+
if (error) {
|
|
31
|
+
error.inspect = function() {
|
|
32
|
+
return this.codeFrame.frame;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
27
35
|
|
|
28
36
|
const screenshots = results.screenshots
|
|
29
37
|
.filter(screenshot => screenshot.path.includes(title))
|
|
38
|
+
.filter(screenshot => screenshot.testAttemptIndex === lastAttemptIndex)
|
|
30
39
|
.map(screenshot => screenshot.path);
|
|
40
|
+
|
|
31
41
|
const files = [...videos, ...screenshots];
|
|
32
42
|
|
|
33
43
|
const state = test.state === 'passed' ? TRConstants.PASSED : TRConstants.FAILED;
|