@gregoriusrippenstein/erlang-red-unittest 0.10.3 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gregoriusrippenstein/erlang-red-unittest",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "dependencies": {
5
5
  },
6
6
 
@@ -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
 
@@ -381,6 +382,7 @@ var dirList = $("#node-input-unittestingpull-sb-target-container-div").css({
381
382
  if ( item.flowid) {
382
383
  $('#unittesting-view-testflow-link').prop('href', `https://flows.red-erik.org/f/${item.flowid}`)
383
384
  $('#unittesting-view-testflow-link').fadeIn(300)
385
+ $('#unittesting-helper-import-text').fadeIn(300)
384
386
  } else {
385
387
  $('#unittesting-view-testflow-link').fadeOut(300)
386
388
  $('#unittesting-view-testflow-link').prop('href', "")
@@ -388,6 +390,7 @@ var dirList = $("#node-input-unittestingpull-sb-target-container-div").css({
388
390
  }).on('treelistconfirm', function (event, item) {
389
391
  if (item.flowid) {
390
392
  doFlowImportForSidebarUnittesting(item.flowid)
393
+ $('#unittesting-helper-import-text').fadeOut(1000, () => { $('#unittesting-helper-import-text').remove() })
391
394
  }
392
395
  });
393
396
 
@@ -401,9 +404,32 @@ var search = $("#node-input-unittestingpull-sb-target-filter").searchBox({
401
404
  dirList.treeList("filter", null);
402
405
  search.searchBox("count", "");
403
406
  } else {
404
- var count = dirList.treeList("filter", function (item) {
405
- return item.label.toLowerCase().indexOf(val) > -1 || item.sublabel.toLowerCase().indexOf(val) > -1
406
- });
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
+ }
407
433
  search.searchBox("count", count + " / " + dirList.treeList("data").length);
408
434
  }
409
435
  }
@@ -550,8 +576,13 @@ RED.actions.add("unittesting:run-all-tests", () => { runAllTests(dirList) } )
550
576
  </div>
551
577
  </div>
552
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
+
553
584
  <div id="node-input-unittestingpull-testresults-row" class="form-row"
554
- style="margin-left: 10px; margin-top: 30px; display: none;">
585
+ style="margin-left: 10px; margin-top: 15px; display: none;">
555
586
  Todo <span class="todo" style="color: purple">0</span>
556
587
  / Succeed <span class="success" style="color: green">0</span>
557
588
  / Pending <span class="pending" style="color: orange">0</span>