@testomatio/reporter 1.2.0 → 1.2.1-beta.codecept-id
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/README.md +45 -51
- package/lib/adapter/codecept.js +1 -14
- package/lib/adapter/cucumber/legacy.js +1 -1
- package/lib/adapter/cucumber.js +2 -2
- package/lib/adapter/jest.js +1 -1
- package/lib/adapter/mocha.js +4 -6
- package/lib/adapter/playwright.js +1 -1
- package/lib/bin/reportXml.js +13 -13
- package/lib/bin/startTest.js +10 -11
- package/lib/constants.js +8 -5
- package/lib/fileUploader.js +29 -33
- package/lib/junit-adapter/adapter.js +0 -2
- package/lib/junit-adapter/csharp.js +3 -4
- package/lib/junit-adapter/index.js +2 -3
- package/lib/junit-adapter/java.js +11 -11
- package/lib/junit-adapter/javascript.js +1 -2
- package/lib/junit-adapter/python.js +12 -14
- package/lib/junit-adapter/ruby.js +1 -2
- package/lib/pipe/csv.js +2 -3
- package/lib/pipe/github.js +4 -3
- package/lib/pipe/gitlab.js +14 -7
- package/lib/pipe/html.js +0 -1
- package/lib/pipe/index.js +1 -1
- package/lib/template/testomatio.hbs +362 -724
- package/lib/utils/pipe_utils.js +70 -77
- package/lib/utils/utils.js +33 -32
- package/package.json +4 -2
|
@@ -1,750 +1,388 @@
|
|
|
1
|
-
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<meta
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
<link
|
|
1
|
+
<html lang='en'>
|
|
2
|
+
<head>
|
|
3
|
+
<meta charset='UTF-8' />
|
|
4
|
+
<meta
|
|
5
|
+
name='viewport'
|
|
6
|
+
content='width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0'
|
|
7
|
+
/>
|
|
8
|
+
<meta http-equiv='X-UA-Compatible' content='ie=edge' />
|
|
9
|
+
<link
|
|
10
|
+
href='https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css'
|
|
11
|
+
rel='stylesheet'
|
|
12
|
+
integrity='sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC'
|
|
13
|
+
crossorigin='anonymous'
|
|
14
|
+
/>
|
|
15
|
+
<link
|
|
16
|
+
rel='stylesheet'
|
|
17
|
+
href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css'
|
|
18
|
+
integrity='sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=='
|
|
19
|
+
crossorigin='anonymous'
|
|
20
|
+
referrerpolicy='no-referrer'
|
|
21
|
+
/>
|
|
10
22
|
{{#if runId}}
|
|
11
|
-
|
|
23
|
+
<title>Report #{{runId}} - Testomat.io</title>
|
|
12
24
|
{{else}}
|
|
13
|
-
|
|
25
|
+
<title>Report Testomat.io</title>
|
|
14
26
|
{{/if}}
|
|
15
27
|
<style>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
display: flex;
|
|
53
|
-
justify-content: space-between;
|
|
54
|
-
align-items: center;
|
|
55
|
-
}
|
|
56
|
-
.header__point{
|
|
57
|
-
width: 8px;
|
|
58
|
-
height: 8px;
|
|
59
|
-
border-radius: 50%;
|
|
60
|
-
margin-right: 15px;
|
|
61
|
-
}
|
|
62
|
-
.header__point_red{
|
|
63
|
-
background: red;
|
|
64
|
-
}
|
|
65
|
-
.header__block{
|
|
66
|
-
display: flex;
|
|
67
|
-
align-items: center;
|
|
68
|
-
}
|
|
69
|
-
.header__case{
|
|
70
|
-
display: flex;
|
|
71
|
-
align-items: center;
|
|
72
|
-
margin-right: 15px;
|
|
73
|
-
}
|
|
74
|
-
.header__case p{
|
|
75
|
-
margin-right: 7px;
|
|
76
|
-
}
|
|
77
|
-
.header__case span{
|
|
78
|
-
color: black;
|
|
79
|
-
}
|
|
80
|
-
.header__block button{
|
|
81
|
-
margin-left: 15px;
|
|
82
|
-
}
|
|
83
|
-
.header__type{
|
|
84
|
-
background: #0d6efd;
|
|
85
|
-
color: #FFF;
|
|
86
|
-
border-radius: 10px;
|
|
87
|
-
padding: 1px 5px;
|
|
88
|
-
margin-right: 15px;
|
|
89
|
-
}
|
|
90
|
-
.header__case i{
|
|
91
|
-
color: grey;
|
|
92
|
-
margin-right: 5px;
|
|
93
|
-
}
|
|
94
|
-
.title{
|
|
95
|
-
display: flex;
|
|
96
|
-
margin-bottom: 20px;
|
|
97
|
-
}
|
|
98
|
-
.title p{
|
|
99
|
-
color: black;
|
|
100
|
-
font-size: 20px;
|
|
101
|
-
margin-right: 5px;
|
|
102
|
-
}
|
|
103
|
-
.statright{
|
|
104
|
-
display: flex;
|
|
105
|
-
}
|
|
106
|
-
.statdesc{
|
|
107
|
-
display: flex;
|
|
108
|
-
flex-direction: column;
|
|
109
|
-
}
|
|
110
|
-
.statdesc__row{
|
|
111
|
-
padding: 15px 10px;
|
|
112
|
-
display: flex;
|
|
113
|
-
}
|
|
114
|
-
.statdesc__row_first{
|
|
115
|
-
width: 150px;
|
|
116
|
-
}
|
|
117
|
-
.statdesc__row:nth-child(odd){
|
|
118
|
-
background: #F4F5FF;
|
|
119
|
-
}
|
|
120
|
-
.statdesc__row p{
|
|
121
|
-
font-weight: bold;
|
|
122
|
-
}
|
|
123
|
-
.statdesc{
|
|
124
|
-
width: 100%;
|
|
125
|
-
}
|
|
126
|
-
.statstatus{
|
|
127
|
-
display: flex;
|
|
128
|
-
align-items: center;
|
|
129
|
-
}
|
|
130
|
-
.statstatus p{
|
|
131
|
-
font-weight: bold;
|
|
132
|
-
}
|
|
133
|
-
.statstatus div{
|
|
134
|
-
font-weight: bold;
|
|
135
|
-
}
|
|
136
|
-
.statstatus_failed div{
|
|
137
|
-
width: 10px;
|
|
138
|
-
height: 10px;
|
|
139
|
-
border-radius: 50%;
|
|
140
|
-
margin-right: 5px;
|
|
141
|
-
}
|
|
142
|
-
.statstatus_failed p{
|
|
143
|
-
color: red;
|
|
144
|
-
text-transform: uppercase;
|
|
145
|
-
}
|
|
146
|
-
.statstatus_failed div{
|
|
147
|
-
background: red;
|
|
148
|
-
}
|
|
149
|
-
.statstatus_passed div{
|
|
150
|
-
width: 10px;
|
|
151
|
-
height: 10px;
|
|
152
|
-
border-radius: 50%;
|
|
153
|
-
margin-right: 5px;
|
|
154
|
-
text-transform: uppercase;
|
|
155
|
-
}
|
|
156
|
-
.statstatus_passed div {
|
|
157
|
-
background: green;
|
|
158
|
-
}
|
|
159
|
-
.statstatus_passed p {
|
|
160
|
-
color: green;
|
|
161
|
-
text-transform: uppercase;
|
|
162
|
-
}
|
|
163
|
-
.statstatus_skipped div{
|
|
164
|
-
width: 10px;
|
|
165
|
-
height: 10px;
|
|
166
|
-
border-radius: 50%;
|
|
167
|
-
margin-right: 5px;
|
|
168
|
-
text-transform: uppercase;
|
|
169
|
-
}
|
|
170
|
-
.statstatus_skipped div {
|
|
171
|
-
background: yellow;
|
|
172
|
-
}
|
|
173
|
-
.statstatus_skipped p {
|
|
174
|
-
color: yellow;
|
|
175
|
-
text-transform: uppercase;
|
|
176
|
-
}
|
|
177
|
-
.fa-magnifying-glass{
|
|
178
|
-
font-size: 24px;
|
|
179
|
-
color: gray;
|
|
180
|
-
}
|
|
181
|
-
.level_5{
|
|
182
|
-
margin-top: 20px;
|
|
183
|
-
}
|
|
184
|
-
.numTest{
|
|
185
|
-
font-weight: 700;
|
|
186
|
-
font-size: 16px;
|
|
187
|
-
color:#0d6efd;
|
|
188
|
-
}
|
|
189
|
-
.testitem{
|
|
190
|
-
border: 1px solid grey;
|
|
191
|
-
border-radius: 10px;
|
|
192
|
-
margin-bottom: 15px;
|
|
193
|
-
}
|
|
194
|
-
.testitem__top{
|
|
195
|
-
width: 100%;
|
|
196
|
-
display: flex;
|
|
197
|
-
background: #e9ecef;
|
|
198
|
-
padding: 3px 0;
|
|
199
|
-
border-radius:10px;
|
|
200
|
-
cursor: pointer;
|
|
201
|
-
}
|
|
202
|
-
.testitem__icon{
|
|
203
|
-
display: flex;
|
|
204
|
-
align-items: center;
|
|
205
|
-
justify-content: center;
|
|
206
|
-
width: 30px;
|
|
207
|
-
margin-right: 15px;
|
|
208
|
-
}
|
|
209
|
-
.testitem__ico{
|
|
210
|
-
font-size: 18px;
|
|
211
|
-
}
|
|
212
|
-
.testitem__name{
|
|
213
|
-
font-weight: 700;
|
|
214
|
-
color: black;
|
|
215
|
-
font-size: 16px;
|
|
216
|
-
}
|
|
217
|
-
.testitem__body{
|
|
218
|
-
display: flex;
|
|
219
|
-
border-top: 1px solid grey;
|
|
220
|
-
}
|
|
221
|
-
.testitem__menu{
|
|
222
|
-
display: flex;
|
|
223
|
-
flex-direction: column;
|
|
224
|
-
border-right: 1px solid grey;
|
|
225
|
-
padding: 15px;
|
|
226
|
-
}
|
|
227
|
-
.testitem__mitem{
|
|
228
|
-
margin-bottom: 10px;
|
|
229
|
-
font-size: 14px;
|
|
230
|
-
cursor: pointer;
|
|
231
|
-
color: grey;
|
|
232
|
-
}
|
|
233
|
-
.testitem__mitem_active{
|
|
234
|
-
color: green;
|
|
235
|
-
}
|
|
236
|
-
.testitem__case{
|
|
237
|
-
display: flex;
|
|
238
|
-
flex-direction: column;
|
|
239
|
-
padding: 10px;
|
|
240
|
-
}
|
|
241
|
-
.testitem__title{
|
|
242
|
-
font-size: 18px;
|
|
243
|
-
color: black;
|
|
244
|
-
font-weight: 700;
|
|
245
|
-
margin-bottom: 15px;
|
|
246
|
-
text-decoration: underline;
|
|
247
|
-
}
|
|
248
|
-
.testitem__block p{
|
|
249
|
-
font-size: 14px;
|
|
250
|
-
white-space: pre-line;
|
|
251
|
-
}
|
|
252
|
-
.test__empty__list {
|
|
253
|
-
margin-bottom: 10px;
|
|
254
|
-
color: grey;
|
|
255
|
-
}
|
|
256
|
-
/* Passed TAB*/
|
|
257
|
-
#passedTest:not(:checked) + .btn-outline-dark {
|
|
258
|
-
background-color: #39BD2F;
|
|
259
|
-
}
|
|
260
|
-
#passedTest:checked + .btn-outline-dark {
|
|
261
|
-
background-color: #68cf61;
|
|
262
|
-
color: white;
|
|
263
|
-
}
|
|
264
|
-
/* Failed TAB*/
|
|
265
|
-
#failedTest:not(:checked) + .btn-outline-dark {
|
|
266
|
-
background-color: #F2230C;
|
|
267
|
-
}
|
|
268
|
-
#failedTest:checked + .btn-outline-dark {
|
|
269
|
-
background-color: #FA6E5E;
|
|
270
|
-
color: white;
|
|
271
|
-
}
|
|
272
|
-
/* Skipped TAB*/
|
|
273
|
-
#skippedTest:not(:checked) + .btn-outline-dark {
|
|
274
|
-
background-color: #F2C00C;
|
|
275
|
-
}
|
|
276
|
-
#skippedTest:checked + .btn-outline-dark {
|
|
277
|
-
background-color: #dfc155;
|
|
278
|
-
}
|
|
28
|
+
body { padding: 0; margin: 0; } header, div, p, form, input, a, span, button { box-sizing: border-box; } img {
|
|
29
|
+
width: 100%; display: block; max-width: 100%; height: auto; } p, span{ font-weight: 400; font-size: 14px; color:
|
|
30
|
+
grey; margin: 0; } .report{ padding-top: 15px; } .level_1{ margin-bottom: 20px; border-bottom: 1px solid grey;
|
|
31
|
+
padding-bottom: 10px; } .header{ display: flex; justify-content: space-between; align-items: center; }
|
|
32
|
+
.header__point{ width: 8px; height: 8px; border-radius: 50%; margin-right: 15px; } .header__point_red{ background:
|
|
33
|
+
red; } .header__block{ display: flex; align-items: center; } .header__case{ display: flex; align-items: center;
|
|
34
|
+
margin-right: 15px; } .header__case p{ margin-right: 7px; } .header__case span{ color: black; } .header__block
|
|
35
|
+
button{ margin-left: 15px; } .header__type{ background: #0d6efd; color: #FFF; border-radius: 10px; padding: 1px
|
|
36
|
+
5px; margin-right: 15px; } .header__case i{ color: grey; margin-right: 5px; } .title{ display: flex;
|
|
37
|
+
margin-bottom: 20px; } .title p{ color: black; font-size: 20px; margin-right: 5px; } .statright{ display: flex; }
|
|
38
|
+
.statdesc{ display: flex; flex-direction: column; } .statdesc__row{ padding: 15px 10px; display: flex; }
|
|
39
|
+
.statdesc__row_first{ width: 150px; } .statdesc__row:nth-child(odd){ background: #F4F5FF; } .statdesc__row p{
|
|
40
|
+
font-weight: bold; } .statdesc{ width: 100%; } .statstatus{ display: flex; align-items: center; } .statstatus p{
|
|
41
|
+
font-weight: bold; } .statstatus div{ font-weight: bold; } .statstatus_failed div{ width: 10px; height: 10px;
|
|
42
|
+
border-radius: 50%; margin-right: 5px; } .statstatus_failed p{ color: red; text-transform: uppercase; }
|
|
43
|
+
.statstatus_failed div{ background: red; } .statstatus_passed div{ width: 10px; height: 10px; border-radius: 50%;
|
|
44
|
+
margin-right: 5px; text-transform: uppercase; } .statstatus_passed div { background: green; } .statstatus_passed p
|
|
45
|
+
{ color: green; text-transform: uppercase; } .statstatus_skipped div{ width: 10px; height: 10px; border-radius:
|
|
46
|
+
50%; margin-right: 5px; text-transform: uppercase; } .statstatus_skipped div { background: yellow; }
|
|
47
|
+
.statstatus_skipped p { color: yellow; text-transform: uppercase; } .fa-magnifying-glass{ font-size: 24px; color:
|
|
48
|
+
gray; } .level_5{ margin-top: 20px; } .numTest{ font-weight: 700; font-size: 16px; color:#0d6efd; } .testitem{
|
|
49
|
+
border: 1px solid grey; border-radius: 10px; margin-bottom: 15px; } .testitem__top{ width: 100%; display: flex;
|
|
50
|
+
background: #e9ecef; padding: 3px 0; border-radius:10px; cursor: pointer; } .testitem__icon{ display: flex;
|
|
51
|
+
align-items: center; justify-content: center; width: 30px; margin-right: 15px; } .testitem__ico{ font-size: 18px;
|
|
52
|
+
} .testitem__name{ font-weight: 700; color: black; font-size: 16px; } .testitem__body{ display: flex; border-top:
|
|
53
|
+
1px solid grey; } .testitem__menu{ display: flex; flex-direction: column; border-right: 1px solid grey; padding:
|
|
54
|
+
15px; } .testitem__mitem{ margin-bottom: 10px; font-size: 14px; cursor: pointer; color: grey; }
|
|
55
|
+
.testitem__mitem_active{ color: green; } .testitem__case{ display: flex; flex-direction: column; padding: 10px; }
|
|
56
|
+
.testitem__title{ font-size: 18px; color: black; font-weight: 700; margin-bottom: 15px; text-decoration:
|
|
57
|
+
underline; } .testitem__block p{ font-size: 14px; white-space: pre-line; } .test__empty__list { margin-bottom:
|
|
58
|
+
10px; color: grey; } /* Passed TAB*/ #passedTest:not(:checked) + .btn-outline-dark { background-color: #39BD2F; }
|
|
59
|
+
#passedTest:checked + .btn-outline-dark { background-color: #68cf61; color: white; } /* Failed TAB*/
|
|
60
|
+
#failedTest:not(:checked) + .btn-outline-dark { background-color: #F2230C; } #failedTest:checked +
|
|
61
|
+
.btn-outline-dark { background-color: #FA6E5E; color: white; } /* Skipped TAB*/ #skippedTest:not(:checked) +
|
|
62
|
+
.btn-outline-dark { background-color: #F2C00C; } #skippedTest:checked + .btn-outline-dark { background-color:
|
|
63
|
+
#dfc155; }
|
|
279
64
|
</style>
|
|
280
|
-
</head>
|
|
281
|
-
|
|
282
|
-
<body class=
|
|
283
|
-
<section class=
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
</div>
|
|
313
|
-
</div>
|
|
65
|
+
</head>
|
|
66
|
+
|
|
67
|
+
<body class='bg-gray-50 pt-6 px-4 lg:pt-4 lg:px-40 h-full;'>
|
|
68
|
+
<section class='report' id='report'>
|
|
69
|
+
<div class='container'>
|
|
70
|
+
<!-- top -->
|
|
71
|
+
<div class='row level_1'>
|
|
72
|
+
<div class='col-12'>
|
|
73
|
+
<div class='header'>
|
|
74
|
+
<div class='header__block'>
|
|
75
|
+
{{#if runId}}
|
|
76
|
+
<div class='header__case'>
|
|
77
|
+
<p>Run</p>
|
|
78
|
+
<span><strong>#</strong>{{runId}}</span>
|
|
79
|
+
</div>
|
|
80
|
+
{{/if}}
|
|
81
|
+
<p class='header__type'>
|
|
82
|
+
<i class='fa-solid fa-face-smile'></i>
|
|
83
|
+
automated job
|
|
84
|
+
</p>
|
|
85
|
+
</div>
|
|
86
|
+
<div class='header__block'>
|
|
87
|
+
{{#if runUrl}}
|
|
88
|
+
<a href='{{runUrl}}' target='_blank' class='btn btn-primary'>
|
|
89
|
+
Full Report
|
|
90
|
+
</a>
|
|
91
|
+
{{else}}
|
|
92
|
+
<button class='btn btn-primary' disabled>
|
|
93
|
+
Full Report
|
|
94
|
+
</button>
|
|
95
|
+
{{/if}}
|
|
96
|
+
</div>
|
|
314
97
|
</div>
|
|
315
|
-
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
<!-- top -->
|
|
316
101
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
</div>
|
|
322
|
-
</div>
|
|
102
|
+
<div class='row level_2'>
|
|
103
|
+
<div class='col-12'>
|
|
104
|
+
<div class='title'>
|
|
105
|
+
<p>Testomatio Run Information</p>
|
|
323
106
|
</div>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
324
109
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
110
|
+
<!-- Schedule and information -->
|
|
111
|
+
<div class='row level_3'>
|
|
112
|
+
<div class='col-6'>
|
|
113
|
+
<div class='statleft'>
|
|
114
|
+
<div id='graff'></div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
<div class='col-6'>
|
|
118
|
+
<div class='statright'>
|
|
119
|
+
<div class='statdesc'>
|
|
120
|
+
<!-- 1 -->
|
|
121
|
+
<div class='statdesc__row'>
|
|
122
|
+
<div class='statdesc__row_first'>
|
|
123
|
+
<p>Status</p>
|
|
124
|
+
</div>
|
|
125
|
+
<div class='statstatus statstatus_{{status}}'>
|
|
126
|
+
<div></div>
|
|
127
|
+
<p>{{status}}</p>
|
|
128
|
+
</div>
|
|
331
129
|
</div>
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
</div>
|
|
340
|
-
<div class="statstatus statstatus_{{status}}">
|
|
341
|
-
<div></div>
|
|
342
|
-
<p>{{status}}</p>
|
|
343
|
-
</div>
|
|
344
|
-
</div>
|
|
345
|
-
<!-- 1 -->
|
|
346
|
-
<!-- 1 -->
|
|
347
|
-
<div class="statdesc__row">
|
|
348
|
-
<div class="statdesc__row_first">
|
|
349
|
-
<p>Execution Duration</p>
|
|
350
|
-
</div>
|
|
351
|
-
<span>{{executionTime}}</span>
|
|
352
|
-
</div>
|
|
353
|
-
<!-- 1 -->
|
|
354
|
-
<!-- 1 -->
|
|
355
|
-
<div class="statdesc__row">
|
|
356
|
-
<div class="statdesc__row_first">
|
|
357
|
-
<p>Tests</p>
|
|
358
|
-
</div>
|
|
359
|
-
<span>{{tests.length}}</span>
|
|
360
|
-
</div>
|
|
361
|
-
<!-- 1 -->
|
|
362
|
-
<!-- 1 -->
|
|
363
|
-
<div class="statdesc__row">
|
|
364
|
-
<div class="statdesc__row_first">
|
|
365
|
-
<p>Start Execution Date</p>
|
|
366
|
-
</div>
|
|
367
|
-
<span>{{executionDate}}</span>
|
|
368
|
-
</div>
|
|
369
|
-
<!-- 1 -->
|
|
370
|
-
</div>
|
|
371
|
-
</div>
|
|
130
|
+
<!-- 1 -->
|
|
131
|
+
<!-- 1 -->
|
|
132
|
+
<div class='statdesc__row'>
|
|
133
|
+
<div class='statdesc__row_first'>
|
|
134
|
+
<p>Execution Duration</p>
|
|
135
|
+
</div>
|
|
136
|
+
<span>{{executionTime}}</span>
|
|
372
137
|
</div>
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
<
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
<i class="fa-solid fa-magnifying-glass"></i>
|
|
381
|
-
</span>
|
|
382
|
-
</div>
|
|
383
|
-
<input type="text" class="form-control inputSearch" placeholder="Search" aria-label="Search" aria-describedby="basic-addon1">
|
|
384
|
-
</div>
|
|
138
|
+
<!-- 1 -->
|
|
139
|
+
<!-- 1 -->
|
|
140
|
+
<div class='statdesc__row'>
|
|
141
|
+
<div class='statdesc__row_first'>
|
|
142
|
+
<p>Tests</p>
|
|
143
|
+
</div>
|
|
144
|
+
<span>{{tests.length}}</span>
|
|
385
145
|
</div>
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
<input type="radio" class="btn-check" name="groupTest" id="passedTest" autocomplete="off" category="passed">
|
|
394
|
-
<label class="btn btn-outline-dark" for="passedTest">Passed <span class="numTest" name="numTest" lcategory="passed">0</span></label>
|
|
395
|
-
|
|
396
|
-
<input type="radio" class="btn-check" name="groupTest" id="failedTest" autocomplete="off" category="failed">
|
|
397
|
-
<label class="btn btn-outline-dark" for="failedTest">Failed <span class="numTest" name="numTest" lcategory="failed">0</span></label>
|
|
398
|
-
|
|
399
|
-
<input type="radio" class="btn-check" name="groupTest" id="skippedTest" autocomplete="off" category="skipped">
|
|
400
|
-
<label class="btn btn-outline-dark" for="skippedTest" >Skipped <span class="numTest" name="numTest" lcategory="skipped">0</span></label>
|
|
401
|
-
|
|
402
|
-
</div>
|
|
146
|
+
<!-- 1 -->
|
|
147
|
+
<!-- 1 -->
|
|
148
|
+
<div class='statdesc__row'>
|
|
149
|
+
<div class='statdesc__row_first'>
|
|
150
|
+
<p>Start Execution Date</p>
|
|
151
|
+
</div>
|
|
152
|
+
<span>{{executionDate}}</span>
|
|
403
153
|
</div>
|
|
154
|
+
<!-- 1 -->
|
|
155
|
+
</div>
|
|
404
156
|
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
<!-- Schedule and information -->
|
|
160
|
+
<div class='row level_4'>
|
|
161
|
+
<div class='col-6'>
|
|
162
|
+
<div class='input-group'>
|
|
163
|
+
<div class='input-group-prepend'>
|
|
164
|
+
<span class='input-group-text' id='basic-addon1'>
|
|
165
|
+
<i class='fa-solid fa-magnifying-glass'></i>
|
|
166
|
+
</span>
|
|
167
|
+
</div>
|
|
168
|
+
<input
|
|
169
|
+
type='text'
|
|
170
|
+
class='form-control inputSearch'
|
|
171
|
+
placeholder='Search'
|
|
172
|
+
aria-label='Search'
|
|
173
|
+
aria-describedby='basic-addon1'
|
|
174
|
+
/>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
<div class='col-6 d-flex justify-content-end'>
|
|
179
|
+
<div class='btn-group menuTests' role='group' aria-label='Basic radio toggle button group'>
|
|
180
|
+
|
|
181
|
+
<input
|
|
182
|
+
type='radio'
|
|
183
|
+
class='btn-check'
|
|
184
|
+
name='groupTest'
|
|
185
|
+
id='allTest'
|
|
186
|
+
autocomplete='off'
|
|
187
|
+
category='all'
|
|
188
|
+
checked
|
|
189
|
+
/>
|
|
190
|
+
<label class='btn btn-outline-dark' for='allTest'>All
|
|
191
|
+
<span class='numTest' name='numTest' lcategory='all'>0</span></label>
|
|
192
|
+
|
|
193
|
+
<input
|
|
194
|
+
type='radio'
|
|
195
|
+
class='btn-check'
|
|
196
|
+
name='groupTest'
|
|
197
|
+
id='passedTest'
|
|
198
|
+
autocomplete='off'
|
|
199
|
+
category='passed'
|
|
200
|
+
/>
|
|
201
|
+
<label class='btn btn-outline-dark' for='passedTest'>Passed
|
|
202
|
+
<span class='numTest' name='numTest' lcategory='passed'>0</span></label>
|
|
203
|
+
|
|
204
|
+
<input
|
|
205
|
+
type='radio'
|
|
206
|
+
class='btn-check'
|
|
207
|
+
name='groupTest'
|
|
208
|
+
id='failedTest'
|
|
209
|
+
autocomplete='off'
|
|
210
|
+
category='failed'
|
|
211
|
+
/>
|
|
212
|
+
<label class='btn btn-outline-dark' for='failedTest'>Failed
|
|
213
|
+
<span class='numTest' name='numTest' lcategory='failed'>0</span></label>
|
|
214
|
+
|
|
215
|
+
<input
|
|
216
|
+
type='radio'
|
|
217
|
+
class='btn-check'
|
|
218
|
+
name='groupTest'
|
|
219
|
+
id='skippedTest'
|
|
220
|
+
autocomplete='off'
|
|
221
|
+
category='skipped'
|
|
222
|
+
/>
|
|
223
|
+
<label class='btn btn-outline-dark' for='skippedTest'>Skipped
|
|
224
|
+
<span class='numTest' name='numTest' lcategory='skipped'>0</span></label>
|
|
405
225
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
<div class="testWrapp">
|
|
410
|
-
{{#each tests}}
|
|
411
|
-
|
|
412
|
-
<div class="testitem d-none" name="testitem" type="dummy" category="false">
|
|
413
|
-
|
|
414
|
-
<div class="testitem__top">
|
|
415
|
-
<div class="testitem__icon">
|
|
416
|
-
<i class="fa-solid fa-chevron-right testitem__ico testitem__ico_right"></i>
|
|
417
|
-
<i class="fa-solid fa-chevron-down d-none testitem__ico testitem__ico_down"></i>
|
|
418
|
-
</div>
|
|
419
|
-
<p class="testitem__name">Test</p>
|
|
420
|
-
</div>
|
|
421
|
-
|
|
422
|
-
<div class="testitem__body d-none">
|
|
423
|
-
|
|
424
|
-
<div class="testitem__menu">
|
|
425
|
-
<span type="steps" class="testitem__mitem testitem__mitem_active">Steps <i class="fa-solid fa-arrow-right"></i></span>
|
|
426
|
-
<span type="status" class="testitem__mitem">Status <i class="fa-solid fa-arrow-right"></i></span>
|
|
427
|
-
<span type="message" class="testitem__mitem">Message <i class="fa-solid fa-arrow-right"></i></span>
|
|
428
|
-
<span type="files" class="testitem__mitem">Files <i class="fa-solid fa-arrow-right"></i></span>
|
|
429
|
-
</div>
|
|
430
|
-
|
|
431
|
-
<div class="testitem__content">
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
432
229
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
</div>
|
|
439
|
-
</div>
|
|
440
|
-
<!-- 1 -->
|
|
230
|
+
<div class='row level_5'>
|
|
231
|
+
<div class='col-12'>
|
|
232
|
+
{{#if tests.length}}
|
|
233
|
+
<div class='testWrapp'>
|
|
234
|
+
{{#each tests}}
|
|
441
235
|
|
|
442
|
-
|
|
443
|
-
<div class="testitem__case d-none" type="status">
|
|
444
|
-
<p class="testitem__title">Status</p>
|
|
445
|
-
<div class="testitem__block">
|
|
446
|
-
<span>...</span>
|
|
447
|
-
</div>
|
|
448
|
-
</div>
|
|
449
|
-
<!-- 2 -->
|
|
236
|
+
<div class='testitem d-none' name='testitem' type='dummy' category='false'>
|
|
450
237
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
<!-- 3 -->
|
|
238
|
+
<div class='testitem__top'>
|
|
239
|
+
<div class='testitem__icon'>
|
|
240
|
+
<i class='fa-solid fa-chevron-right testitem__ico testitem__ico_right'></i>
|
|
241
|
+
<i class='fa-solid fa-chevron-down d-none testitem__ico testitem__ico_down'></i>
|
|
242
|
+
</div>
|
|
243
|
+
<p class='testitem__name'>Test</p>
|
|
244
|
+
</div>
|
|
459
245
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
246
|
+
<div class='testitem__body d-none'>
|
|
247
|
+
|
|
248
|
+
<div class='testitem__menu'>
|
|
249
|
+
<span type='steps' class='testitem__mitem testitem__mitem_active'>Steps
|
|
250
|
+
<i class='fa-solid fa-arrow-right'></i></span>
|
|
251
|
+
<span type='status' class='testitem__mitem'>Status
|
|
252
|
+
<i class='fa-solid fa-arrow-right'></i></span>
|
|
253
|
+
<span type='message' class='testitem__mitem'>Message
|
|
254
|
+
<i class='fa-solid fa-arrow-right'></i></span>
|
|
255
|
+
<span type='files' class='testitem__mitem'>Files <i class='fa-solid fa-arrow-right'></i></span>
|
|
256
|
+
</div>
|
|
257
|
+
|
|
258
|
+
<div class='testitem__content'>
|
|
259
|
+
|
|
260
|
+
<!-- 1 -->
|
|
261
|
+
<div class='testitem__case' type='steps'>
|
|
262
|
+
<p class='testitem__title'>Steps</p>
|
|
263
|
+
<div class='testitem__block'>
|
|
264
|
+
<span>...</span>
|
|
265
|
+
</div>
|
|
266
|
+
</div>
|
|
267
|
+
<!-- 1 -->
|
|
268
|
+
|
|
269
|
+
<!-- 2 -->
|
|
270
|
+
<div class='testitem__case d-none' type='status'>
|
|
271
|
+
<p class='testitem__title'>Status</p>
|
|
272
|
+
<div class='testitem__block'>
|
|
273
|
+
<span>...</span>
|
|
274
|
+
</div>
|
|
478
275
|
</div>
|
|
479
|
-
|
|
276
|
+
<!-- 2 -->
|
|
277
|
+
|
|
278
|
+
<!-- 3 -->
|
|
279
|
+
<div class='testitem__case d-none' type='message'>
|
|
280
|
+
<p class='testitem__title'>Message</p>
|
|
281
|
+
<div class='testitem__block'>
|
|
282
|
+
<span>...</span>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
<!-- 3 -->
|
|
286
|
+
|
|
287
|
+
<!-- 4 -->
|
|
288
|
+
<div class='testitem__case d-none' type='files'>
|
|
289
|
+
<p class='testitem__title'>Files</p>
|
|
290
|
+
<div class='testitem__block'>
|
|
291
|
+
<span>...</span>
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
<!-- 4 -->
|
|
295
|
+
</div>
|
|
296
|
+
</div>
|
|
297
|
+
</div>
|
|
298
|
+
{{/each}}
|
|
299
|
+
</div>
|
|
300
|
+
{{else}}
|
|
301
|
+
<div class='row'>
|
|
302
|
+
<div class='col-12 test__empty__list'>
|
|
303
|
+
<p>No tests found to display 😔</p>
|
|
480
304
|
</div>
|
|
481
|
-
|
|
482
|
-
|
|
305
|
+
</div>
|
|
306
|
+
{{/if}}
|
|
307
|
+
</div>
|
|
483
308
|
</div>
|
|
484
|
-
</section>
|
|
485
|
-
|
|
486
|
-
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
|
487
|
-
<script type="text/javascript">
|
|
488
|
-
// Load google charts
|
|
489
|
-
google.charts.load('current', {'packages':['corechart']});
|
|
490
|
-
google.charts.setOnLoadCallback(drawChart);
|
|
491
|
-
|
|
492
|
-
// Draw the chart and set the chart values
|
|
493
|
-
function drawChart() {
|
|
494
|
-
let data = {};
|
|
495
|
-
const passedTests = {{getTestsByStatus tests "PASSED"}};
|
|
496
|
-
const failedTests = {{getTestsByStatus tests "FAILED"}};
|
|
497
|
-
const skippedTests = {{getTestsByStatus tests "SKIPPED"}};
|
|
498
|
-
|
|
499
|
-
if (passedTests === 0 && failedTests === 0 && skippedTests === 0) {
|
|
500
|
-
data = google.visualization.arrayToDataTable([
|
|
501
|
-
['Task', 'Tests'],
|
|
502
|
-
['No Tests', 1]
|
|
503
|
-
])
|
|
504
|
-
}
|
|
505
|
-
else {
|
|
506
|
-
data = google.visualization.arrayToDataTable([
|
|
507
|
-
['Task', 'Tests'],
|
|
508
|
-
['No Tests', 0],
|
|
509
|
-
['Passed', passedTests],
|
|
510
|
-
['Failed', failedTests],
|
|
511
|
-
['Skipped', skippedTests],
|
|
512
|
-
]);
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
// Optional: add a title and set the width and height of the chart
|
|
516
|
-
const options = {
|
|
517
|
-
'title':'',
|
|
518
|
-
'width':550,
|
|
519
|
-
'height':300,
|
|
520
|
-
'colors': ['#939992', '#39BD2F', '#F2230C', '#F2C00C']
|
|
521
|
-
};
|
|
522
|
-
|
|
523
|
-
// Display the chart inside the <div> element with id="piechart"
|
|
524
|
-
const chart = new google.visualization.PieChart(document.getElementById('graff'));
|
|
525
|
-
chart.draw(data, options);
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
// processing and adding test data to the template
|
|
529
|
-
function addOneTest(category,testData = {}){
|
|
530
|
-
const { suite_title, title, steps, message, files } = testData;
|
|
531
|
-
// radio btn test's count
|
|
532
|
-
function incrementCount(element) {
|
|
533
|
-
let count = parseInt(element.textContent);
|
|
534
|
-
count++;
|
|
535
|
-
element.textContent = count;
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
function addCountToRadio(page,category){
|
|
539
|
-
const menuTests = page.querySelector('.menuTests');
|
|
540
|
-
const all = menuTests.querySelector('span[name="numTest"][lcategory="all"]');
|
|
541
|
-
|
|
542
|
-
incrementCount(all);
|
|
543
309
|
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
if (elemCat) {
|
|
547
|
-
incrementCount(elemCat);
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
// collapse - expand block
|
|
551
|
-
function collapse_expand(top){
|
|
552
|
-
const block = top.closest('.testitem');
|
|
553
|
-
const icon = top.querySelector('.testitem__icon');
|
|
554
|
-
const testitem__ico_right = icon.querySelector('.testitem__ico_right');
|
|
555
|
-
const testitem__ico_down = icon.querySelector('.testitem__ico_down');
|
|
556
|
-
const body = block.querySelector('.testitem__body');
|
|
557
|
-
|
|
558
|
-
if(body.classList.contains('d-none')){
|
|
559
|
-
body.classList.remove('d-none');
|
|
560
|
-
testitem__ico_right.classList.add('d-none');
|
|
561
|
-
testitem__ico_down.classList.remove('d-none');
|
|
562
|
-
}
|
|
563
|
-
else{
|
|
564
|
-
body.classList.add('d-none');
|
|
565
|
-
testitem__ico_down.classList.add('d-none');
|
|
566
|
-
testitem__ico_right.classList.remove('d-none');
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
function menu(clone){
|
|
571
|
-
|
|
572
|
-
function removeAddActive(elem){
|
|
573
|
-
const menu = elem.closest('.testitem__menu');
|
|
574
|
-
const item = menu.querySelectorAll('.testitem__mitem');
|
|
575
|
-
|
|
576
|
-
for(let i=0; i<item.length; i++){
|
|
577
|
-
item[i].classList.remove('testitem__mitem_active');
|
|
578
|
-
}
|
|
579
|
-
elem.classList.add('testitem__mitem_active');
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
function show_content(elem){
|
|
583
|
-
removeAddActive(elem);
|
|
584
|
-
|
|
585
|
-
const body = elem.closest('.testitem__body');
|
|
586
|
-
const content = body.querySelector('.testitem__content');
|
|
587
|
-
const blocks = content.querySelectorAll('.testitem__case');
|
|
588
|
-
|
|
589
|
-
for(let i=0; i<blocks.length; i++){
|
|
590
|
-
blocks[i].classList.add('d-none');
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
const type = elem.getAttribute('type');
|
|
594
|
-
const show_elem = content.querySelector('div[type="'+type+'"]');
|
|
595
|
-
show_elem.classList.remove('d-none');
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
const menu = clone.querySelector('.testitem__menu');
|
|
599
|
-
const item = menu.querySelectorAll('.testitem__mitem');
|
|
600
|
-
|
|
601
|
-
for(let i=0; i<item.length; i++){
|
|
602
|
-
item[i].addEventListener('click',function(){
|
|
603
|
-
show_content(item[i])
|
|
604
|
-
})
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
const page = document.querySelector('.report');
|
|
609
|
-
const wrapp = page.querySelector('.testWrapp');
|
|
610
|
-
const dummy = wrapp.querySelector('div[name="testitem"][type="dummy"]');
|
|
611
|
-
const clone = dummy.cloneNode(true);
|
|
612
|
-
|
|
613
|
-
clone.setAttribute('type','clone');
|
|
614
|
-
clone.setAttribute('category',category);
|
|
615
|
-
clone.classList.remove('d-none');
|
|
616
|
-
wrapp.append(clone);
|
|
617
|
-
|
|
618
|
-
const testitem__name = clone.querySelector('.testitem__name');
|
|
619
|
-
|
|
620
|
-
const fullTestName = suite_title ? suite_title + " - " + title : title;
|
|
621
|
-
testitem__name.textContent = fullTestName;
|
|
622
|
-
|
|
623
|
-
const body = clone.querySelector('.testitem__body');
|
|
624
|
-
let content = body.querySelector('.testitem__content');
|
|
625
|
-
|
|
626
|
-
let content_error = content.querySelector('div[type="steps"]').querySelector('span');
|
|
627
|
-
content_error.innerHTML = steps;
|
|
628
|
-
|
|
629
|
-
let content_status = content.querySelector('div[type="status"]').querySelector('span');
|
|
630
|
-
content_status.innerHTML = category;
|
|
631
|
-
|
|
632
|
-
let content_message = content.querySelector('div[type="message"]').querySelector('span');
|
|
633
|
-
content_message.innerHTML = message;
|
|
634
|
-
|
|
635
|
-
let content_files = content.querySelector('div[type="files"]').querySelector('span');
|
|
636
|
-
|
|
637
|
-
if (files.includes("This test has no files")) {
|
|
638
|
-
content_files.innerHTML = files;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
if (!files.includes("This test has no files")) {
|
|
642
|
-
const filesList = document.createElement('ul');
|
|
643
|
-
content_files.innerHTML = "";
|
|
644
|
-
|
|
645
|
-
if (Array.isArray(files) && files.length > 0) {
|
|
646
|
-
files.forEach((file) => {
|
|
647
|
-
const listItem = document.createElement('li');
|
|
648
|
-
const fileLink = document.createElement('a');
|
|
649
|
-
fileLink.href = file.path;
|
|
650
|
-
fileLink.target = '_blank';
|
|
651
|
-
fileLink.textContent = file.path;
|
|
652
|
-
|
|
653
|
-
listItem.appendChild(fileLink);
|
|
654
|
-
filesList.appendChild(listItem);
|
|
655
|
-
});
|
|
656
|
-
|
|
657
|
-
content_files.appendChild(filesList);
|
|
658
|
-
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
const testitem__top = clone.querySelector('.testitem__top');
|
|
663
|
-
|
|
664
|
-
testitem__top.addEventListener("click", function(){
|
|
665
|
-
collapse_expand(testitem__top);
|
|
666
|
-
});
|
|
667
|
-
|
|
668
|
-
menu(clone);
|
|
669
|
-
addCountToRadio(page,category);
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
function radioMenuStart(){
|
|
673
|
-
function showBlockForCat(input){
|
|
674
|
-
const page = input.closest('.report');
|
|
675
|
-
const wrapp = page.querySelector('.testWrapp');
|
|
676
|
-
const clone = wrapp.querySelectorAll('div[name="testitem"][type="clone"]');
|
|
677
|
-
|
|
678
|
-
for(let i=0; i<clone.length; i++){
|
|
679
|
-
clone[i].classList.add('d-none');
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
const category = input.getAttribute('category');
|
|
683
|
-
|
|
684
|
-
if(category == 'all'){
|
|
685
|
-
for(let i=0; i<clone.length; i++){
|
|
686
|
-
clone[i].classList.remove('d-none');
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
else{
|
|
690
|
-
for(let i=0; i<clone.length; i++){
|
|
691
|
-
if(clone[i].getAttribute('category') == category){
|
|
692
|
-
clone[i].classList.remove('d-none');
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
const page = document.querySelector('.report');
|
|
699
|
-
const menuTests = page.querySelector('.menuTests');
|
|
700
|
-
const items = menuTests.querySelectorAll('input[name="groupTest"]');
|
|
701
|
-
|
|
702
|
-
for(let i=0; i<items.length; i++){
|
|
703
|
-
items[i].addEventListener('change',function(){
|
|
704
|
-
showBlockForCat(items[i])
|
|
705
|
-
})
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
radioMenuStart();
|
|
709
|
-
|
|
710
|
-
function search(){
|
|
711
|
-
function searchBlock(input){
|
|
712
|
-
const value = input.value;
|
|
713
|
-
|
|
714
|
-
const page = input.closest('.report');
|
|
715
|
-
const wrapp = page.querySelector('.testWrapp');
|
|
716
|
-
const clone = wrapp.querySelectorAll('div[name="testitem"][type="clone"]');
|
|
717
|
-
|
|
718
|
-
for(let i=0; i<clone.length; i++){
|
|
719
|
-
clone[i].classList.add('d-none');
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
for(let i=0; i<clone.length; i++){
|
|
723
|
-
let testitem__name = clone[i].querySelector('.testitem__name');
|
|
724
|
-
let nameInBlock = testitem__name.textContent;
|
|
725
|
-
|
|
726
|
-
if(nameInBlock.includes(value)){
|
|
727
|
-
clone[i].classList.remove('d-none');
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
}
|
|
732
|
-
const page = document.querySelector('.report');
|
|
733
|
-
const inputSearch = page.querySelector('.inputSearch');
|
|
734
|
-
|
|
735
|
-
inputSearch.addEventListener('input',function(){
|
|
736
|
-
searchBlock(inputSearch)
|
|
737
|
-
})
|
|
738
|
-
}
|
|
739
|
-
search();
|
|
740
|
-
|
|
741
|
-
const executedTests = {{{ json tests }}};
|
|
742
|
-
|
|
743
|
-
for (let i = 0; i < executedTests.length; i++) {
|
|
744
|
-
const status = executedTests[i].status;
|
|
310
|
+
</div>
|
|
311
|
+
</section>
|
|
745
312
|
|
|
746
|
-
|
|
747
|
-
|
|
313
|
+
<script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script>
|
|
314
|
+
<script type='text/javascript'>
|
|
315
|
+
// Load google charts google.charts.load('current', {'packages':['corechart']});
|
|
316
|
+
google.charts.setOnLoadCallback(drawChart); // Draw the chart and set the chart values function drawChart() { let
|
|
317
|
+
data = {}; const passedTests =
|
|
318
|
+
{{getTestsByStatus tests 'PASSED'}}; const failedTests =
|
|
319
|
+
{{getTestsByStatus tests 'FAILED'}}; const skippedTests =
|
|
320
|
+
{{getTestsByStatus tests 'SKIPPED'}}; if (passedTests === 0 && failedTests === 0 && skippedTests === 0) { data =
|
|
321
|
+
google.visualization.arrayToDataTable([ ['Task', 'Tests'], ['No Tests', 1] ]) } else { data =
|
|
322
|
+
google.visualization.arrayToDataTable([ ['Task', 'Tests'], ['No Tests', 0], ['Passed', passedTests], ['Failed',
|
|
323
|
+
failedTests], ['Skipped', skippedTests], ]); } // Optional: add a title and set the width and height of the chart
|
|
324
|
+
const options = { 'title':'', 'width':550, 'height':300, 'colors': ['#939992', '#39BD2F', '#F2230C', '#F2C00C'] };
|
|
325
|
+
// Display the chart inside the <div> element with id="piechart" const chart = new
|
|
326
|
+
google.visualization.PieChart(document.getElementById('graff')); chart.draw(data, options); } // processing and
|
|
327
|
+
adding test data to the template function addOneTest(category,testData = {}){ const { suite_title, title, steps,
|
|
328
|
+
message, files } = testData; // radio btn test's count function incrementCount(element) { let count =
|
|
329
|
+
parseInt(element.textContent); count++; element.textContent = count; } function addCountToRadio(page,category){
|
|
330
|
+
const menuTests = page.querySelector('.menuTests'); const all =
|
|
331
|
+
menuTests.querySelector('span[name="numTest"][lcategory="all"]'); incrementCount(all); const elemCat =
|
|
332
|
+
menuTests.querySelector('span[name="numTest"][lcategory="' + category + '"]'); if (elemCat) {
|
|
333
|
+
incrementCount(elemCat); } } // collapse - expand block function collapse_expand(top){ const block =
|
|
334
|
+
top.closest('.testitem'); const icon = top.querySelector('.testitem__icon'); const testitem__ico_right =
|
|
335
|
+
icon.querySelector('.testitem__ico_right'); const testitem__ico_down = icon.querySelector('.testitem__ico_down');
|
|
336
|
+
const body = block.querySelector('.testitem__body'); if(body.classList.contains('d-none')){
|
|
337
|
+
body.classList.remove('d-none'); testitem__ico_right.classList.add('d-none');
|
|
338
|
+
testitem__ico_down.classList.remove('d-none'); } else{ body.classList.add('d-none');
|
|
339
|
+
testitem__ico_down.classList.add('d-none'); testitem__ico_right.classList.remove('d-none'); } } function
|
|
340
|
+
menu(clone){ function removeAddActive(elem){ const menu = elem.closest('.testitem__menu'); const item =
|
|
341
|
+
menu.querySelectorAll('.testitem__mitem'); for(let i=0; i<item.length; i++){
|
|
342
|
+
item[i].classList.remove('testitem__mitem_active'); } elem.classList.add('testitem__mitem_active'); } function
|
|
343
|
+
show_content(elem){ removeAddActive(elem); const body = elem.closest('.testitem__body'); const content =
|
|
344
|
+
body.querySelector('.testitem__content'); const blocks = content.querySelectorAll('.testitem__case'); for(let i=0;
|
|
345
|
+
i<blocks.length; i++){ blocks[i].classList.add('d-none'); } const type = elem.getAttribute('type'); const
|
|
346
|
+
show_elem = content.querySelector('div[type="'+type+'"]'); show_elem.classList.remove('d-none'); } const menu =
|
|
347
|
+
clone.querySelector('.testitem__menu'); const item = menu.querySelectorAll('.testitem__mitem'); for(let i=0;
|
|
348
|
+
i<item.length; i++){ item[i].addEventListener('click',function(){ show_content(item[i]) }) } } const page =
|
|
349
|
+
document.querySelector('.report'); const wrapp = page.querySelector('.testWrapp'); const dummy =
|
|
350
|
+
wrapp.querySelector('div[name="testitem"][type="dummy"]'); const clone = dummy.cloneNode(true);
|
|
351
|
+
clone.setAttribute('type','clone'); clone.setAttribute('category',category); clone.classList.remove('d-none');
|
|
352
|
+
wrapp.append(clone); const testitem__name = clone.querySelector('.testitem__name'); const fullTestName =
|
|
353
|
+
suite_title ? suite_title + " - " + title : title; testitem__name.textContent = fullTestName; const body =
|
|
354
|
+
clone.querySelector('.testitem__body'); let content = body.querySelector('.testitem__content'); let content_error
|
|
355
|
+
= content.querySelector('div[type="steps"]').querySelector('span'); content_error.innerHTML = steps; let
|
|
356
|
+
content_status = content.querySelector('div[type="status"]').querySelector('span'); content_status.innerHTML =
|
|
357
|
+
category; let content_message = content.querySelector('div[type="message"]').querySelector('span');
|
|
358
|
+
content_message.innerHTML = message; let content_files =
|
|
359
|
+
content.querySelector('div[type="files"]').querySelector('span'); if (files.includes("This test has no files")) {
|
|
360
|
+
content_files.innerHTML = files; } if (!files.includes("This test has no files")) { const filesList =
|
|
361
|
+
document.createElement('ul'); content_files.innerHTML = ""; if (Array.isArray(files) && files.length > 0) {
|
|
362
|
+
files.forEach((file) => { const listItem = document.createElement('li'); const fileLink =
|
|
363
|
+
document.createElement('a'); fileLink.href = file.path; fileLink.target = '_blank'; fileLink.textContent =
|
|
364
|
+
file.path; listItem.appendChild(fileLink); filesList.appendChild(listItem); });
|
|
365
|
+
content_files.appendChild(filesList); } } const testitem__top = clone.querySelector('.testitem__top');
|
|
366
|
+
testitem__top.addEventListener("click", function(){ collapse_expand(testitem__top); }); menu(clone);
|
|
367
|
+
addCountToRadio(page,category); } function radioMenuStart(){ function showBlockForCat(input){ const page =
|
|
368
|
+
input.closest('.report'); const wrapp = page.querySelector('.testWrapp'); const clone =
|
|
369
|
+
wrapp.querySelectorAll('div[name="testitem"][type="clone"]'); for(let i=0; i<clone.length; i++){
|
|
370
|
+
clone[i].classList.add('d-none'); } const category = input.getAttribute('category'); if(category == 'all'){
|
|
371
|
+
for(let i=0; i<clone.length; i++){ clone[i].classList.remove('d-none'); } } else{ for(let i=0; i<clone.length;
|
|
372
|
+
i++){ if(clone[i].getAttribute('category') == category){ clone[i].classList.remove('d-none'); } } } } const page =
|
|
373
|
+
document.querySelector('.report'); const menuTests = page.querySelector('.menuTests'); const items =
|
|
374
|
+
menuTests.querySelectorAll('input[name="groupTest"]'); for(let i=0; i<items.length; i++){
|
|
375
|
+
items[i].addEventListener('change',function(){ showBlockForCat(items[i]) }) } } radioMenuStart(); function
|
|
376
|
+
search(){ function searchBlock(input){ const value = input.value; const page = input.closest('.report'); const
|
|
377
|
+
wrapp = page.querySelector('.testWrapp'); const clone =
|
|
378
|
+
wrapp.querySelectorAll('div[name="testitem"][type="clone"]'); for(let i=0; i<clone.length; i++){
|
|
379
|
+
clone[i].classList.add('d-none'); } for(let i=0; i<clone.length; i++){ let testitem__name =
|
|
380
|
+
clone[i].querySelector('.testitem__name'); let nameInBlock = testitem__name.textContent;
|
|
381
|
+
if(nameInBlock.includes(value)){ clone[i].classList.remove('d-none'); } } } const page =
|
|
382
|
+
document.querySelector('.report'); const inputSearch = page.querySelector('.inputSearch');
|
|
383
|
+
inputSearch.addEventListener('input',function(){ searchBlock(inputSearch) }) } search(); const executedTests =
|
|
384
|
+
{{{json tests}}}; for (let i = 0; i < executedTests.length; i++) { const status = executedTests[i].status;
|
|
385
|
+
addOneTest(status, executedTests[i]); }
|
|
748
386
|
</script>
|
|
749
|
-
</body>
|
|
387
|
+
</body>
|
|
750
388
|
</html>
|