@gregoriusrippenstein/erlang-red-unittest 0.10.0 → 0.10.4
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/nodes/ut-assert-debug.html +11 -2
- package/nodes/ut-assert-status.html +9 -0
- package/package.json +11 -2
- package/plugins/sidebar.html +40 -6
|
@@ -76,6 +76,14 @@
|
|
|
76
76
|
RED.view.select(item.nodeid);
|
|
77
77
|
}
|
|
78
78
|
}).on('treelistconfirm', function (event, item) {
|
|
79
|
+
}).on("treelistitemmouseover", function (e, item) {
|
|
80
|
+
item.node.highlighted = true;
|
|
81
|
+
item.node.dirty = true;
|
|
82
|
+
RED.view.redraw();
|
|
83
|
+
}).on("treelistitemmouseout", function (e, item) {
|
|
84
|
+
item.node.highlighted = false;
|
|
85
|
+
item.node.dirty = true;
|
|
86
|
+
RED.view.redraw();
|
|
79
87
|
});
|
|
80
88
|
|
|
81
89
|
var search = $("#node-input-assert-debug-target-filter").searchBox({
|
|
@@ -100,6 +108,7 @@
|
|
|
100
108
|
label: RED.utils.getNodeLabel(nde),
|
|
101
109
|
icon: "",
|
|
102
110
|
nodeid: nde.id,
|
|
111
|
+
node: nde,
|
|
103
112
|
sublabel: nde.type,
|
|
104
113
|
selected: nde.id == this.nodeid,
|
|
105
114
|
checkbox: false,
|
|
@@ -134,7 +143,7 @@
|
|
|
134
143
|
</div>
|
|
135
144
|
|
|
136
145
|
<div class="form-row">
|
|
137
|
-
|
|
146
|
+
<input type="checkbox" id="node-input-inverse"
|
|
138
147
|
style="display:inline-block; width:15px; vertical-align:baseline;">
|
|
139
148
|
<label for="node-input-inverse"><span data-i18n="ut-assert-debug.label.inverse"></span></label>
|
|
140
149
|
</div>
|
|
@@ -154,7 +163,7 @@
|
|
|
154
163
|
</div>
|
|
155
164
|
</div>
|
|
156
165
|
|
|
157
|
-
<div class="form-row" style="margin-left: 10px; position: relative; height: 40vh; margin-right: 15px; min-height: 5vh;"
|
|
166
|
+
<div class="form-row" style="margin-left: 10px; position: relative; height: 40vh; margin-right: 15px; min-height: 5vh;">
|
|
158
167
|
<div style="margin-bottom: 5px; width: 35%; padding-left: 60%;">
|
|
159
168
|
<input type="text" id="node-input-assert-debug-target-filter">
|
|
160
169
|
</div>
|
|
@@ -91,6 +91,14 @@
|
|
|
91
91
|
RED.view.select(item.nodeid);
|
|
92
92
|
}
|
|
93
93
|
}).on('treelistconfirm', function (event, item) {
|
|
94
|
+
}).on("treelistitemmouseover", function (e, item) {
|
|
95
|
+
item.node.highlighted = true;
|
|
96
|
+
item.node.dirty = true;
|
|
97
|
+
RED.view.redraw();
|
|
98
|
+
}).on("treelistitemmouseout", function (e, item) {
|
|
99
|
+
item.node.highlighted = false;
|
|
100
|
+
item.node.dirty = true;
|
|
101
|
+
RED.view.redraw();
|
|
94
102
|
});
|
|
95
103
|
|
|
96
104
|
var search = $("#node-input-assert-status-target-filter").searchBox({
|
|
@@ -115,6 +123,7 @@
|
|
|
115
123
|
label: RED.utils.getNodeLabel(nde),
|
|
116
124
|
icon: "",
|
|
117
125
|
nodeid: nde.id,
|
|
126
|
+
node: nde,
|
|
118
127
|
sublabel: nde.type,
|
|
119
128
|
selected: nde.id == this.nodeid,
|
|
120
129
|
checkbox: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gregoriusrippenstein/erlang-red-unittest",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
},
|
|
6
6
|
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
|
|
16
16
|
"license": "Don't do evil.",
|
|
17
|
+
"homepage": "https://github.com/gorenje/erlang-red-unittesting-nodes#readme",
|
|
17
18
|
"author": "Gerrit Riessen <gerrit@flowhub.org>",
|
|
18
19
|
"engines": {
|
|
19
20
|
"node": ">=14"
|
|
@@ -33,5 +34,13 @@
|
|
|
33
34
|
"ut-assert-status": "nodes/ut-assert-status.js",
|
|
34
35
|
"ut-assert-debug": "nodes/ut-assert-debug.js"
|
|
35
36
|
}
|
|
36
|
-
}
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "https://github.com/gorenje/erlang-red-unittesting-nodes.git"
|
|
42
|
+
},
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/gorenje/erlang-red-unittesting-nodes"
|
|
45
|
+
}
|
|
37
46
|
}
|
package/plugins/sidebar.html
CHANGED
|
@@ -197,6 +197,7 @@ function highlightTestResult(dirList, flowid, status) {
|
|
|
197
197
|
break;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
+
$($(dirList.treeList('selected').treeList.container).find('.red-ui-treeList-icon')).data("status", status)
|
|
200
201
|
$($($(dirList.treeList('selected').treeList.container).find('.red-ui-treeList-icon')).find('i')).prop('class', "fa " + shp).css('color', clr)
|
|
201
202
|
}
|
|
202
203
|
|
|
@@ -335,7 +336,7 @@ RED.sidebar.addTab({
|
|
|
335
336
|
visible: true
|
|
336
337
|
});
|
|
337
338
|
|
|
338
|
-
|
|
339
|
+
/*
|
|
339
340
|
var tabs = RED.tabs.create({
|
|
340
341
|
id: 'func-unittesting-tabs',
|
|
341
342
|
onchange: function (tab) {
|
|
@@ -366,6 +367,9 @@ tabs.addTab({
|
|
|
366
367
|
});
|
|
367
368
|
|
|
368
369
|
tabs.activateTab("func-unittesting-tab-pull");
|
|
370
|
+
*/
|
|
371
|
+
|
|
372
|
+
$('#func-unittesting-tab-pull').show();
|
|
369
373
|
|
|
370
374
|
var dirList = $("#node-input-unittestingpull-sb-target-container-div").css({
|
|
371
375
|
width: "100%",
|
|
@@ -376,8 +380,9 @@ var dirList = $("#node-input-unittestingpull-sb-target-container-div").css({
|
|
|
376
380
|
}
|
|
377
381
|
).on('treelistselect', function (event, item) {
|
|
378
382
|
if ( item.flowid) {
|
|
379
|
-
$('#unittesting-view-testflow-link').prop('href',
|
|
383
|
+
$('#unittesting-view-testflow-link').prop('href', `https://flows.red-erik.org/f/${item.flowid}`)
|
|
380
384
|
$('#unittesting-view-testflow-link').fadeIn(300)
|
|
385
|
+
$('#unittesting-helper-import-text').fadeIn(300)
|
|
381
386
|
} else {
|
|
382
387
|
$('#unittesting-view-testflow-link').fadeOut(300)
|
|
383
388
|
$('#unittesting-view-testflow-link').prop('href', "")
|
|
@@ -385,6 +390,7 @@ var dirList = $("#node-input-unittestingpull-sb-target-container-div").css({
|
|
|
385
390
|
}).on('treelistconfirm', function (event, item) {
|
|
386
391
|
if (item.flowid) {
|
|
387
392
|
doFlowImportForSidebarUnittesting(item.flowid)
|
|
393
|
+
$('#unittesting-helper-import-text').fadeOut(1000, () => { $('#unittesting-helper-import-text').remove() })
|
|
388
394
|
}
|
|
389
395
|
});
|
|
390
396
|
|
|
@@ -398,9 +404,32 @@ var search = $("#node-input-unittestingpull-sb-target-filter").searchBox({
|
|
|
398
404
|
dirList.treeList("filter", null);
|
|
399
405
|
search.searchBox("count", "");
|
|
400
406
|
} else {
|
|
401
|
-
var count =
|
|
402
|
-
|
|
403
|
-
|
|
407
|
+
var count = 0
|
|
408
|
+
if ( val == "is:pending" ) {
|
|
409
|
+
count = dirList.treeList("filter", function (item) {
|
|
410
|
+
return $($(item.treeList.container).find('.red-ui-treeList-icon')).data("status") == "pending"
|
|
411
|
+
});
|
|
412
|
+
} else if (val == "is:failed" || val == "is:error") {
|
|
413
|
+
count = dirList.treeList("filter", function (item) {
|
|
414
|
+
return $($(item.treeList.container).find('.red-ui-treeList-icon')).data("status") == "failed"
|
|
415
|
+
});
|
|
416
|
+
} else if (val == "is:passed" || val == "is:success") {
|
|
417
|
+
count = dirList.treeList("filter", function (item) {
|
|
418
|
+
return $($(item.treeList.container).find('.red-ui-treeList-icon')).data("status") == "success"
|
|
419
|
+
});
|
|
420
|
+
} else if (val == "is:untested") {
|
|
421
|
+
count = dirList.treeList("filter", function (item) {
|
|
422
|
+
return !$($(item.treeList.container).find('.red-ui-treeList-icon')).data("status")
|
|
423
|
+
});
|
|
424
|
+
} else if (val == "is:tested") {
|
|
425
|
+
count = dirList.treeList("filter", function (item) {
|
|
426
|
+
return !!$($(item.treeList.container).find('.red-ui-treeList-icon')).data("status")
|
|
427
|
+
});
|
|
428
|
+
} else {
|
|
429
|
+
count = dirList.treeList("filter", function (item) {
|
|
430
|
+
return item.label.toLowerCase().indexOf(val) > -1 || item.sublabel.toLowerCase().indexOf(val) > -1
|
|
431
|
+
});
|
|
432
|
+
}
|
|
404
433
|
search.searchBox("count", count + " / " + dirList.treeList("data").length);
|
|
405
434
|
}
|
|
406
435
|
}
|
|
@@ -547,8 +576,13 @@ RED.actions.add("unittesting:run-all-tests", () => { runAllTests(dirList) } )
|
|
|
547
576
|
</div>
|
|
548
577
|
</div>
|
|
549
578
|
|
|
579
|
+
<div class="form-row" id="unittesting-helper-import-text" +
|
|
580
|
+
style="margin-left: 10px; margin-top: 15px; display: none;">
|
|
581
|
+
<span>double click on a test case <b>to import that test case</b></span>
|
|
582
|
+
</div>
|
|
583
|
+
|
|
550
584
|
<div id="node-input-unittestingpull-testresults-row" class="form-row"
|
|
551
|
-
style="margin-left: 10px; margin-top:
|
|
585
|
+
style="margin-left: 10px; margin-top: 15px; display: none;">
|
|
552
586
|
Todo <span class="todo" style="color: purple">0</span>
|
|
553
587
|
/ Succeed <span class="success" style="color: green">0</span>
|
|
554
588
|
/ Pending <span class="pending" style="color: orange">0</span>
|