opengate-js 14.0.0 → 14.2.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.
Files changed (48) hide show
  1. package/bower.json +1 -1
  2. package/dist/{opengate-api-bower-14.0.0.js → opengate-api-bower-14.2.0.js} +26 -21
  3. package/dist/opengate-api-bower-14.2.0.js.map +1 -0
  4. package/dist/{opengate-api-bower-14.0.0.min.js → opengate-api-bower-14.2.0.min.js} +2 -2
  5. package/dist/{opengate-api-bower-14.0.0.min.js.map → opengate-api-bower-14.2.0.min.js.map} +1 -1
  6. package/dist/src/operations/OperationActions.js +2 -0
  7. package/dist/src/operations/OperationActions.js.map +1 -1
  8. package/dist/src/operations/catalog/BaseOperationBuilder.js +14 -11
  9. package/dist/src/operations/catalog/BaseOperationBuilder.js.map +1 -1
  10. package/dist/src/searching/StaticSearch.js +4 -4
  11. package/dist/src/searching/StaticSearch.js.map +1 -1
  12. package/docs/ast/source/operations/OperationActions.js.json +8300 -7782
  13. package/docs/ast/source/operations/catalog/BaseOperationBuilder.js.json +10013 -9786
  14. package/docs/ast/source/searching/StaticSearch.js.json +18177 -18127
  15. package/docs/class/src/operations/OperationActions.js~OperationActions.html +2 -2
  16. package/docs/class/src/operations/catalog/BaseOperationBuilder.js~BaseOperationBuilder.html +22 -15
  17. package/docs/coverage.json +1 -1
  18. package/docs/dump.json +1971 -1915
  19. package/docs/file/src/operations/OperationActions.js.html +2 -0
  20. package/docs/file/src/operations/catalog/BaseOperationBuilder.js.html +12 -11
  21. package/docs/file/src/searching/StaticSearch.js.html +4 -4
  22. package/docs/package.json +1 -1
  23. package/docs/source.html +240 -240
  24. package/features/features/provision/operations/actions_execution.feature +105 -52
  25. package/features/features/provision/operations/execute_operations.feature +152 -112
  26. package/features/features/provision/operations/execute_periodic_operations.feature +115 -64
  27. package/features/features/provision/operations/find_execution.feature +49 -11
  28. package/features/features/provision/operations/find_executions.feature +51 -11
  29. package/features/features/provision/operations/find_periodic_execution.feature +48 -11
  30. package/features/features/provision/operations/setting_up_period-each_operation.feature +88 -23
  31. package/features/features/provision/operations/update_periodic_operation.feature +88 -46
  32. package/features/features/provision/users/update_password.feature +0 -1
  33. package/features/features/provision/users/update_user.feature +0 -1
  34. package/features/features/searching/operations/searching_executions.feature +47 -7
  35. package/features/features/searching/operations/searching_periodic_operations.feature +51 -10
  36. package/features/step_definitions/given_step_definitions.js +12 -5
  37. package/features/step_definitions/then_step_definitions.js +44 -35
  38. package/features/step_definitions/when_step_definitions.js +16 -10
  39. package/features/support/create_provision_model.js +6 -0
  40. package/features/support/find_model.js +4 -0
  41. package/features/support/utils_model.js +26 -20
  42. package/features/support/world.js +2 -2
  43. package/package.json +1 -1
  44. package/src/operations/OperationActions.js +2 -0
  45. package/src/operations/catalog/BaseOperationBuilder.js +12 -11
  46. package/src/searching/StaticSearch.js +4 -4
  47. package/yarn-error.log +7437 -0
  48. package/dist/opengate-api-bower-14.0.0.js.map +0 -1
@@ -2,7 +2,6 @@
2
2
  @provision
3
3
  @operations
4
4
  @actions_execution
5
- @fail
6
5
  @urlParameters
7
6
 
8
7
  Feature: Execute actions on a particular execution
@@ -12,10 +11,8 @@ Feature: Execute actions on a particular execution
12
11
 
13
12
  Background:
14
13
  Given an apikey user by "require-real-apikey"
15
-
16
14
  @execution
17
-
18
- Scenario: Creating an organization to use in create device
15
+ Scenario: Precondition - Creating an organization to use in create device
19
16
  Given an ogapi "organizations builder" util
20
17
  Then I want to create an "organization"
21
18
  And the "name" "actions_execution_organization_10"
@@ -29,7 +26,44 @@ Feature: Execute actions on a particular execution
29
26
  Then I create it
30
27
  And response code should be: 201
31
28
 
32
- Scenario: I want to create an entity
29
+ Scenario: Precondition - Create and delete an user that does not exist
30
+ And an ogapi "users builder" util
31
+ And I want to create a "user"
32
+ And the "email" "ogux_ogapi@amplia.com"
33
+ And the "password" "Nvoiqewvouoiu32j@#!!"
34
+ And the "workgroup" "actions_execution_organization_10"
35
+ And the "domain" "actions_execution_organization_10"
36
+ And the "profile" "admin_domain"
37
+ And the "countryCode" "ES"
38
+ And the "langCode" "en"
39
+ And the "name" "test name"
40
+ And the "surname" "test surname"
41
+ And the "description" "user description"
42
+ Then I delete it
43
+ And I create it
44
+ Then response code should be: 201
45
+
46
+ Scenario: Precondition - I want to create an operation Type
47
+ Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
48
+ Given an ogapi "operation type" util with "actions_execution_organization_10"
49
+ Then I want to create an "operation type"
50
+ And the "name" "REFRESH_INFO_TEST"
51
+ And the "title" "Refresh Information"
52
+ And the "description" "On demand retrieving the Info"
53
+ And the "fromCatalog" "REFRESH_INFO"
54
+ Then I create it
55
+ And response code should be: 201
56
+ Given an ogapi "operation type" util with "actions_execution_organization_10"
57
+ Then I want to create an "operation type"
58
+ And the "name" "ADMINISTRATIVE_STATUS_CHANGE_TEST"
59
+ And the "title" "Administrative status change test"
60
+ And the "description" "Allows to change the administrative status of an entity"
61
+ And the "fromCatalog" "ADMINISTRATIVE_STATUS_CHANGE"
62
+ Then I create it
63
+ And response code should be: 201
64
+
65
+ Scenario: Precondition - I want to create an entity
66
+ Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
33
67
  Given the entity of type "devices builder" with "actions_execution_organization_10"
34
68
  And I get allowed Datastreams fields
35
69
  And I can found "provision.device.identifier" as datastream name
@@ -38,7 +72,7 @@ Feature: Execute actions on a particular execution
38
72
  | provision.administration.channel | simple | default_channel | |
39
73
  | provision.administration.organization | simple | actions_execution_organization_10 | |
40
74
  | provision.administration.serviceGroup | simple | emptyServiceGroup | |
41
- | provision.device.identifier | simple | actions_execution_device | |
75
+ | provision.device.identifier | simple | actions_execution_device_26 | |
42
76
  | provision.device.operationalStatus | simple | NORMAL | |
43
77
  | provision.device.administrativeState | simple | ACTIVE | |
44
78
 
@@ -46,13 +80,14 @@ Feature: Execute actions on a particular execution
46
80
  And response code should be: 201
47
81
 
48
82
  Scenario: Execute operation with default values and pause and active operation
49
- Given the operation by "REFRESH_INFO"
83
+ Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
84
+ Given the operation by "REFRESH_INFO_TEST"
50
85
  And the timeout by 30000
51
- And the job timeout by 5 minutes
86
+ And the job timeout by 300 seconds
52
87
  And execute in 10 minutes
53
88
  #And append entities by "{}" as filter with "entity.device" as resourceType
54
89
  And append entities by:
55
- | actions_execution_device |
90
+ | actions_execution_device_26 |
56
91
  When I build it
57
92
  And I execute it
58
93
  Then response code should be: 201
@@ -75,13 +110,14 @@ Feature: Execute actions on a particular execution
75
110
 
76
111
  @execution
77
112
  Scenario: Execute operation with default values and cancel execution
78
- Given the operation by "REFRESH_INFO"
113
+ Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
114
+ Given the operation by "REFRESH_INFO_TEST"
79
115
  And the timeout by 30000
80
- And the job timeout by 5 minutes
116
+ And the job timeout by 300 seconds
81
117
  And execute in 10 minutes
82
118
  #And append entities by "{}" as filter with "entity.device" as resourceType
83
119
  And append entities by:
84
- | actions_execution_device |
120
+ | actions_execution_device_26 |
85
121
  When I build it
86
122
  And I execute it
87
123
  Then response code should be: 201
@@ -94,18 +130,19 @@ Feature: Execute actions on a particular execution
94
130
  And an ogapi "operation finder" util
95
131
  And I want to read a "operation"
96
132
  When I try to find by operation's id
97
- Then I can see into the result an "operation status" as "CANCELLING"
133
+ Then I can see into the result an "operation status" as "CANCELLED"
98
134
 
99
135
  #http://cm.amplia.es/jira/browse/ODMQA-1064
100
136
  @ignore
101
137
  Scenario: Execute operation with default values and delayed and execute later
102
- Given the operation by "REFRESH_INFO"
138
+ Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
139
+ Given the operation by "REFRESH_INFO_TEST"
103
140
  And the timeout by 30000
104
- And the job timeout by 5 minutes
141
+ And the job timeout by 300 seconds
105
142
  And execute in 10 minutes
106
143
  #And append entities by "{}" as filter with "entity.device" as resourceType
107
144
  And append entities by:
108
- | actions_execution_device |
145
+ | actions_execution_device_26 |
109
146
  When I build it
110
147
  And I execute it
111
148
  Then response code should be: 201
@@ -114,7 +151,7 @@ Feature: Execute actions on a particular execution
114
151
  When I try to find by operation's id
115
152
  Then I can see into the result an "operation status" as "SCHEDULED"
116
153
  And an ogapi "operation actions" util with responseId
117
- And I want "execute later" 10 minutesa operation
154
+ And I want "execute later" 10 minutes operation
118
155
  And an ogapi "operation finder" util
119
156
  And I want to read a "operation"
120
157
  When I try to find by operation's id
@@ -123,9 +160,10 @@ Feature: Execute actions on a particular execution
123
160
  #http://cm.amplia.es/jira/browse/ODMQA-1064
124
161
  @ignore
125
162
  Scenario: Execute operation with default values and delayed and execute now
126
- Given the operation by "REFRESH_INFO"
163
+ Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
164
+ Given the operation by "REFRESH_INFO_TEST"
127
165
  And the timeout by 30000
128
- And the job timeout by 5 minutes
166
+ And the job timeout by 300 seconds
129
167
  And execute in 10 minutes
130
168
  And append entities by "{}" as filter with "entity.device" as resourceType
131
169
  #And append entities by:
@@ -148,9 +186,10 @@ Feature: Execute actions on a particular execution
148
186
  #http://cm.amplia.es/jira/browse/ODMQA-1065
149
187
  @ignore
150
188
  Scenario: Execute operation with default values and delayed and change callback
151
- Given the operation by "REFRESH_INFO"
189
+ Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
190
+ Given the operation by "REFRESH_INFO_TEST"
152
191
  And the timeout by 30000
153
- And the job timeout by 5 minutes
192
+ And the job timeout by 300 seconds
154
193
  And the callback by "http://change"
155
194
  And execute in 10 minutes
156
195
  And append entities by "{}" as filter with "entity.device" as resourceType
@@ -164,21 +203,23 @@ Feature: Execute actions on a particular execution
164
203
  When I try to find by operation's id
165
204
  Then I can see into the result an "operation status" as "SCHEDULED"
166
205
  And an ogapi "operation actions" util with responseId
167
- And I want "change callback" for this url "http://not_exists" for a operation
206
+ And I want "change callback" for this url "http://not_exists" for operation
168
207
  And an ogapi "operation finder" util
169
208
  And I want to read a "operation"
170
209
  When I try to find by operation's id
171
210
  Then I can see into the result an "operation status" as "SCHEDULED"
172
211
 
173
212
  @execution
213
+ @ignore
174
214
  Scenario: Execute operation with default values and pause and active an operation inmediatly
175
- Given the operation by "REFRESH_INFO"
215
+ Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
216
+ Given the operation by "REFRESH_INFO_TEST"
176
217
  And the timeout by 30000
177
- And the job timeout by 1 minutes
218
+ And the job timeout by 60 seconds
178
219
  And execute immediately
179
220
  #And append entities by "{}" as filter with "entity.device" as resourceType
180
221
  And append entities by:
181
- | actions_execution_device |
222
+ | actions_execution_device_26 |
182
223
  When I build it
183
224
  And I execute it
184
225
  Then response code should be: 201
@@ -201,59 +242,62 @@ Feature: Execute actions on a particular execution
201
242
 
202
243
  @execution
203
244
  Scenario: Execute operation with default values and pause and active an operation finished
204
- Given the operation by "REFRESH_INFO"
245
+ Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
246
+ Given the operation by "REFRESH_INFO_TEST"
205
247
  And the timeout by 30000
206
- And the job timeout by 1 minutes
248
+ And the job timeout by 60 seconds
207
249
  And execute immediately
208
250
  #And append entities by "{}" as filter with "entity.device" as resourceType
209
251
  And append entities by:
210
- | actions_execution_device |
252
+ | actions_execution_device_26 |
211
253
  When I build it
212
254
  And I execute it
213
255
  Then response code should be: 201
214
- And I wait 70 seconds
256
+ And I wait 55 seconds
215
257
  And an ogapi "operation finder" util
216
258
  And I want to read a "operation"
217
259
  When I try to find by operation's id
218
260
  Then I can see into the result an "operation status" as "FINISHED"
219
261
  And an ogapi "operation actions" util with responseId
220
262
  And I want "pause" a operation
221
- And throws an error equal to "Job state transition error"
263
+ And throws an error equal to "Job state transition error."
222
264
 
223
265
  @execution
224
266
  Scenario: Execute operation with default values and cancel an operation finished
225
- Given the operation by "REFRESH_INFO"
267
+ Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
268
+ Given the operation by "REFRESH_INFO_TEST"
226
269
  And the timeout by 30000
227
- And the job timeout by 1 minutes
270
+ And the job timeout by 60 seconds
228
271
  And execute immediately
229
272
  #And append entities by "{}" as filter with "entity.device" as resourceType
230
273
  And append entities by:
231
- | actions_execution_device |
274
+ | actions_execution_device_26 |
232
275
  When I build it
233
276
  And I execute it
234
277
  Then response code should be: 201
235
- And I wait 70 seconds
278
+ And I wait 55 seconds
236
279
  And an ogapi "operation finder" util
237
280
  And I want to read a "operation"
238
281
  When I try to find by operation's id
239
282
  Then I can see into the result an "operation status" as "FINISHED"
240
283
  And an ogapi "operation actions" util with responseId
241
284
  And I want "cancel" a operation
242
- And throws an error equal to "Job state transition error"
285
+ And throws an error equal to "Job state transition error."
243
286
 
244
287
  Scenario: Execute periodic operation every day and cancel
245
- Given the operation by "ADMINISTRATIVE_STATUS_CHANGE"
246
- And the notes by ""
288
+ Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
289
+ Given the operation by "ADMINISTRATIVE_STATUS_CHANGE_TEST"
247
290
  And the timeout by 120000
291
+ And the notes by ""
248
292
  And the ackTimeout by 0
249
293
  And the retries by 0
250
294
  And the retriesDelay by 0
251
- And parameter "admsts" by "inventado"
252
- And the job timeout by 5 minutes
295
+ And the parameters "{ \"admsts\" : \"ACTIVE\" }"
296
+ And the job timeout by 300 seconds
253
297
  And execute every day at "now"
254
298
  #And append entities by "{}" as filter with "entity.device" as resourceType
255
299
  And append entities by:
256
- | actions_execution_device |
300
+ | actions_execution_device_26 |
257
301
  When I build it
258
302
  And I execute it
259
303
  Then response code should be: 201
@@ -265,18 +309,19 @@ Feature: Execute actions on a particular execution
265
309
  Then response code should be: 404
266
310
 
267
311
  Scenario: Execute periodic operation every day and pause
268
- Given the operation by "ADMINISTRATIVE_STATUS_CHANGE"
312
+ Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
313
+ Given the operation by "ADMINISTRATIVE_STATUS_CHANGE_TEST"
269
314
  And the notes by ""
270
315
  And the timeout by 120000
271
316
  And the ackTimeout by 0
272
317
  And the retries by 0
273
318
  And the retriesDelay by 0
274
- And parameter "admsts" by "inventado"
275
- And the job timeout by 5 minutes
319
+ And the parameters "{ \"admsts\" : \"ACTIVE\" }"
320
+ And the job timeout by 300 seconds
276
321
  And execute every day at "now"
277
322
  #And append entities by "{}" as filter with "entity.device" as resourceType
278
323
  And append entities by:
279
- | actions_execution_device |
324
+ | actions_execution_device_26 |
280
325
  When I build it
281
326
  And I execute it
282
327
  Then response code should be: 201
@@ -290,18 +335,19 @@ Feature: Execute actions on a particular execution
290
335
  Then I can see into the result an "periodic status" as "INACTIVE"
291
336
 
292
337
  Scenario: Execute periodic operation every day and pause and active
293
- Given the operation by "ADMINISTRATIVE_STATUS_CHANGE"
338
+ Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
339
+ Given the operation by "ADMINISTRATIVE_STATUS_CHANGE_TEST"
294
340
  And the notes by ""
295
341
  And the timeout by 120000
296
342
  And the ackTimeout by 0
297
343
  And the retries by 0
298
344
  And the retriesDelay by 0
299
- And parameter "admsts" by "inventado"
300
- And the job timeout by 5 minutes
345
+ And the parameters "{ \"admsts\" : \"ACTIVE\" }"
346
+ And the job timeout by 300 seconds
301
347
  And execute every day at "now"
302
348
  #And append entities by "{}" as filter with "entity.device" as resourceType
303
349
  And append entities by:
304
- | actions_execution_device |
350
+ | actions_execution_device_26 |
305
351
  When I build it
306
352
  And I execute it
307
353
  Then response code should be: 201
@@ -323,17 +369,24 @@ Feature: Execute actions on a particular execution
323
369
  Then I can see into the result an "periodic status" as "ACTIVE"
324
370
 
325
371
 
326
- Scenario: I want to delete the entity
327
- Given the entity of type "devices builder" with "base_organization"
372
+ Scenario: Postcondition - I want to delete the entity
373
+ Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
374
+ Given the entity of type "devices builder" with "actions_execution_organization_10"
328
375
  And I get allowed Datastreams fields
329
376
  And I can found "provision.device.identifier" as datastream name
330
377
  When I try to define the entity with...
331
378
  | datastream | typeFunction | value | parent |
332
- | provision.device.identifier | simple | actions_execution_device | |
379
+ | provision.device.identifier | simple | actions_execution_device_26 | |
333
380
  And I delete it
334
381
  Then response code should be: 200
335
382
 
336
- Scenario: Deleting an organization
383
+ Scenario: Postcondition - Deleting an user
384
+ Given an ogapi "users builder" util
385
+ Then I want to delete a "user"
386
+ And the "email" "ogux_ogapi@amplia.com"
387
+ Then I delete it
388
+
389
+ Scenario: Postcondition - Deleting an organization
337
390
  Given an ogapi "organizations builder" util
338
391
  Then I want to delete an "organization"
339
392
  And the "name" "actions_execution_organization_10"