@@ -9,6 +9,8 @@ describe('<Automations> Basic', function() {
99 const FLOW_NAME = 'FlowName'
1010 const FLOW_ID = 'FlowID'
1111 const EXECUTION_ID = 'ExecutionID'
12+ const EXECUTION_ANY = 'activateAny'
13+ const EXECUTION_ALL = 'activateAll'
1214 const TRIGGER_NAME = 'TriggerName'
1315 const TRIGGER_ID = 'TriggerID'
1416
@@ -200,10 +202,14 @@ describe('<Automations> Basic', function() {
200202 const req1 = prepareMockRequest ( )
201203 const req2 = prepareMockRequest ( )
202204 const req3 = prepareMockRequest ( )
205+ const req4 = prepareMockRequest ( )
206+ const req5 = prepareMockRequest ( )
203207
204208 await Backendless . Automations . activateFlowTriggerById ( FLOW_ID , TRIGGER_ID )
205209 await Backendless . Automations . activateFlowTriggerById ( FLOW_ID , TRIGGER_ID , { name : 'Nick' } )
206210 await Backendless . Automations . activateFlowTriggerById ( FLOW_ID , TRIGGER_ID , { name : 'Nick' } , EXECUTION_ID )
211+ await Backendless . Automations . activateFlowTriggerById ( FLOW_ID , TRIGGER_ID , { name : 'Nick' } , EXECUTION_ANY )
212+ await Backendless . Automations . activateFlowTriggerById ( FLOW_ID , TRIGGER_ID , { name : 'Nick' } , EXECUTION_ALL )
207213
208214 expect ( req1 ) . to . deep . include ( {
209215 method : 'POST' ,
@@ -227,6 +233,22 @@ describe('<Automations> Basic', function() {
227233 }
228234 } )
229235
236+ expect ( req4 ) . to . deep . include ( {
237+ method : 'POST' ,
238+ path : `${ APP_PATH } /automation/flow/${ FLOW_ID } /trigger/${ TRIGGER_ID } /activate?activateAny=true` ,
239+ body : {
240+ name : 'Nick' ,
241+ }
242+ } )
243+
244+ expect ( req5 ) . to . deep . include ( {
245+ method : 'POST' ,
246+ path : `${ APP_PATH } /automation/flow/${ FLOW_ID } /trigger/${ TRIGGER_ID } /activate?activateAll=true` ,
247+ body : {
248+ name : 'Nick' ,
249+ }
250+ } )
251+
230252 } )
231253
232254 it ( 'fails when flow id is invalid' , async ( ) => {
@@ -276,7 +298,8 @@ describe('<Automations> Basic', function() {
276298 } )
277299
278300 it ( 'fails when execution id is invalid' , async ( ) => {
279- const errorMsg = 'The "executionId" argument must be a non-empty string.'
301+ // eslint-disable-next-line
302+ const errorMsg = 'The "execution" argument must be a non-empty string and must be one of this values: "activateAny", "activateAll" or Execution ID.'
280303
281304 await expect ( Backendless . Automations . activateFlowTriggerById ( FLOW_ID , TRIGGER_ID , { } , null ) ) . to . eventually . be . rejectedWith ( errorMsg )
282305 await expect ( Backendless . Automations . activateFlowTriggerById ( FLOW_ID , TRIGGER_ID , { } , true ) ) . to . eventually . be . rejectedWith ( errorMsg )
0 commit comments