nxgreport 0.8.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nxgcore.rb +239 -120
- data/lib/nxgcss.rb +260 -324
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a070244e38842f494942ea189deba31e45360a50857946d17c11749ab10db465
|
4
|
+
data.tar.gz: f903e4695cffc3a15069340f563e2ed7930d1531139ff7a4b6219786e8452649
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d65497235406123d769ac72f0f61b1a16ca565926911d34819ddcd8d5ea730f2363d969212e372613a9457d97a1649ed8711fc15c75ee0c619a1d34d804adec8
|
7
|
+
data.tar.gz: 8eb082850d2be42ef630e83e23a68e1058182ab26ee84f8738b17d8f8964b5e45de460ee05d905fe8e15bbde41f577348055457f5da00f416b2cf542064cdc17
|
data/lib/nxgcore.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'fileutils'
|
2
|
-
|
2
|
+
require 'pry'
|
3
|
+
require 'json'
|
3
4
|
require 'nxgcss.rb'
|
4
5
|
|
5
6
|
class NxgCore
|
@@ -18,19 +19,11 @@ class NxgCore
|
|
18
19
|
@data_provider[:report_path] = location.empty? ? "./NxgReport.html" : location
|
19
20
|
folder_check()
|
20
21
|
@data_provider[:title] = title
|
21
|
-
@data_provider[:title_color] = "
|
22
|
+
@data_provider[:title_color] = ""
|
22
23
|
@data_provider[:open_on_completion] = false
|
23
|
-
@data_provider[:features] =
|
24
|
+
@data_provider[:features] = Array.new()
|
24
25
|
@start_time = Time.now.to_f
|
25
26
|
end
|
26
|
-
|
27
|
-
def set_title_color(hex_color: "")
|
28
|
-
if hex_color.strip().empty?() || hex_color.strip()[0] != "#"
|
29
|
-
log("set_title_color method is called with empty color. please check the code.")
|
30
|
-
return
|
31
|
-
end
|
32
|
-
@data_provider[:title_color] = "background-color: #{hex_color.strip().downcase()};"
|
33
|
-
end
|
34
27
|
|
35
28
|
def open_upon_execution(value: true)
|
36
29
|
return if !value
|
@@ -75,7 +68,7 @@ class NxgCore
|
|
75
68
|
@data_provider[:execution_date] = date
|
76
69
|
end
|
77
70
|
|
78
|
-
def log_test(feature_name: "", test_status: "")
|
71
|
+
def log_test(feature_name: "", test_name:"", test_status: "", comments: "")
|
79
72
|
if feature_name.nil?() || feature_name.strip.empty?()
|
80
73
|
log("Feature name cannot be empty.")
|
81
74
|
return
|
@@ -85,18 +78,31 @@ class NxgCore
|
|
85
78
|
log("Test status cannot be empty.")
|
86
79
|
return
|
87
80
|
end
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
if !@data_provider[:features].key?(name)
|
93
|
-
@data_provider[:features][name]=[0,0,0]
|
81
|
+
|
82
|
+
if test_name.nil?() || test_name.strip.empty?()
|
83
|
+
log("Test name cannot be empty.")
|
84
|
+
return
|
94
85
|
end
|
95
86
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
87
|
+
f_name = feature_name.strip
|
88
|
+
t_name = test_name.strip
|
89
|
+
t_pass = test_status.strip.downcase.include?('pass') ? true : false
|
90
|
+
t_comments = comments.strip
|
91
|
+
|
92
|
+
if !feature_exists?(f_name)
|
93
|
+
new_feature = {
|
94
|
+
"name" => f_name,
|
95
|
+
"total" => 0,
|
96
|
+
"pass" => 0,
|
97
|
+
"fail" => 0,
|
98
|
+
"tests" => Array.new()
|
99
|
+
}
|
100
|
+
@data_provider[:features].push(new_feature)
|
101
|
+
end
|
102
|
+
|
103
|
+
update_feature(f_name, t_name, t_pass, t_comments)
|
104
|
+
@data_provider[:total] += 1
|
105
|
+
@data_provider[t_pass ? :pass : :fail] += 1
|
100
106
|
end
|
101
107
|
|
102
108
|
def build(execution_time: 0)
|
@@ -108,6 +114,29 @@ class NxgCore
|
|
108
114
|
end
|
109
115
|
|
110
116
|
# Private methods
|
117
|
+
|
118
|
+
def update_feature(f_name, t_name, t_pass, t_comments)
|
119
|
+
@data_provider[:features].each do |feature|
|
120
|
+
if feature["name"].eql?(f_name)
|
121
|
+
feature["total"]+=1
|
122
|
+
feature[t_pass ? "pass" : "fail"]+=1
|
123
|
+
feature["tests"].push({
|
124
|
+
"name" => t_name,
|
125
|
+
"testPass" => t_pass,
|
126
|
+
"comments" => t_comments
|
127
|
+
})
|
128
|
+
return
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
def feature_exists?(feature_name)
|
134
|
+
@data_provider[:features].each do |feature|
|
135
|
+
return true if feature["name"].eql?(feature_name)
|
136
|
+
end
|
137
|
+
return false
|
138
|
+
end
|
139
|
+
|
111
140
|
def log(message)
|
112
141
|
puts("🤖- #{message}")
|
113
142
|
end
|
@@ -163,8 +192,20 @@ class NxgCore
|
|
163
192
|
end
|
164
193
|
|
165
194
|
def body()
|
166
|
-
"<body
|
167
|
-
<div
|
195
|
+
"<body id=\"app\" onload=\"onRefresh()\">
|
196
|
+
<div id=\"sidebar\" onclick=\"closeDetails()\">
|
197
|
+
<div id=\"sidebar-div\">
|
198
|
+
<div id=\"sidebar-title-wrap\">
|
199
|
+
<h1 id=\"sidebar-title\">Title</h1>
|
200
|
+
|
201
|
+
<i class=\"material-icons\" id=\"sidebar-status\">check_circle</i>
|
202
|
+
</div>
|
203
|
+
</div>
|
204
|
+
</div>
|
205
|
+
<div id=\"sidebar-overlay\" onclick=\"closeDetails()\">
|
206
|
+
<div id=\"sidebar-overlay-grid\"></div>
|
207
|
+
</div>
|
208
|
+
<div id=\"body-wrap\">
|
168
209
|
#{header()}
|
169
210
|
#{config()}
|
170
211
|
#{features()}
|
@@ -174,30 +215,26 @@ class NxgCore
|
|
174
215
|
end
|
175
216
|
|
176
217
|
def header()
|
177
|
-
"<div
|
178
|
-
<h1>#{@data_provider[:title]}</h1>
|
179
|
-
<div
|
180
|
-
<button id=\"theme-switch\" onclick=\"
|
181
|
-
<i class=\"material-icons\" id=\"theme-
|
218
|
+
"<div id=\"header\">
|
219
|
+
<h1 id=\"app-title\">#{@data_provider[:title]}</h1>
|
220
|
+
<div id=\"theme-wrap\">
|
221
|
+
<button id=\"theme-switch\" onclick=\"switchTheme()\">
|
222
|
+
<i class=\"material-icons\" id=\"theme-icon\">brightness_2</i>
|
182
223
|
</button>
|
183
224
|
</div>
|
184
225
|
</div>"
|
185
226
|
end
|
186
227
|
|
187
228
|
def features()
|
188
|
-
"<div class=\"
|
229
|
+
"<div class=\"features-grid\"></div>"
|
189
230
|
end
|
190
231
|
|
191
232
|
def features_js_array()
|
192
|
-
|
193
|
-
@data_provider[:features].each do |name, metrics|
|
194
|
-
js_array += "{ name: \"#{name}\", total: #{metrics[0]}, pass: #{metrics[1]}, fail: #{metrics[2]} },"
|
195
|
-
end
|
196
|
-
return js_array
|
233
|
+
return @data_provider[:features].to_s.gsub("=>", ":")
|
197
234
|
end
|
198
235
|
|
199
236
|
def footer()
|
200
|
-
"<div
|
237
|
+
"<div id=\"footer\">
|
201
238
|
<p>
|
202
239
|
Developed by
|
203
240
|
<span>
|
@@ -214,91 +251,173 @@ class NxgCore
|
|
214
251
|
|
215
252
|
def javascript()
|
216
253
|
"<script>
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
displayAll();
|
247
|
-
} else {
|
248
|
-
displayFailuresOnly();
|
249
|
-
}
|
250
|
-
}
|
251
|
-
|
252
|
-
function displayAll() {
|
253
|
-
$(\"#filter h5\").text(\"All\");
|
254
|
-
$(\".banner-in-the-middle\").removeClass(\"banner-in-the-middle\").addClass(\"mc\");
|
255
|
-
$(\".mc\").empty();
|
256
|
-
features.forEach((item) => {
|
257
|
-
$(\".mc\").append(
|
258
|
-
`<div class=\"module dark ${
|
259
|
-
item.fail > 0 ? \"danger\" : \"\"
|
260
|
-
}\"><div class=\"funcname\"><h4>${
|
261
|
-
item.name
|
262
|
-
}</h4></div><div class=\"total\"><h6>Total</h6><h4>${
|
263
|
-
item.total
|
264
|
-
}</h4></div><div class=\"pass\"><h6>Passed</h6><h4>${
|
265
|
-
item.pass
|
266
|
-
}</h4></div><div class=\"fail\"><h6>Failed</h6><h4>${
|
267
|
-
item.fail
|
268
|
-
}</h4></div></div>`
|
254
|
+
var darkTheme = false;
|
255
|
+
var displayFailuresOnly = false;
|
256
|
+
|
257
|
+
const allFeatures = #{features_js_array};
|
258
|
+
|
259
|
+
var dataSource = [];
|
260
|
+
|
261
|
+
const STATUS = {
|
262
|
+
pass: \"check_circle\",
|
263
|
+
fail: \"cancel\",
|
264
|
+
};
|
265
|
+
|
266
|
+
function onRefresh() {
|
267
|
+
switchTheme();
|
268
|
+
dataSource = allFeatures;
|
269
|
+
setFilter();
|
270
|
+
}
|
271
|
+
|
272
|
+
function updateView() {
|
273
|
+
$(\".banner\").removeClass(\"banner\").addClass(\"features-grid\");
|
274
|
+
$(\".features-grid\").empty();
|
275
|
+
|
276
|
+
if (dataSource.length === 0) {
|
277
|
+
console.log(\"inside\");
|
278
|
+
$(\".features-grid\")
|
279
|
+
.removeClass(\"features-grid\")
|
280
|
+
.addClass(\"banner\")
|
281
|
+
.append(
|
282
|
+
`<i class=\"banner-text green-font material-icons\">done_all</i><h1>No Failures</>`
|
269
283
|
);
|
284
|
+
return;
|
285
|
+
}
|
286
|
+
|
287
|
+
dataSource.forEach((feature, index) => {
|
288
|
+
$(\".features-grid\").append(
|
289
|
+
`<div class=\"module dark ${
|
290
|
+
feature.fail > 0 ? \"red-bg\" : \"\"
|
291
|
+
}\" onclick=\"showDetails(${index})\"><div class=\"funcname\"><h4>${
|
292
|
+
feature.name
|
293
|
+
}</h4></div><div class=\"total\"><h6>Total</h6><h4>${
|
294
|
+
feature.total
|
295
|
+
}</h4></div><div class=\"pass green-font\"><h6>Passed</h6><h4>${
|
296
|
+
feature.pass
|
297
|
+
}</h4></div><div class=\"fail red-font\"><h6>Failed</h6><h4>${
|
298
|
+
feature.fail
|
299
|
+
}</h4></div></div>`
|
300
|
+
);
|
301
|
+
});
|
302
|
+
}
|
303
|
+
|
304
|
+
function setFilter() {
|
305
|
+
if (displayFailuresOnly) {
|
306
|
+
$(\"#filter h5\").text(\"Failed\");
|
307
|
+
dataSource = allFeatures.filter((feature) => {
|
308
|
+
return feature.fail > 0;
|
270
309
|
});
|
310
|
+
} else {
|
311
|
+
$(\"#filter h5\").text(\"All\");
|
312
|
+
dataSource = allFeatures;
|
271
313
|
}
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
314
|
+
updateView();
|
315
|
+
displayFailuresOnly = !displayFailuresOnly;
|
316
|
+
}
|
317
|
+
|
318
|
+
function filterAllFailed() {
|
319
|
+
allFailedTests = [];
|
320
|
+
|
321
|
+
failedFeatures = allFeatures.filter((feature) => {
|
322
|
+
return feature.fail > 0;
|
323
|
+
});
|
324
|
+
|
325
|
+
for (index = 0; index < failedFeatures.length; index++) {
|
326
|
+
failedFeatures[index].tests.filter((test) => {
|
327
|
+
if (!test.testPass) {
|
328
|
+
allFailedTests.push(test);
|
284
329
|
}
|
285
330
|
});
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
331
|
+
}
|
332
|
+
|
333
|
+
$(\"#sidebar-overlay\").css(\"visibility\", \"visible\");
|
334
|
+
$(\"#sidebar-overlay\").css(\"margin-left\", \"40%\");
|
335
|
+
$(\"#sidebar\").css(\"width\", \"40%\");
|
336
|
+
$(\"#sidebar-title\").css(\"visibility\", \"visible\");
|
337
|
+
$(\"#sidebar-status\").css(\"visibility\", \"visible\");
|
338
|
+
/* Update Test Information */
|
339
|
+
|
340
|
+
$(\"#sidebar-title\").text(\"Failed Tests\");
|
341
|
+
$(\"#sidebar-status\").text(STATUS.fail);
|
342
|
+
$(\"#sidebar-overlay-grid\").empty();
|
343
|
+
allFailedTests.forEach((test) => {
|
344
|
+
$(\"#sidebar-overlay-grid\").append(
|
345
|
+
`<div id=\"sidebar-overlay-test-info\" onclick=\"()=>{}\"><i class=\"${
|
346
|
+
test.testPass ? \"green-font\" : \"red-font\"
|
347
|
+
} material-icons\" style=\"font-size: 1em\">${
|
348
|
+
STATUS.fail
|
349
|
+
}</i> <h4 id=\"test-title\">${test.name}</h4>${
|
350
|
+
test.comments !== \"\"
|
351
|
+
? `<p id=\"error-message\">${test.comments}</p>`
|
352
|
+
: \"\"
|
353
|
+
}</div>`
|
354
|
+
);
|
355
|
+
});
|
356
|
+
}
|
357
|
+
|
358
|
+
function switchTheme() {
|
359
|
+
$(document.documentElement).attr(\"theme\", !darkTheme ? \"light\" : \"dark\");
|
360
|
+
$(\"#theme-icon\").text(!darkTheme ? \"wb_sunny\" : \"brightness_2\");
|
361
|
+
darkTheme = !darkTheme;
|
362
|
+
}
|
363
|
+
|
364
|
+
function closeDetails() {
|
365
|
+
$(\"#sidebar-title\").css(\"visibility\", \"hidden\");
|
366
|
+
$(\"#sidebar-status\").css(\"visibility\", \"hidden\");
|
367
|
+
$(\"#sidebar-overlay\").css(\"visibility\", \"hidden\");
|
368
|
+
$(\"#sidebar-overlay\").css(\"margin-left\", \"0\");
|
369
|
+
$(\"#sidebar\").css(\"width\", \"0\");
|
370
|
+
}
|
371
|
+
|
372
|
+
window
|
373
|
+
.matchMedia(\"(prefers-color-scheme: dark)\")
|
374
|
+
.addEventListener(\"change\", (e) => {
|
375
|
+
darkTheme = e.matches;
|
376
|
+
switchTheme();
|
377
|
+
});
|
378
|
+
|
379
|
+
function showDetails(featureID) {
|
380
|
+
feature = dataSource[featureID];
|
381
|
+
|
382
|
+
$(\"#sidebar-overlay\").css(\"visibility\", \"visible\");
|
383
|
+
$(\"#sidebar-overlay\").css(\"margin-left\", \"40%\");
|
384
|
+
$(\"#sidebar\").css(\"width\", \"40%\");
|
385
|
+
$(\"#sidebar-title\").css(\"visibility\", \"visible\");
|
386
|
+
$(\"#sidebar-status\").css(\"visibility\", \"visible\");
|
387
|
+
/* Update Test Information */
|
388
|
+
|
389
|
+
$(\"#sidebar-title\").text(feature.name);
|
390
|
+
$(\"#sidebar-overlay-grid\").empty();
|
391
|
+
feature.tests.forEach((test) => {
|
392
|
+
$(\"#sidebar-overlay-grid\").append(
|
393
|
+
`<div id=\"sidebar-overlay-test-info\" onclick=\"()=>{}\"><i class=\"${
|
394
|
+
test.testPass ? \"green-font\" : \"red-font\"
|
395
|
+
} material-icons\" style=\"font-size: 1em\">${
|
396
|
+
test.testPass ? STATUS.pass : STATUS.fail
|
397
|
+
}</i> <h4 id=\"test-title\">${test.name}</h4>${
|
398
|
+
test.comments !== \"\"
|
399
|
+
? `<p id=\"error-message\">${test.comments}</p>`
|
400
|
+
: \"\"
|
401
|
+
}</div>`
|
402
|
+
);
|
403
|
+
});
|
404
|
+
|
405
|
+
for (index = 0; index < feature.tests.length; index++) {
|
406
|
+
if (!feature.tests[index].testPass) {
|
407
|
+
$(\"#sidebar-status\").text(STATUS.fail);
|
408
|
+
return;
|
293
409
|
}
|
294
410
|
}
|
411
|
+
$(\"#sidebar-status\").text(STATUS.pass);
|
412
|
+
}
|
413
|
+
|
295
414
|
</script>"
|
296
415
|
end
|
297
416
|
|
298
417
|
def config()
|
299
418
|
return if @data_provider.length == 0
|
300
419
|
|
301
|
-
return "<div class=\"
|
420
|
+
return "<div class=\"params-container\">
|
302
421
|
#{release_name()}
|
303
422
|
#{execution_date()}
|
304
423
|
#{device()}
|
@@ -320,23 +439,23 @@ class NxgCore
|
|
320
439
|
end
|
321
440
|
|
322
441
|
def filter()
|
323
|
-
"<div class=\"
|
324
|
-
<i class=\"
|
325
|
-
<h5 id=\"
|
442
|
+
"<div class=\"param-wrap\" onclick=\"setFilter()\" id=\"filter\" title=\"Filter tests\">
|
443
|
+
<i class=\"pi material-icons\">filter_list</i>
|
444
|
+
<h5 id=\"pt\">Failed</h5>
|
326
445
|
</div>"
|
327
446
|
end
|
328
447
|
|
329
448
|
def passed_tests()
|
330
|
-
"<div class=\"
|
331
|
-
<i class=\"
|
332
|
-
<h5 id=\"
|
449
|
+
"<div class=\"param-wrap\" title=\"Passed tests\">
|
450
|
+
<i class=\"pi green-font material-icons\">check_circle</i>
|
451
|
+
<h5 id=\"pt\">#{@data_provider[:pass] == 0 ? "None" : @data_provider[:pass]}</h5>
|
333
452
|
</div>"
|
334
453
|
end
|
335
454
|
|
336
455
|
def failed_tests()
|
337
|
-
"<div class=\"
|
338
|
-
<i class=\"
|
339
|
-
<h5 id=\"
|
456
|
+
"<div class=\"param-wrap\" title=\"Failed tests\" #{@data_provider[:fail] > 0 ? "onclick=\"filterAllFailed()\" style=\"cursor: pointer\"" : ""}>
|
457
|
+
<i class=\"pi red-font material-icons\">cancel</i>
|
458
|
+
<h5 id=\"pt\">#{@data_provider[:fail] == 0 ? "None" : @data_provider[:fail]}</h5>
|
340
459
|
</div>"
|
341
460
|
end
|
342
461
|
|
@@ -383,9 +502,9 @@ class NxgCore
|
|
383
502
|
end
|
384
503
|
|
385
504
|
def config_item(toot_tip, name, icon)
|
386
|
-
"<div class=\"
|
387
|
-
<i class=\"
|
388
|
-
<h5 id=\"
|
505
|
+
"<div class=\"param-wrap\" title=\"#{toot_tip}\">
|
506
|
+
<i class=\"pi material-icons\">#{icon}</i>
|
507
|
+
<h5 id=\"pt\">#{name}</h5>
|
389
508
|
</div>"
|
390
509
|
end
|
391
510
|
|
data/lib/nxgcss.rb
CHANGED
@@ -7,329 +7,265 @@ module NxgCss
|
|
7
7
|
|
8
8
|
def css(data_provider)
|
9
9
|
"<style>
|
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
|
-
|
35
|
-
|
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
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
body > .body-wrapper > .configuration-container > .configuration-wrapper > .fail-total {
|
271
|
-
color: var(--light-red);
|
272
|
-
}
|
273
|
-
|
274
|
-
body > .body-wrapper > .mc > .module.danger {
|
275
|
-
background-color: var(--danger-bg);
|
276
|
-
}
|
277
|
-
|
278
|
-
body > .body-wrapper > .header {
|
279
|
-
color: var(--light-primary);
|
280
|
-
}
|
281
|
-
|
282
|
-
body > .body-wrapper > .configuration-container > .configuration-wrapper {
|
283
|
-
color: var(--light-font);
|
284
|
-
}
|
285
|
-
|
286
|
-
body > .body-wrapper > .footer > p > span > a {
|
287
|
-
color: var(--light-font);
|
288
|
-
}
|
289
|
-
|
290
|
-
body > .body-wrapper > .header > div > button > #theme-switch-icon {
|
291
|
-
color: var(--light-primary);
|
292
|
-
}
|
293
|
-
|
294
|
-
@media only screen and (max-width: 600px) {
|
295
|
-
h1 {
|
296
|
-
font-size: 24px;
|
297
|
-
}
|
298
|
-
|
299
|
-
.mc {
|
300
|
-
grid-template-columns: 1fr;
|
301
|
-
padding: 0.5em 0.5em;
|
302
|
-
padding-top: 1em;
|
303
|
-
}
|
304
|
-
|
305
|
-
.configuration-container {
|
306
|
-
padding: 0.5em 0em;
|
307
|
-
}
|
308
|
-
|
309
|
-
.configuration-wrapper {
|
310
|
-
padding: 0.5em 1em;
|
311
|
-
}
|
312
|
-
|
313
|
-
.configuration-icon {
|
314
|
-
font-size: 1em;
|
315
|
-
}
|
316
|
-
|
317
|
-
#configuration-text {
|
318
|
-
font-size: 0.6em;
|
319
|
-
}
|
320
|
-
|
321
|
-
#filter {
|
322
|
-
width: 4em;
|
323
|
-
padding: 0.4em 0.4em;
|
324
|
-
margin: 0.3em 0.7em 0.3em 0.7em;
|
325
|
-
}
|
326
|
-
}
|
327
|
-
|
328
|
-
@media (min-width: 600px) and (max-width: 992px) {
|
329
|
-
.mc {
|
330
|
-
grid-template-columns: 1fr 1fr;
|
331
|
-
}
|
332
|
-
}
|
333
|
-
</style>"
|
10
|
+
:root {
|
11
|
+
--font: \"Open Sans\", sans-serif;
|
12
|
+
--primary-gradient: linear-gradient(to bottom right, #ff644e, #cb3018);
|
13
|
+
--background-color: #f4f4f4;
|
14
|
+
--primary-color: #fff;
|
15
|
+
--secondary-color: #fff;
|
16
|
+
--primary-font-color: #424242;
|
17
|
+
--green: rgb(31, 172, 31);
|
18
|
+
--red: rgb(214, 7, 7);
|
19
|
+
--blue: rgb(0, 89, 255);
|
20
|
+
--red-bg: rgba(255, 0, 0, 0.233);
|
21
|
+
}
|
22
|
+
|
23
|
+
[theme=\"dark\"] {
|
24
|
+
--background-color: #252525;
|
25
|
+
--primary-color: #2e2e2e;
|
26
|
+
--secondary-color: rgba(255, 255, 255, 0.842);
|
27
|
+
--primary-font-color: #f9fafccb;
|
28
|
+
--green: rgb(6, 207, 6);
|
29
|
+
--red: rgb(228, 1, 1);
|
30
|
+
--blue: rgb(91, 226, 250);
|
31
|
+
--red-bg: rgba(201, 53, 53, 0.479);
|
32
|
+
}
|
33
|
+
|
34
|
+
* {
|
35
|
+
font-family: var(--font);
|
36
|
+
color: var(--primary-font-color);
|
37
|
+
transition: color 0.5s ease;
|
38
|
+
transition: background-color 0.5s ease;
|
39
|
+
}
|
40
|
+
|
41
|
+
#app {
|
42
|
+
background-color: var(--background-color);
|
43
|
+
margin: auto;
|
44
|
+
}
|
45
|
+
|
46
|
+
#header {
|
47
|
+
display: grid;
|
48
|
+
grid-template-columns: 8fr 1fr;
|
49
|
+
text-align: center;
|
50
|
+
background: var(--primary-gradient);
|
51
|
+
}
|
52
|
+
|
53
|
+
#app-title,
|
54
|
+
#theme-icon {
|
55
|
+
color: var(--background-color);
|
56
|
+
}
|
57
|
+
|
58
|
+
#sidebar {
|
59
|
+
width: 0;
|
60
|
+
height: 100%;
|
61
|
+
position: fixed;
|
62
|
+
z-index: 2;
|
63
|
+
top: 0;
|
64
|
+
left: 0;
|
65
|
+
overflow-x: hidden;
|
66
|
+
transition: 1s ease;
|
67
|
+
display: flex;
|
68
|
+
place-items: center;
|
69
|
+
background: var(--primary-gradient);
|
70
|
+
}
|
71
|
+
|
72
|
+
#sidebar-div {
|
73
|
+
margin: auto;
|
74
|
+
}
|
75
|
+
|
76
|
+
#sidebar-overlay-test-info {
|
77
|
+
font-size: 16px;
|
78
|
+
margin: 0.5em 0;
|
79
|
+
}
|
80
|
+
|
81
|
+
#sidebar-overlay {
|
82
|
+
width: 60%;
|
83
|
+
height: 100%;
|
84
|
+
z-index: 1;
|
85
|
+
position: fixed;
|
86
|
+
top: 0;
|
87
|
+
left: 0;
|
88
|
+
visibility: hidden;
|
89
|
+
display: flex;
|
90
|
+
transition: margin-left 1s ease;
|
91
|
+
overflow-y: auto;
|
92
|
+
background-color: var(--background-color);
|
93
|
+
}
|
94
|
+
|
95
|
+
#sidebar-overlay-grid {
|
96
|
+
display: grid;
|
97
|
+
grid-template-rows: auto;
|
98
|
+
padding: 1em;
|
99
|
+
margin: 0 1em;
|
100
|
+
width: 100%;
|
101
|
+
height: fit-content;
|
102
|
+
}
|
103
|
+
|
104
|
+
#sidebar-title-wrap,
|
105
|
+
#sidebar-overlay-test-info {
|
106
|
+
display: flex;
|
107
|
+
place-items: center;
|
108
|
+
flex-wrap: wrap;
|
109
|
+
}
|
110
|
+
|
111
|
+
#sidebar-title,
|
112
|
+
#sidebar-status {
|
113
|
+
color: var(--secondary-color);
|
114
|
+
}
|
115
|
+
|
116
|
+
#test-title {
|
117
|
+
margin: 0;
|
118
|
+
}
|
119
|
+
|
120
|
+
h2,
|
121
|
+
h3,
|
122
|
+
h4,
|
123
|
+
h5,
|
124
|
+
h6 {
|
125
|
+
text-align: center;
|
126
|
+
margin: auto;
|
127
|
+
}
|
128
|
+
|
129
|
+
#error-message {
|
130
|
+
flex-basis: 100%;
|
131
|
+
margin: 1em 1.5em 0 1.5em;
|
132
|
+
display: table-cell;
|
133
|
+
vertical-align: middle;
|
134
|
+
background-color: var(--primary-color);
|
135
|
+
padding: 1em;
|
136
|
+
border-radius: 1em;
|
137
|
+
font-size: 0.8em;
|
138
|
+
}
|
139
|
+
|
140
|
+
#body-wrap {
|
141
|
+
display: grid;
|
142
|
+
grid-template-rows: auto auto 1fr;
|
143
|
+
height: 100vh;
|
144
|
+
width: 100vw;
|
145
|
+
}
|
146
|
+
|
147
|
+
#theme-switch {
|
148
|
+
width: 5em;
|
149
|
+
height: 5em;
|
150
|
+
background-color: Transparent;
|
151
|
+
background-repeat: no-repeat;
|
152
|
+
border: none;
|
153
|
+
cursor: pointer;
|
154
|
+
overflow: hidden;
|
155
|
+
outline: none;
|
156
|
+
margin: 0;
|
157
|
+
margin-right: 1em;
|
158
|
+
position: relative;
|
159
|
+
top: 50%;
|
160
|
+
-ms-transform: translateY(-50%);
|
161
|
+
transform: translateY(-50%);
|
162
|
+
}
|
163
|
+
|
164
|
+
.params-container {
|
165
|
+
display: flex;
|
166
|
+
flex-wrap: wrap;
|
167
|
+
justify-content: space-between;
|
168
|
+
text-align: center;
|
169
|
+
padding: 1em 2em;
|
170
|
+
}
|
171
|
+
|
172
|
+
.param-wrap {
|
173
|
+
display: flex;
|
174
|
+
place-items: center;
|
175
|
+
}
|
176
|
+
|
177
|
+
.pi {
|
178
|
+
font-size: 1.5em;
|
179
|
+
padding-right: 0.5em;
|
180
|
+
}
|
181
|
+
|
182
|
+
#pt {
|
183
|
+
font-size: 0.9em;
|
184
|
+
}
|
185
|
+
|
186
|
+
#filter {
|
187
|
+
cursor: pointer;
|
188
|
+
border-radius: 1em;
|
189
|
+
width: 5em;
|
190
|
+
padding: 0.2em 1em;
|
191
|
+
background-color: var(--primary-color);
|
192
|
+
}
|
193
|
+
|
194
|
+
.features-grid {
|
195
|
+
display: grid;
|
196
|
+
grid-template-columns: 1fr 1fr 1fr;
|
197
|
+
grid-auto-rows: 70px;
|
198
|
+
grid-gap: 0.5em;
|
199
|
+
padding: 0.5em 2em;
|
200
|
+
}
|
201
|
+
|
202
|
+
.module {
|
203
|
+
display: grid;
|
204
|
+
place-items: center;
|
205
|
+
grid-template-columns: 3fr 1fr 1fr 1fr;
|
206
|
+
border-radius: 0.7rem;
|
207
|
+
padding: 10px 10px;
|
208
|
+
background-color: var(--primary-color);
|
209
|
+
cursor: pointer;
|
210
|
+
}
|
211
|
+
|
212
|
+
.total,
|
213
|
+
.pass,
|
214
|
+
.fail {
|
215
|
+
display: grid;
|
216
|
+
width: 100%;
|
217
|
+
height: 100%;
|
218
|
+
place-items: center;
|
219
|
+
}
|
220
|
+
|
221
|
+
.total > * {
|
222
|
+
color: var(--blue);
|
223
|
+
}
|
224
|
+
|
225
|
+
.banner {
|
226
|
+
margin: auto;
|
227
|
+
text-align: center;
|
228
|
+
}
|
229
|
+
|
230
|
+
.banner-text {
|
231
|
+
font-size: 5em;
|
232
|
+
}
|
233
|
+
|
234
|
+
#footer {
|
235
|
+
font-size: 0.7rem;
|
236
|
+
text-align: center;
|
237
|
+
margin-bottom: 0.5em;
|
238
|
+
padding: 3em 3em 1em 3em;
|
239
|
+
}
|
240
|
+
|
241
|
+
@media (min-width: 600px) and (max-width: 1400px) {
|
242
|
+
.pi {
|
243
|
+
font-size: 1em;
|
244
|
+
padding-right: 0.5em;
|
245
|
+
}
|
246
|
+
|
247
|
+
#pt {
|
248
|
+
font-size: 0.7em;
|
249
|
+
}
|
250
|
+
|
251
|
+
.funcname {
|
252
|
+
font-size: 0.9em;
|
253
|
+
}
|
254
|
+
}
|
255
|
+
|
256
|
+
.green-font,
|
257
|
+
.pass > * {
|
258
|
+
color: var(--green);
|
259
|
+
}
|
260
|
+
|
261
|
+
.red-font,
|
262
|
+
.fail > * {
|
263
|
+
color: var(--red);
|
264
|
+
}
|
265
|
+
|
266
|
+
.red-bg {
|
267
|
+
background-color: var(--red-bg);
|
268
|
+
}
|
269
|
+
</style>"
|
334
270
|
end
|
335
271
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nxgreport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Balabharathi Jayaraman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Generate a beautiful static test report.
|
14
14
|
email: balabharathi.jayaraman@gmail.com
|