Pass complete status to Status node and filter to editor

This commit is contained in:
Nick O'Leary
2019-03-04 10:23:10 +00:00
parent 8f61a0d258
commit 8fb6bc059e
4 changed files with 21 additions and 13 deletions

View File

@@ -64,11 +64,14 @@ describe("runtime-api/comms", function() {
eventHandlers.should.have.property('node-status');
eventHandlers['node-status']({
id: "my-event",
status: "my-status"
status: {text:"my-status",badProperty:"should be filtered"}
})
messages.should.have.length(1);
messages[0].should.have.property("topic","status/my-event");
messages[0].should.have.property("data","my-status")
messages[0].should.have.property("data");
messages[0].data.should.have.property("text","my-status");
messages[0].data.should.not.have.property("badProperty");
})
it('comms events',function(){
eventHandlers.should.have.property('runtime-event');

View File

@@ -498,7 +498,7 @@ describe('Flow', function() {
Object.keys(activeNodes).should.have.length(5);
flow.handleStatus(config.flows["t1"].nodes["1"],{text:"my-status"});
flow.handleStatus(config.flows["t1"].nodes["1"],{text:"my-status",random:"otherProperty"});
currentNodes["sn"].should.have.a.property("handled",1);
var statusMessage = currentNodes["sn"].messages[0];
@@ -515,6 +515,7 @@ describe('Flow', function() {
statusMessage.should.have.a.property("status");
statusMessage.status.should.have.a.property("text","my-status");
statusMessage.status.should.have.a.property("random","otherProperty");
statusMessage.status.should.have.a.property("source");
statusMessage.status.source.should.have.a.property("id","1");
statusMessage.status.source.should.have.a.property("type","test");