@gregoriusrippenstein/erlang-red-unittest 0.11.6 → 0.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gregoriusrippenstein/erlang-red-unittest",
3
- "version": "0.11.6",
3
+ "version": "0.12.0",
4
4
  "dependencies": {
5
5
  },
6
6
 
@@ -277,11 +277,18 @@ function testCurrentWorkspace() {
277
277
  }
278
278
  }
279
279
 
280
+ function triggerInjectsInWorkspace() {
281
+ // trigger all inject nodes but ignore disabled inject buttons - these show a warning if triggered
282
+ RED.notify("triggering all enabled inject nodes", { type: "info" });
283
+ RED.search.search("type:inject flow:current").map(d => d.node).filter(d => !d.d).forEach(d => RED.view.clickNodeButton(d))
284
+ }
285
+
280
286
  function sendUnittestngHalt() {
281
287
  $.get({
282
288
  url: `/UnitTesting/halt?cb=${new Date().getTime()}`
283
289
  }).done((resp) => {
284
290
  RED.notify(`Halt send successfully`, "success")
291
+ RED.nodes.dirty(true) // activate deploy button to save the flow to the server.
285
292
  }).fail((e) => {
286
293
  RED.notify("Failed to send halt command", "error")
287
294
  });
@@ -563,6 +570,7 @@ if (RED.comms.on) {
563
570
  RED.actions.add("unittesting:send-halt-to-test-server", sendUnittestngHalt)
564
571
  RED.actions.add("unittesting:test-current-workspace", testCurrentWorkspace)
565
572
  RED.actions.add("unittesting:run-all-tests", () => { runAllTests(dirList) } )
573
+ RED.actions.add("unittesting:trigger-injects-in-workspace", triggerInjectsInWorkspace)
566
574
 
567
575
  $('#node-input-unittestingpull-testresults-row').on('click', 'span.filtrg', (e) => {
568
576
  e.preventDefault();