@testomatio/reporter 2.17.0-beta.1 → 2.18.0

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.
@@ -786,6 +786,10 @@
786
786
  color: #8b5cf6;
787
787
  }
788
788
 
789
+ .test-group-stat.duration {
790
+ color: var(--gray-600);
791
+ }
792
+
789
793
  .test-group-expand {
790
794
  color: var(--gray-500);
791
795
  transition: var(--transition);
@@ -2826,6 +2830,24 @@
2826
2830
  }
2827
2831
  }
2828
2832
 
2833
+ function formatCompactDuration(milliseconds) {
2834
+ if (!milliseconds || milliseconds <= 0) return '0ms';
2835
+
2836
+ const totalSeconds = Math.floor(milliseconds / 1000);
2837
+ if (totalSeconds < 1) return `${Math.round(milliseconds)}ms`;
2838
+
2839
+ const hours = Math.floor(totalSeconds / 3600);
2840
+ const minutes = Math.floor((totalSeconds % 3600) / 60);
2841
+ const seconds = totalSeconds % 60;
2842
+
2843
+ const parts = [];
2844
+ if (hours > 0) parts.push(`${hours}h`);
2845
+ if (hours > 0 || minutes > 0) parts.push(`${minutes}m`);
2846
+ parts.push(`${seconds}s`);
2847
+
2848
+ return parts.join(' ');
2849
+ }
2850
+
2829
2851
  function hasMeaningfulMessage(message) {
2830
2852
  return typeof message === 'string' && message.trim().length > 0 && message !== 'No message available';
2831
2853
  }
@@ -3435,6 +3457,12 @@
3435
3457
 
3436
3458
  const groupIcon = group.type === 'suite' ? 'layer-group' : 'file-code';
3437
3459
 
3460
+ const totalDuration = group.tests.reduce((sum, t) => {
3461
+ const status = t.status.toLowerCase();
3462
+ if (status === 'skipped' || status === 'todo') return sum;
3463
+ return sum + (Number(t.run_time) || 0);
3464
+ }, 0);
3465
+
3438
3466
  const header = document.createElement('div');
3439
3467
  header.className = ['test-group-header', groupStateClass].filter(Boolean).join(' ');
3440
3468
  header.innerHTML = `
@@ -3444,6 +3472,7 @@
3444
3472
  <div class='test-group-count'>${group.tests.length} tests</div>
3445
3473
  </div>
3446
3474
  <div class='test-group-stats'>
3475
+ ${totalDuration > 0 ? `<div class='test-group-stat duration' title='Total duration of tests in this ${group.type}'><i class='fas fa-stopwatch'></i> ${formatCompactDuration(totalDuration)}</div>` : ''}
3447
3476
  ${passedCount > 0 ? `<div class='test-group-stat passed'><i class='fas fa-check-circle'></i> ${passedCount}</div>` : ''}
3448
3477
  ${failedCount > 0 ? `<div class='test-group-stat failed'><i class='fas fa-times-circle'></i> ${failedCount}</div>` : ''}
3449
3478
  ${skippedCount > 0 ? `<div class='test-group-stat skipped'><i class='fas fa-forward'></i> ${skippedCount}</div>` : ''}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "2.17.0-beta.1",
3
+ "version": "2.18.0",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "engines": {
6
- "node": ">=18"
6
+ "node": ">=22"
7
7
  },
8
8
  "main": "lib/reporter.js",
9
9
  "module": "src/reporter.js",
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "@aws-sdk/client-s3": "^3.279.0",
17
17
  "@aws-sdk/lib-storage": "^3.279.0",
18
- "@cucumber/cucumber": "^10.9.0",
18
+ "@cucumber/cucumber": "^13.2.1",
19
19
  "@octokit/rest": "^21.1.1",
20
20
  "callsite-record": "^4.1.4",
21
21
  "commander": "^12",
@@ -42,7 +42,7 @@
42
42
  "pretty-ms": "^7.0.1",
43
43
  "promise-retry": "^2.0.1",
44
44
  "strip-ansi": "7.1.0",
45
- "uuid": "^9.0.0"
45
+ "uuid": "^11.1.1"
46
46
  },
47
47
  "overrides": {
48
48
  "fast-xml-parser": "^5.3.4"
@@ -786,6 +786,10 @@
786
786
  color: #8b5cf6;
787
787
  }
788
788
 
789
+ .test-group-stat.duration {
790
+ color: var(--gray-600);
791
+ }
792
+
789
793
  .test-group-expand {
790
794
  color: var(--gray-500);
791
795
  transition: var(--transition);
@@ -2826,6 +2830,24 @@
2826
2830
  }
2827
2831
  }
2828
2832
 
2833
+ function formatCompactDuration(milliseconds) {
2834
+ if (!milliseconds || milliseconds <= 0) return '0ms';
2835
+
2836
+ const totalSeconds = Math.floor(milliseconds / 1000);
2837
+ if (totalSeconds < 1) return `${Math.round(milliseconds)}ms`;
2838
+
2839
+ const hours = Math.floor(totalSeconds / 3600);
2840
+ const minutes = Math.floor((totalSeconds % 3600) / 60);
2841
+ const seconds = totalSeconds % 60;
2842
+
2843
+ const parts = [];
2844
+ if (hours > 0) parts.push(`${hours}h`);
2845
+ if (hours > 0 || minutes > 0) parts.push(`${minutes}m`);
2846
+ parts.push(`${seconds}s`);
2847
+
2848
+ return parts.join(' ');
2849
+ }
2850
+
2829
2851
  function hasMeaningfulMessage(message) {
2830
2852
  return typeof message === 'string' && message.trim().length > 0 && message !== 'No message available';
2831
2853
  }
@@ -3435,6 +3457,12 @@
3435
3457
 
3436
3458
  const groupIcon = group.type === 'suite' ? 'layer-group' : 'file-code';
3437
3459
 
3460
+ const totalDuration = group.tests.reduce((sum, t) => {
3461
+ const status = t.status.toLowerCase();
3462
+ if (status === 'skipped' || status === 'todo') return sum;
3463
+ return sum + (Number(t.run_time) || 0);
3464
+ }, 0);
3465
+
3438
3466
  const header = document.createElement('div');
3439
3467
  header.className = ['test-group-header', groupStateClass].filter(Boolean).join(' ');
3440
3468
  header.innerHTML = `
@@ -3444,6 +3472,7 @@
3444
3472
  <div class='test-group-count'>${group.tests.length} tests</div>
3445
3473
  </div>
3446
3474
  <div class='test-group-stats'>
3475
+ ${totalDuration > 0 ? `<div class='test-group-stat duration' title='Total duration of tests in this ${group.type}'><i class='fas fa-stopwatch'></i> ${formatCompactDuration(totalDuration)}</div>` : ''}
3447
3476
  ${passedCount > 0 ? `<div class='test-group-stat passed'><i class='fas fa-check-circle'></i> ${passedCount}</div>` : ''}
3448
3477
  ${failedCount > 0 ? `<div class='test-group-stat failed'><i class='fas fa-times-circle'></i> ${failedCount}</div>` : ''}
3449
3478
  ${skippedCount > 0 ? `<div class='test-group-stat skipped'><i class='fas fa-forward'></i> ${skippedCount}</div>` : ''}