odhin-reports-playwright 1.1.5 → 1.1.6

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/generate.js CHANGED
@@ -19,7 +19,7 @@ class Generate {
19
19
  this.TEST_FOLDER = "tests";
20
20
  this.THEME = "light";
21
21
  this.INDEX_FILE = "index.html";
22
- this.CURRENT_VERSION = "1.0.6";
22
+ this.CURRENT_VERSION = "1.1.6";
23
23
  this.execOptions = execOptions;
24
24
  this.totalDuration = 0;
25
25
  this.help = new help_1.default(this.execOptions);
@@ -796,7 +796,7 @@ class Generate {
796
796
  : "");
797
797
  testCaseDetailsHtml = testCaseDetailsHtml.replaceAll("{{.InfoTags}}", testCase.testCase.tags.length > 0
798
798
  ? '<tr><th class="odhin-text-2">Tags</th><td class="text-secondary-emphasis fst-italic">' +
799
- testCase.testCase.tags.toString() +
799
+ testCase.testCase.tags.join(', ').toString() +
800
800
  "</td></tr>"
801
801
  : "");
802
802
  if (testCase.testCase.annotations.length > 0) {
@@ -68,42 +68,47 @@ let options = {
68
68
  let statusInterrupted = "{{.InterruptedStatusChart}}"
69
69
  let statusFlaky = "{{.FlakyStatusChart}}"
70
70
  let ctxStatus = document.getElementById('chart-status').getContext('2d');
71
+ let datasetList = [];
72
+ let colorList = [];
73
+ let labelList = [];
74
+ if(parseInt(statusPassed) > 0) {
75
+ datasetList.push(parseInt(statusPassed));
76
+ colorList.push("#2E7D31");
77
+ labelList.push('Passed ({{.PassedStatusChart}})');
78
+ }
79
+ if(parseInt(statusFailed) > 0) {
80
+ datasetList.push(parseInt(statusFailed));
81
+ colorList.push("#C62828");
82
+ labelList.push('Failed ({{.FailedStatusChart}})');
83
+ }
84
+ if(parseInt(statusTimedOut) > 0) {
85
+ datasetList.push(parseInt(statusTimedOut));
86
+ colorList.push("#fcd12a");
87
+ labelList.push('TimedOut ({{.TimedOutStatusChart}})');
88
+ }
89
+ if(parseInt(statusSkipped) > 0) {
90
+ datasetList.push(parseInt(statusSkipped));
91
+ colorList.push("#ff6f00");
92
+ labelList.push('Skipped ({{.SkippedStatusChart}})');
93
+ }
94
+ if(parseInt(statusInterrupted) > 0) {
95
+ datasetList.push(parseInt(statusInterrupted));
96
+ colorList.push("#01579b");
97
+ labelList.push('Interrupted ({{.InterruptedStatusChart}})');
98
+ }
99
+ if(parseInt(statusFlaky) > 0) {
100
+ datasetList.push(parseInt(statusFlaky));
101
+ colorList.push("#3c0061");
102
+ labelList.push('Flaky ({{.FlakyStatusChart}})');
103
+ }
71
104
  let chartStatus = new Chart(ctxStatus, {
72
105
  type: 'doughnut',
73
106
  data: {
74
- labels: [
75
- 'Passed ({{.PassedStatusChart}})',
76
- 'Failed ({{.FailedStatusChart}})',
77
- 'TimedOut ({{.TimedOutStatusChart}})',
78
- 'Skipped ({{.SkippedStatusChart}})',
79
- 'Interrupted ({{.InterruptedStatusChart}})',
80
- 'Flaky ({{.FlakyStatusChart}})'
81
- ],
107
+ labels: labelList,
82
108
  datasets: [{
83
- data: [
84
- parseInt(statusPassed),
85
- parseInt(statusFailed),
86
- parseInt(statusTimedOut),
87
- parseInt(statusSkipped),
88
- parseInt(statusInterrupted),
89
- parseInt(statusFlaky)
90
- ],
91
- backgroundColor: [
92
- '#2E7D31',
93
- '#C62828',
94
- '#fcd12a',
95
- '#ff6f00',
96
- '#01579b',
97
- '#3c0061'
98
- ],
99
- borderColor: [
100
- '#2E7D31',
101
- '#C62828',
102
- '#fcd12a',
103
- '#ff6f00',
104
- '#01579b',
105
- '#3c0061'
106
- ]
109
+ data: datasetList,
110
+ backgroundColor: colorList,
111
+ borderColor: colorList
107
112
  }]
108
113
  },
109
114
  options: options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "odhin-reports-playwright",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Odhin Reports for Playwright",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",