File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 29
29
30
30
function invokeAction ( kind , opt ) {
31
31
return $ . ajax ( {
32
- url : "/ flow-tester/executeAction/" + kind ,
32
+ url : "flow-tester/executeAction/" + kind ,
33
33
type : "POST" ,
34
34
contentType : "application/json" ,
35
35
data : JSON . stringify ( opt )
Original file line number Diff line number Diff line change @@ -87,26 +87,35 @@ module.exports = (RED) => {
87
87
let promise = Promise . resolve ( null ) ;
88
88
switch ( kind ) {
89
89
case "init" :
90
+ // initialize runtime part of flow-tester plugin
90
91
promise = init ( ) ;
91
92
break ;
92
93
case "start" :
94
+ // waits for completion of tests
93
95
promise = start ( ) ;
94
96
break ;
95
97
case "cleanup" :
98
+ // cleanup runtime part of flow-tester plugin
96
99
promise = cleanup ( ) ;
97
100
break ;
98
101
case "send" :
102
+ // send a message to specified node
99
103
promise = executeSend ( opt . target , opt . value ) ;
100
104
break ;
101
105
case "matchInit" :
106
+ // register callback for checking output messages
102
107
promise = initMatch ( opt . node , opt . value ) ;
103
108
break ;
104
109
case "press" :
105
- case "match" :
110
+ // press the button of target node
106
111
case "recv" :
107
- case "set" :
112
+ // receive a message from input port
113
+ case "set" :
114
+ // set context or environment variable
108
115
case "wait" :
116
+ // wait for specified time
109
117
case "function" :
118
+ // execute JavaScript code
110
119
default :
111
120
console . log ( "unexpected action kind: " , kind ) ;
112
121
break ;
You can’t perform that action at this time.
0 commit comments