ortoni-report 2.0.9 → 3.0.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.
- package/LICENSE.md +675 -675
- package/changelog.md +324 -305
- package/dist/{chunk-RHM5OWYN.mjs → chunk-DW4XGLAZ.mjs} +149 -222
- package/dist/cli/cli.d.mts +1 -0
- package/dist/cli/cli.js +480 -583
- package/dist/cli/cli.mjs +53 -84
- package/dist/ortoni-report.d.mts +114 -0
- package/dist/ortoni-report.d.ts +108 -103
- package/dist/ortoni-report.js +793 -842
- package/dist/ortoni-report.mjs +139 -116
- package/dist/style/main.css +80 -93
- package/dist/views/head.hbs +10 -10
- package/dist/views/main.hbs +1116 -599
- package/dist/views/navbar.hbs +34 -35
- package/dist/views/project.hbs +237 -237
- package/dist/views/sidebar.hbs +236 -0
- package/dist/views/summaryCard.hbs +14 -7
- package/dist/views/testIcons.hbs +12 -12
- package/dist/views/testPanel.hbs +44 -44
- package/dist/views/testStatus.hbs +8 -8
- package/dist/views/userInfo.hbs +251 -208
- package/package.json +54 -56
- package/readme.md +210 -178
package/dist/views/userInfo.hbs
CHANGED
|
@@ -1,209 +1,252 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
<div class="
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<div class="column
|
|
35
|
-
<div class="
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
1
|
+
<div class="columns is-multiline">
|
|
2
|
+
<div class="column">
|
|
3
|
+
<div class="box">
|
|
4
|
+
<header class="title is-4">Result</header>
|
|
5
|
+
<div class="field">
|
|
6
|
+
<strong for="Success Rate">Success Rate</strong>
|
|
7
|
+
<p class="is-flex is-align-items-center">
|
|
8
|
+
<span class="icon has-text-success mr-2">
|
|
9
|
+
<i class="fas fa-chart-pie"></i>
|
|
10
|
+
</span>
|
|
11
|
+
<span class="is-size-5 has-text-weight-bold">{{successRate}} %</span>
|
|
12
|
+
</p>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="field">
|
|
15
|
+
<strong for="Last Run">Last Run</strong>
|
|
16
|
+
<p class="is-flex is-align-items-center">
|
|
17
|
+
<span class="icon has-text-info mr-2">
|
|
18
|
+
<i class="fas fa-calendar-alt"></i>
|
|
19
|
+
</span>
|
|
20
|
+
<span class="is-size-5">{{lastRunDate}}</span>
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="field">
|
|
24
|
+
<strong for="Duration">Duration</strong>
|
|
25
|
+
<p class="is-flex is-align-items-center">
|
|
26
|
+
<span class="icon has-text-warning mr-2">
|
|
27
|
+
<i class="fas fa-stopwatch"></i>
|
|
28
|
+
</span>
|
|
29
|
+
<span class="is-size-5">{{totalDuration}}</span>
|
|
30
|
+
</p>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="column">
|
|
35
|
+
<div class="box">
|
|
36
|
+
<header class="title is-4">Suite</header>
|
|
37
|
+
{{#if (or authorName testType)}}
|
|
38
|
+
<div class="content">
|
|
39
|
+
{{#if projectName}}
|
|
40
|
+
<div class="field">
|
|
41
|
+
<strong for="ProjectName">Project Name</strong>
|
|
42
|
+
<p class="is-flex is-align-items-center">
|
|
43
|
+
<span class="icon has-text-info mr-2">
|
|
44
|
+
<i class="fa-solid fa-shield"></i>
|
|
45
|
+
</span>
|
|
46
|
+
<span class="is-size-5">{{projectName}}</span>
|
|
47
|
+
</p>
|
|
48
|
+
</div>
|
|
49
|
+
{{/if}}
|
|
50
|
+
{{#if authorName}}
|
|
51
|
+
<div class="field">
|
|
52
|
+
<strong for="Tester">Tester</strong>
|
|
53
|
+
<p class="is-flex is-align-items-center">
|
|
54
|
+
<span class="icon has-text-info mr-2">
|
|
55
|
+
<i class="fas fa-user-tie"></i>
|
|
56
|
+
</span>
|
|
57
|
+
<span class="is-size-5">{{authorName}}</span>
|
|
58
|
+
</p>
|
|
59
|
+
</div>
|
|
60
|
+
{{/if}}
|
|
61
|
+
{{#if testType}}
|
|
62
|
+
<div class="field">
|
|
63
|
+
<strong for="testType">Test Type</strong>
|
|
64
|
+
<p class="is-flex is-align-items-center">
|
|
65
|
+
<span class="icon has-text-info mr-2">
|
|
66
|
+
<i class="fas fa-code-branch"></i>
|
|
67
|
+
</span>
|
|
68
|
+
<span class="is-size-5">{{testType}}</span>
|
|
69
|
+
</p>
|
|
70
|
+
</div>
|
|
71
|
+
{{/if}}
|
|
72
|
+
</div>
|
|
73
|
+
{{/if}}
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
{{#if meta}}
|
|
77
|
+
<div class="column">
|
|
78
|
+
<div class="box">
|
|
79
|
+
<header class="title is-4">Meta Information</header>
|
|
80
|
+
{{#each meta}}
|
|
81
|
+
<p><strong>{{@key}}:</strong> {{this}}</p>
|
|
82
|
+
{{/each}}
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
{{/if}}
|
|
86
|
+
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<div class="box">
|
|
90
|
+
<div class="columns">
|
|
91
|
+
<div class="column">
|
|
92
|
+
<h2 class="is-4 has-text-weight-bold">Summary</h2>
|
|
93
|
+
<hr class="has-background-primary">
|
|
94
|
+
<div class="chart-container">
|
|
95
|
+
<canvas id="testChart"></canvas>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
<div class="column">
|
|
99
|
+
<h2 class="is-4 has-text-weight-bold">Projects</h2>
|
|
100
|
+
<hr class="has-background-primary">
|
|
101
|
+
<div class="chart-container">
|
|
102
|
+
<canvas id="projectChart"></canvas>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
<div class="column">
|
|
106
|
+
<h2 class="is-4 has-text-weight-bold">Each Projects</h2>
|
|
107
|
+
<hr class="has-background-primary">
|
|
108
|
+
<div class="chart-container has-text-centered">
|
|
109
|
+
<canvas id="projectbarChart"></canvas>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
113
|
+
<script>
|
|
114
|
+
const overallChart = document.getElementById('testChart');
|
|
115
|
+
new Chart(overallChart, {
|
|
116
|
+
type: "doughnut",
|
|
117
|
+
data: {
|
|
118
|
+
labels: ['Passed', 'Failed', 'Skipped', 'Flaky'],
|
|
119
|
+
datasets: [{
|
|
120
|
+
data: [{{ passCount }}, {{ failCount }}, {{ skipCount }}, {{ flakyCount }}],
|
|
121
|
+
backgroundColor: ['#28a745', '#ff6685', '#66d1ff', '#ffb70f']}]
|
|
122
|
+
},
|
|
123
|
+
options: {
|
|
124
|
+
responsive: true,
|
|
125
|
+
maintainAspectRatio: false,
|
|
126
|
+
plugins: {
|
|
127
|
+
legend: {
|
|
128
|
+
position: 'bottom',
|
|
129
|
+
labels: {
|
|
130
|
+
filter: function (legendItem, chartData) {
|
|
131
|
+
const value = chartData.datasets[0].data[legendItem.index];
|
|
132
|
+
return value !== 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
tooltip: {
|
|
137
|
+
callbacks: {
|
|
138
|
+
label: function (tooltipItem) {
|
|
139
|
+
const total = tooltipItem.dataset.data.reduce((a, b) => a + b, 0);
|
|
140
|
+
const value = tooltipItem.raw;
|
|
141
|
+
const percentage = ((value / total) * 100).toFixed(2);
|
|
142
|
+
return `${tooltipItem.label}: ${value} tests (${percentage}%)`;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
const projectChart = document.getElementById('projectChart');
|
|
150
|
+
const projectbarChart = document.getElementById('projectbarChart');
|
|
151
|
+
|
|
152
|
+
const projectNames = {{{ json projectNames }}};
|
|
153
|
+
const totalTests = {{{ json totalTests }}};
|
|
154
|
+
function generateRandomColor() {
|
|
155
|
+
const letters = '0123456789ABCDEF';
|
|
156
|
+
let color = '#';
|
|
157
|
+
for (let i = 0; i < 6; i++) {
|
|
158
|
+
color += letters[Math.floor(Math.random() * 16)];
|
|
159
|
+
}
|
|
160
|
+
return color;
|
|
161
|
+
}
|
|
162
|
+
const backgroundColors = totalTests.map(() => generateRandomColor());
|
|
163
|
+
new Chart(projectChart, {
|
|
164
|
+
type: 'doughnut',
|
|
165
|
+
data: {
|
|
166
|
+
labels: projectNames,
|
|
167
|
+
datasets: [{
|
|
168
|
+
data: totalTests,
|
|
169
|
+
backgroundColor: backgroundColors
|
|
170
|
+
}]
|
|
171
|
+
},
|
|
172
|
+
options: {
|
|
173
|
+
responsive: true,
|
|
174
|
+
maintainAspectRatio: false,
|
|
175
|
+
plugins: {
|
|
176
|
+
legend: {
|
|
177
|
+
position: 'bottom'
|
|
178
|
+
},
|
|
179
|
+
tooltip: {
|
|
180
|
+
callbacks: {
|
|
181
|
+
label: function (tooltipItem) {
|
|
182
|
+
return tooltipItem.label + ': ' + tooltipItem.raw + ' tests';
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
const passedTests = {{ json passedTests }};
|
|
190
|
+
const failedTests = {{ json failedTests }};
|
|
191
|
+
const skippedTests = {{ json skippedTests }};
|
|
192
|
+
const retryTests = {{ json retryTests }};
|
|
193
|
+
new Chart(projectbarChart, {
|
|
194
|
+
type: 'bar',
|
|
195
|
+
data: {
|
|
196
|
+
barPercentage: 1,
|
|
197
|
+
barThickness: 6,
|
|
198
|
+
maxBarThickness: 8,
|
|
199
|
+
minBarLength: 2,
|
|
200
|
+
labels: projectNames,
|
|
201
|
+
datasets: [
|
|
202
|
+
{
|
|
203
|
+
label: 'Passed',
|
|
204
|
+
data: passedTests,
|
|
205
|
+
backgroundColor: '#28a745',
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
label: 'Failed',
|
|
209
|
+
data: failedTests,
|
|
210
|
+
backgroundColor: '#ff6685',
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
label: 'Skipped',
|
|
214
|
+
data: skippedTests,
|
|
215
|
+
backgroundColor: '#66d1ff',
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
label: 'Flaky',
|
|
219
|
+
data: retryTests,
|
|
220
|
+
backgroundColor: '#ffb70f',
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
options: {
|
|
225
|
+
indexAxis: 'y',
|
|
226
|
+
responsive: true,
|
|
227
|
+
maintainAspectRatio: false,
|
|
228
|
+
scales: {
|
|
229
|
+
x: {
|
|
230
|
+
beginAtZero: true,
|
|
231
|
+
ticks: {
|
|
232
|
+
autoSkip: false,
|
|
233
|
+
maxRotation: 45
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
y: {
|
|
237
|
+
beginAtZero: true
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
plugins: {
|
|
241
|
+
legend: {
|
|
242
|
+
display: true,
|
|
243
|
+
position: 'bottom'
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
barPercentage: 0.6,
|
|
247
|
+
categoryPercentage: 0.8,
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
</script>
|
|
251
|
+
</div>
|
|
209
252
|
</div>
|
package/package.json
CHANGED
|
@@ -1,57 +1,55 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ortoni-report",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Playwright Report By LetCode with Koushik",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"tsc": "tsc",
|
|
7
|
-
"build": "tsup",
|
|
8
|
-
"release": "npm publish"
|
|
9
|
-
},
|
|
10
|
-
"bin": {
|
|
11
|
-
"ortoni-report": "./dist/cli/cli.js"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"dist",
|
|
15
|
-
"README.md",
|
|
16
|
-
"CHANGELOG.md"
|
|
17
|
-
],
|
|
18
|
-
"repository": {
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "git+https://github.com/ortoniKC/ortoni-report"
|
|
21
|
-
},
|
|
22
|
-
"keywords": [
|
|
23
|
-
"playwright report",
|
|
24
|
-
"playwright letcode",
|
|
25
|
-
"letcode koushik",
|
|
26
|
-
"ortoni report",
|
|
27
|
-
"ortoni-report",
|
|
28
|
-
"playwright html"
|
|
29
|
-
],
|
|
30
|
-
"author": "Koushik Chatterjee (LetCode with Koushik)",
|
|
31
|
-
"license": "GPL-3.0-only",
|
|
32
|
-
"bugs": {
|
|
33
|
-
"url": "https://github.com/ortoniKC/ortoni-report/issues"
|
|
34
|
-
},
|
|
35
|
-
"homepage": "https://github.com/ortoniKC/ortoni-report#readme",
|
|
36
|
-
"devDependencies": {
|
|
37
|
-
"@playwright/test": "^1.49.0",
|
|
38
|
-
"@types/express": "^5.0.0",
|
|
39
|
-
"@types/node": "^22.0.2",
|
|
40
|
-
"@types/sqlite3": "^3.1.11",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
"module": "dist/ortoni-report.mjs",
|
|
56
|
-
"types": "dist/ortoni-report.d.ts"
|
|
1
|
+
{
|
|
2
|
+
"name": "ortoni-report",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Playwright Report By LetCode with Koushik",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"tsc": "tsc",
|
|
7
|
+
"build": "tsup",
|
|
8
|
+
"release": "npm publish"
|
|
9
|
+
},
|
|
10
|
+
"bin": {
|
|
11
|
+
"ortoni-report": "./dist/cli/cli.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md",
|
|
16
|
+
"CHANGELOG.md"
|
|
17
|
+
],
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/ortoniKC/ortoni-report"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"playwright report",
|
|
24
|
+
"playwright letcode",
|
|
25
|
+
"letcode koushik",
|
|
26
|
+
"ortoni report",
|
|
27
|
+
"ortoni-report",
|
|
28
|
+
"playwright html"
|
|
29
|
+
],
|
|
30
|
+
"author": "Koushik Chatterjee (LetCode with Koushik)",
|
|
31
|
+
"license": "GPL-3.0-only",
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/ortoniKC/ortoni-report/issues"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://github.com/ortoniKC/ortoni-report#readme",
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@playwright/test": "^1.49.0",
|
|
38
|
+
"@types/express": "^5.0.0",
|
|
39
|
+
"@types/node": "^22.0.2",
|
|
40
|
+
"@types/sqlite3": "^3.1.11",
|
|
41
|
+
"ansi-to-html": "^0.7.2",
|
|
42
|
+
"commander": "^12.1.0",
|
|
43
|
+
"express": "^4.21.1",
|
|
44
|
+
"handlebars": "^4.7.8",
|
|
45
|
+
"tsup": "^8.4.0",
|
|
46
|
+
"typescript": "^4.9.4"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"sqlite": "^5.1.1",
|
|
50
|
+
"sqlite3": "^5.1.7"
|
|
51
|
+
},
|
|
52
|
+
"main": "dist/ortoni-report.js",
|
|
53
|
+
"module": "dist/ortoni-report.mjs",
|
|
54
|
+
"types": "dist/ortoni-report.d.ts"
|
|
57
55
|
}
|