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.
- package/bower.json +1 -1
- package/dist/{opengate-api-bower-14.0.0.js → opengate-api-bower-14.2.0.js} +26 -21
- package/dist/opengate-api-bower-14.2.0.js.map +1 -0
- package/dist/{opengate-api-bower-14.0.0.min.js → opengate-api-bower-14.2.0.min.js} +2 -2
- package/dist/{opengate-api-bower-14.0.0.min.js.map → opengate-api-bower-14.2.0.min.js.map} +1 -1
- package/dist/src/operations/OperationActions.js +2 -0
- package/dist/src/operations/OperationActions.js.map +1 -1
- package/dist/src/operations/catalog/BaseOperationBuilder.js +14 -11
- package/dist/src/operations/catalog/BaseOperationBuilder.js.map +1 -1
- package/dist/src/searching/StaticSearch.js +4 -4
- package/dist/src/searching/StaticSearch.js.map +1 -1
- package/docs/ast/source/operations/OperationActions.js.json +8300 -7782
- package/docs/ast/source/operations/catalog/BaseOperationBuilder.js.json +10013 -9786
- package/docs/ast/source/searching/StaticSearch.js.json +18177 -18127
- package/docs/class/src/operations/OperationActions.js~OperationActions.html +2 -2
- package/docs/class/src/operations/catalog/BaseOperationBuilder.js~BaseOperationBuilder.html +22 -15
- package/docs/coverage.json +1 -1
- package/docs/dump.json +1971 -1915
- package/docs/file/src/operations/OperationActions.js.html +2 -0
- package/docs/file/src/operations/catalog/BaseOperationBuilder.js.html +12 -11
- package/docs/file/src/searching/StaticSearch.js.html +4 -4
- package/docs/package.json +1 -1
- package/docs/source.html +240 -240
- package/features/features/provision/operations/actions_execution.feature +105 -52
- package/features/features/provision/operations/execute_operations.feature +152 -112
- package/features/features/provision/operations/execute_periodic_operations.feature +115 -64
- package/features/features/provision/operations/find_execution.feature +49 -11
- package/features/features/provision/operations/find_executions.feature +51 -11
- package/features/features/provision/operations/find_periodic_execution.feature +48 -11
- package/features/features/provision/operations/setting_up_period-each_operation.feature +88 -23
- package/features/features/provision/operations/update_periodic_operation.feature +88 -46
- package/features/features/provision/users/update_password.feature +0 -1
- package/features/features/provision/users/update_user.feature +0 -1
- package/features/features/searching/operations/searching_executions.feature +47 -7
- package/features/features/searching/operations/searching_periodic_operations.feature +51 -10
- package/features/step_definitions/given_step_definitions.js +12 -5
- package/features/step_definitions/then_step_definitions.js +44 -35
- package/features/step_definitions/when_step_definitions.js +16 -10
- package/features/support/create_provision_model.js +6 -0
- package/features/support/find_model.js +4 -0
- package/features/support/utils_model.js +26 -20
- package/features/support/world.js +2 -2
- package/package.json +1 -1
- package/src/operations/OperationActions.js +2 -0
- package/src/operations/catalog/BaseOperationBuilder.js +12 -11
- package/src/searching/StaticSearch.js +4 -4
- package/yarn-error.log +7437 -0
- package/dist/opengate-api-bower-14.0.0.js.map +0 -1
|
@@ -12,7 +12,7 @@ Feature: Update periodic operation
|
|
|
12
12
|
Background:
|
|
13
13
|
Given an apikey user by "require-real-apikey"
|
|
14
14
|
|
|
15
|
-
Scenario: Creating an organization to use in create device
|
|
15
|
+
Scenario: Precondition - Creating an organization to use in create device
|
|
16
16
|
Given an ogapi "organizations builder" util
|
|
17
17
|
Then I want to create an "organization"
|
|
18
18
|
And the "name" "fupdate_periodic_organization_10"
|
|
@@ -26,7 +26,36 @@ Feature: Update periodic operation
|
|
|
26
26
|
Then I create it
|
|
27
27
|
And response code should be: 201
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Scenario: Precondition - Create and delete an user that does not exist
|
|
30
|
+
Given an apikey user by "1e0a6fa7-d770-4072-ab4e-f98581522a65"
|
|
31
|
+
And an ogapi "users builder" util
|
|
32
|
+
And I want to create a "user"
|
|
33
|
+
And the "email" "ogux_ogapi@amplia.com"
|
|
34
|
+
And the "password" "Nvoiqewvouoiu32j@#!!"
|
|
35
|
+
And the "workgroup" "fupdate_periodic_organization_10"
|
|
36
|
+
And the "domain" "fupdate_periodic_organization_10"
|
|
37
|
+
And the "profile" "admin_domain"
|
|
38
|
+
And the "countryCode" "ES"
|
|
39
|
+
And the "langCode" "en"
|
|
40
|
+
And the "name" "test name"
|
|
41
|
+
And the "surname" "test surname"
|
|
42
|
+
And the "description" "user description"
|
|
43
|
+
Then I delete it
|
|
44
|
+
And I create it
|
|
45
|
+
Then response code should be: 201
|
|
46
|
+
|
|
47
|
+
Scenario: Precondition - I want to create an operation Type
|
|
48
|
+
Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
|
|
49
|
+
Given an ogapi "operation type" util with "fupdate_periodic_organization_10"
|
|
50
|
+
Then I want to create an "operation type"
|
|
51
|
+
And the "name" "ADMINISTRATIVE_STATUS_CHANGE_TEST"
|
|
52
|
+
And the "title" "Administrative status change test"
|
|
53
|
+
And the "description" "Allows to change the administrative status of an entity"
|
|
54
|
+
And the "fromCatalog" "ADMINISTRATIVE_STATUS_CHANGE"
|
|
55
|
+
Then I create it
|
|
56
|
+
And response code should be: 201
|
|
57
|
+
|
|
58
|
+
Scenario: Precondition - I want to create an entity
|
|
30
59
|
Given the entity of type "devices builder" with "fupdate_periodic_organization_10"
|
|
31
60
|
And I get allowed Datastreams fields
|
|
32
61
|
And I can found "provision.device.identifier" as datastream name
|
|
@@ -43,14 +72,15 @@ Feature: Update periodic operation
|
|
|
43
72
|
And response code should be: 201
|
|
44
73
|
|
|
45
74
|
Scenario: Execute periodic operation every day, and change time
|
|
46
|
-
Given
|
|
75
|
+
Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
|
|
76
|
+
Given the operation by "ADMINISTRATIVE_STATUS_CHANGE_TEST"
|
|
47
77
|
And the notes by ""
|
|
48
78
|
And the timeout by 120000
|
|
49
79
|
And the ackTimeout by 0
|
|
50
80
|
And the retries by 0
|
|
51
81
|
And the retriesDelay by 0
|
|
52
|
-
And
|
|
53
|
-
And the job timeout by
|
|
82
|
+
And the parameters "{ \"admsts\" : \"ACTIVE\" }"
|
|
83
|
+
And the job timeout by 300 seconds
|
|
54
84
|
And execute every day at "now"
|
|
55
85
|
And append entities by:
|
|
56
86
|
| update_periodic_device |
|
|
@@ -71,20 +101,21 @@ Feature: Update periodic operation
|
|
|
71
101
|
And an ogapi "operation finder" util
|
|
72
102
|
And I want to read a "periodicity"
|
|
73
103
|
When I try to find by operation's id
|
|
74
|
-
Then I can see into the result an "periodic schedule" as
|
|
104
|
+
Then I can see into the result an "periodic schedule - repeating" as
|
|
75
105
|
"""
|
|
76
|
-
{"
|
|
106
|
+
{"period":null,"pattern":{"time":"22:44:13+01:00","definedPatternNumber":0}}
|
|
77
107
|
"""
|
|
78
108
|
|
|
79
109
|
Scenario: Execute periodic operation every week, and change time
|
|
80
|
-
Given
|
|
110
|
+
Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
|
|
111
|
+
Given the operation by "ADMINISTRATIVE_STATUS_CHANGE_TEST"
|
|
81
112
|
And the notes by ""
|
|
82
113
|
And the timeout by 120000
|
|
83
114
|
And the ackTimeout by 0
|
|
84
115
|
And the retries by 0
|
|
85
116
|
And the retriesDelay by 0
|
|
86
|
-
And
|
|
87
|
-
And the job timeout by
|
|
117
|
+
And the parameters "{ \"admsts\" : \"ACTIVE\" }"
|
|
118
|
+
And the job timeout by 300 seconds
|
|
88
119
|
And execute every day at "now"
|
|
89
120
|
And append entities by "{}" as filter with "entity.device" as resourceType
|
|
90
121
|
When I build it
|
|
@@ -106,9 +137,9 @@ Feature: Update periodic operation
|
|
|
106
137
|
And an ogapi "operation finder" util
|
|
107
138
|
And I want to read a "periodicity"
|
|
108
139
|
When I try to find by operation's id
|
|
109
|
-
Then I can see into the result an "periodic schedule" as
|
|
140
|
+
Then I can see into the result an "periodic schedule - repeating" as
|
|
110
141
|
"""
|
|
111
|
-
{"
|
|
142
|
+
{"period":null,"pattern":{"time":"22:44:13+01:00","weekly":{"days":["MON","WED","FRI"]},"definedPatternNumber":1}}
|
|
112
143
|
"""
|
|
113
144
|
When I try to find an operation for its id of periodicity and save its id
|
|
114
145
|
And an update periodicity by operation's id
|
|
@@ -122,20 +153,21 @@ Feature: Update periodic operation
|
|
|
122
153
|
And an ogapi "operation finder" util
|
|
123
154
|
And I want to read a "periodicity"
|
|
124
155
|
When I try to find by operation's id
|
|
125
|
-
Then I can see into the result an "periodic schedule" as
|
|
156
|
+
Then I can see into the result an "periodic schedule - repeating - weekly" as
|
|
126
157
|
"""
|
|
127
|
-
{"
|
|
158
|
+
{"days":["FRI","SUN"]}
|
|
128
159
|
"""
|
|
129
160
|
|
|
130
161
|
Scenario: Execute periodic operation every month, and change time
|
|
131
|
-
Given
|
|
162
|
+
Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
|
|
163
|
+
Given the operation by "ADMINISTRATIVE_STATUS_CHANGE_TEST"
|
|
132
164
|
And the notes by ""
|
|
133
165
|
And the timeout by 120000
|
|
134
166
|
And the ackTimeout by 0
|
|
135
167
|
And the retries by 0
|
|
136
168
|
And the retriesDelay by 0
|
|
137
|
-
And
|
|
138
|
-
And the job timeout by
|
|
169
|
+
And the parameters "{ \"admsts\" : \"ACTIVE\" }"
|
|
170
|
+
And the job timeout by 300 seconds
|
|
139
171
|
And execute every day at "now"
|
|
140
172
|
And append entities by "{}" as filter with "entity.device" as resourceType
|
|
141
173
|
When I build it
|
|
@@ -158,9 +190,9 @@ Feature: Update periodic operation
|
|
|
158
190
|
And an ogapi "operation finder" util
|
|
159
191
|
And I want to read a "periodicity"
|
|
160
192
|
When I try to find by operation's id
|
|
161
|
-
Then I can see into the result an "periodic schedule" as
|
|
193
|
+
Then I can see into the result an "periodic schedule - repeating" as
|
|
162
194
|
"""
|
|
163
|
-
{"
|
|
195
|
+
{"period":null,"pattern":{"time":"22:44:13+01:00","monthly":{"day":3,"months":["JAN","MAR","MAY"]},"definedPatternNumber":1}}
|
|
164
196
|
"""
|
|
165
197
|
|
|
166
198
|
When I try to find an operation for its id of periodicity and save its id
|
|
@@ -176,9 +208,9 @@ Feature: Update periodic operation
|
|
|
176
208
|
And an ogapi "operation finder" util
|
|
177
209
|
And I want to read a "periodicity"
|
|
178
210
|
When I try to find by operation's id
|
|
179
|
-
Then I can see into the result an "periodic schedule" as
|
|
211
|
+
Then I can see into the result an "periodic schedule - repeating" as
|
|
180
212
|
"""
|
|
181
|
-
{"
|
|
213
|
+
{"period":null,"pattern":{"time":"22:44:13+01:00","monthly":{"day":3,"months":["FEB","APR","JUN"]},"definedPatternNumber":1}}
|
|
182
214
|
"""
|
|
183
215
|
|
|
184
216
|
When I try to find an operation for its id of periodicity and save its id
|
|
@@ -191,9 +223,9 @@ Feature: Update periodic operation
|
|
|
191
223
|
And an ogapi "operation finder" util
|
|
192
224
|
And I want to read a "periodicity"
|
|
193
225
|
When I try to find by operation's id
|
|
194
|
-
Then I can see into the result an "periodic schedule" as
|
|
226
|
+
Then I can see into the result an "periodic schedule - repeating" as
|
|
195
227
|
"""
|
|
196
|
-
{"
|
|
228
|
+
{"period":null,"pattern":{"time":"22:44:13+01:00","monthly":{"day":5,"months":["FEB","APR","JUN"]},"definedPatternNumber":1}}
|
|
197
229
|
"""
|
|
198
230
|
|
|
199
231
|
When I try to find an operation for its id of periodicity and save its id
|
|
@@ -209,9 +241,9 @@ Feature: Update periodic operation
|
|
|
209
241
|
And an ogapi "operation finder" util
|
|
210
242
|
And I want to read a "periodicity"
|
|
211
243
|
When I try to find by operation's id
|
|
212
|
-
Then I can see into the result an "periodic schedule" as
|
|
244
|
+
Then I can see into the result an "periodic schedule - repeating - monthly" as
|
|
213
245
|
"""
|
|
214
|
-
{"
|
|
246
|
+
{"day":29,"months":["DEC","OCT","AUG"]}
|
|
215
247
|
"""
|
|
216
248
|
|
|
217
249
|
When I try to find an operation for its id of periodicity and save its id
|
|
@@ -224,9 +256,9 @@ Feature: Update periodic operation
|
|
|
224
256
|
And an ogapi "operation finder" util
|
|
225
257
|
And I want to read a "periodicity"
|
|
226
258
|
When I try to find by operation's id
|
|
227
|
-
Then I can see into the result an "periodic schedule" as
|
|
259
|
+
Then I can see into the result an "periodic schedule - repeating - monthly" as
|
|
228
260
|
"""
|
|
229
|
-
{"
|
|
261
|
+
{"day":18,"months":["DEC","OCT","AUG"]}
|
|
230
262
|
"""
|
|
231
263
|
|
|
232
264
|
When I try to find an operation for its id of periodicity and save its id
|
|
@@ -242,20 +274,21 @@ Feature: Update periodic operation
|
|
|
242
274
|
And an ogapi "operation finder" util
|
|
243
275
|
And I want to read a "periodicity"
|
|
244
276
|
When I try to find by operation's id
|
|
245
|
-
Then I can see into the result an "periodic schedule" as
|
|
277
|
+
Then I can see into the result an "periodic schedule - repeating - monthly" as
|
|
246
278
|
"""
|
|
247
|
-
{"
|
|
279
|
+
{"day":18,"months":["NOV","SEP","JUL"]}
|
|
248
280
|
"""
|
|
249
281
|
|
|
250
282
|
Scenario: Execute periodic operation every year, and change time
|
|
251
|
-
Given
|
|
283
|
+
Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
|
|
284
|
+
Given the operation by "ADMINISTRATIVE_STATUS_CHANGE_TEST"
|
|
252
285
|
And the notes by ""
|
|
253
286
|
And the timeout by 120000
|
|
254
287
|
And the ackTimeout by 0
|
|
255
288
|
And the retries by 0
|
|
256
289
|
And the retriesDelay by 0
|
|
257
|
-
And
|
|
258
|
-
And the job timeout by
|
|
290
|
+
And the parameters "{ \"admsts\" : \"ACTIVE\" }"
|
|
291
|
+
And the job timeout by 300 seconds
|
|
259
292
|
And execute every day at "now"
|
|
260
293
|
And append entities by "{}" as filter with "entity.device" as resourceType
|
|
261
294
|
When I build it
|
|
@@ -274,9 +307,9 @@ Feature: Update periodic operation
|
|
|
274
307
|
And an ogapi "operation finder" util
|
|
275
308
|
And I want to read a "periodicity"
|
|
276
309
|
When I try to find by operation's id
|
|
277
|
-
Then I can see into the result an "periodic schedule" as
|
|
310
|
+
Then I can see into the result an "periodic schedule - repeating" as
|
|
278
311
|
"""
|
|
279
|
-
{"
|
|
312
|
+
{"period":null,"pattern":{"time":"22:44:13+01:00","yearly":{"day":4,"month":"JAN"},"definedPatternNumber":1}}
|
|
280
313
|
"""
|
|
281
314
|
|
|
282
315
|
When I try to find an operation for its id of periodicity and save its id
|
|
@@ -289,9 +322,9 @@ Feature: Update periodic operation
|
|
|
289
322
|
And an ogapi "operation finder" util
|
|
290
323
|
And I want to read a "periodicity"
|
|
291
324
|
When I try to find by operation's id
|
|
292
|
-
Then I can see into the result an "periodic schedule" as
|
|
325
|
+
Then I can see into the result an "periodic schedule - repeating" as
|
|
293
326
|
"""
|
|
294
|
-
{"
|
|
327
|
+
{"period":null,"pattern":{"time":"22:44:13+01:00","yearly":{"day":4,"month":"FEB"},"definedPatternNumber":1}}
|
|
295
328
|
"""
|
|
296
329
|
|
|
297
330
|
When I try to find an operation for its id of periodicity and save its id
|
|
@@ -304,9 +337,9 @@ Feature: Update periodic operation
|
|
|
304
337
|
And an ogapi "operation finder" util
|
|
305
338
|
And I want to read a "periodicity"
|
|
306
339
|
When I try to find by operation's id
|
|
307
|
-
Then I can see into the result an "periodic schedule" as
|
|
340
|
+
Then I can see into the result an "periodic schedule - repeating" as
|
|
308
341
|
"""
|
|
309
|
-
{"
|
|
342
|
+
{"period":null,"pattern":{"time":"22:44:13+01:00","yearly":{"day":5,"month":"FEB"},"definedPatternNumber":1}}
|
|
310
343
|
"""
|
|
311
344
|
|
|
312
345
|
When I try to find an operation for its id of periodicity and save its id
|
|
@@ -319,9 +352,9 @@ Feature: Update periodic operation
|
|
|
319
352
|
And an ogapi "operation finder" util
|
|
320
353
|
And I want to read a "periodicity"
|
|
321
354
|
When I try to find by operation's id
|
|
322
|
-
Then I can see into the result an "periodic schedule" as
|
|
355
|
+
Then I can see into the result an "periodic schedule - repeating - yearly" as
|
|
323
356
|
"""
|
|
324
|
-
{"
|
|
357
|
+
{"day":29,"month":"MAR"}
|
|
325
358
|
"""
|
|
326
359
|
|
|
327
360
|
When I try to find an operation for its id of periodicity and save its id
|
|
@@ -334,9 +367,9 @@ Feature: Update periodic operation
|
|
|
334
367
|
And an ogapi "operation finder" util
|
|
335
368
|
And I want to read a "periodicity"
|
|
336
369
|
When I try to find by operation's id
|
|
337
|
-
Then I can see into the result an "periodic schedule" as
|
|
370
|
+
Then I can see into the result an "periodic schedule - repeating - yearly" as
|
|
338
371
|
"""
|
|
339
|
-
{"
|
|
372
|
+
{"day":18,"month":"MAR"}
|
|
340
373
|
"""
|
|
341
374
|
|
|
342
375
|
When I try to find an operation for its id of periodicity and save its id
|
|
@@ -349,13 +382,13 @@ Feature: Update periodic operation
|
|
|
349
382
|
And an ogapi "operation finder" util
|
|
350
383
|
And I want to read a "periodicity"
|
|
351
384
|
When I try to find by operation's id
|
|
352
|
-
Then I can see into the result an "periodic schedule" as
|
|
385
|
+
Then I can see into the result an "periodic schedule - repeating - yearly" as
|
|
353
386
|
"""
|
|
354
|
-
{"
|
|
387
|
+
{"day":18,"month":"APR"}
|
|
355
388
|
"""
|
|
356
389
|
|
|
357
390
|
|
|
358
|
-
Scenario: I want to delete the entity
|
|
391
|
+
Scenario: Postcondition : I want to delete the entity
|
|
359
392
|
Given the entity of type "devices builder" with "fupdate_periodic_organization_10"
|
|
360
393
|
And I get allowed Datastreams fields
|
|
361
394
|
And I can found "provision.device.identifier" as datastream name
|
|
@@ -365,7 +398,16 @@ Feature: Update periodic operation
|
|
|
365
398
|
And I delete it
|
|
366
399
|
Then response code should be: 200
|
|
367
400
|
|
|
368
|
-
|
|
401
|
+
|
|
402
|
+
Scenario: Postcondition - Deleting an user
|
|
403
|
+
Given an apikey user by "1e0a6fa7-d770-4072-ab4e-f98581522a65"
|
|
404
|
+
Given an ogapi "users builder" util
|
|
405
|
+
Then I want to delete a "user"
|
|
406
|
+
And the "email" "ogux_ogapi@amplia.com"
|
|
407
|
+
Then I delete it
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
Scenario: Postcondition : Deleting an organization
|
|
369
411
|
Given an ogapi "organizations builder" util
|
|
370
412
|
Then I want to delete an "organization"
|
|
371
413
|
And the "name" "fupdate_periodic_organization_10"
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@operations
|
|
4
4
|
@searching
|
|
5
5
|
@searching_executions
|
|
6
|
+
|
|
6
7
|
Feature: Searching operation's executions
|
|
7
8
|
As a user of JsApi
|
|
8
9
|
I want to search operation's executions
|
|
@@ -10,7 +11,7 @@ I want to search operation's executions
|
|
|
10
11
|
Background:
|
|
11
12
|
Given an apikey user by "require-real-apikey"
|
|
12
13
|
|
|
13
|
-
Scenario: Creating an organization to use in create device
|
|
14
|
+
Scenario: Precondition - Creating an organization to use in create device
|
|
14
15
|
Given an ogapi "organizations builder" util
|
|
15
16
|
Then I want to create an "organization"
|
|
16
17
|
And the "name" "executions_organization"
|
|
@@ -24,7 +25,37 @@ I want to search operation's executions
|
|
|
24
25
|
And I create it
|
|
25
26
|
And response code should be: 201
|
|
26
27
|
|
|
27
|
-
Scenario:
|
|
28
|
+
Scenario: Precondition - Create and delete an user that does not exist
|
|
29
|
+
And an ogapi "users builder" util
|
|
30
|
+
And I want to create a "user"
|
|
31
|
+
And the "email" "ogux_ogapi@amplia.com"
|
|
32
|
+
And the "password" "Nvoiqewvouoiu32j@#!!"
|
|
33
|
+
And the "workgroup" "executions_organization"
|
|
34
|
+
And the "domain" "executions_organization"
|
|
35
|
+
And the "profile" "admin_domain"
|
|
36
|
+
And the "countryCode" "ES"
|
|
37
|
+
And the "langCode" "en"
|
|
38
|
+
And the "name" "test name"
|
|
39
|
+
And the "surname" "test surname"
|
|
40
|
+
And the "description" "user description"
|
|
41
|
+
Then I delete it
|
|
42
|
+
And I create it
|
|
43
|
+
Then response code should be: 201
|
|
44
|
+
|
|
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 "executions_organization"
|
|
49
|
+
Then I want to create an "operation type"
|
|
50
|
+
And the "name" "ADMINISTRATIVE_STATUS_CHANGE_TEST"
|
|
51
|
+
And the "title" "Administrative status change test"
|
|
52
|
+
And the "description" "Allows to change the administrative status of an entity"
|
|
53
|
+
And the "fromCatalog" "ADMINISTRATIVE_STATUS_CHANGE"
|
|
54
|
+
Then I create it
|
|
55
|
+
And response code should be: 201
|
|
56
|
+
|
|
57
|
+
Scenario: Precondition - I want to create the entity
|
|
58
|
+
Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
|
|
28
59
|
Given the entity of type "devices builder" with "executions_organization"
|
|
29
60
|
Then I get allowed Datastreams fields
|
|
30
61
|
And I can found "provision.device.identifier" as datastream name
|
|
@@ -46,14 +77,15 @@ I want to search operation's executions
|
|
|
46
77
|
#http://cm.amplia.es/jira/browse/OUW-528
|
|
47
78
|
@OUW-528
|
|
48
79
|
Scenario: Execute operation with default values and find execution
|
|
49
|
-
Given
|
|
80
|
+
Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
|
|
81
|
+
Given the operation by "ADMINISTRATIVE_STATUS_CHANGE_TEST"
|
|
50
82
|
And the notes by ""
|
|
51
83
|
And the timeout by 120000
|
|
52
84
|
And the ackTimeout by 0
|
|
53
85
|
And the retries by 0
|
|
54
86
|
And the retriesDelay by 0
|
|
55
|
-
And
|
|
56
|
-
And the job timeout by
|
|
87
|
+
And the parameters "{ \"admsts\" : \"ACTIVE\" }"
|
|
88
|
+
And the job timeout by 300 seconds
|
|
57
89
|
And execute immediately
|
|
58
90
|
#And append entities by "" as tag
|
|
59
91
|
#And append entities by "{}" as filter with "enntity.device" as resourceType
|
|
@@ -71,7 +103,8 @@ I want to search operation's executions
|
|
|
71
103
|
Then response code should be: 200
|
|
72
104
|
|
|
73
105
|
|
|
74
|
-
Scenario: I want to delete the entity
|
|
106
|
+
Scenario: Postcondition - I want to delete the entity
|
|
107
|
+
Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
|
|
75
108
|
Given the entity of type "devices builder" with "executions_organization"
|
|
76
109
|
When I try to define the entity with...
|
|
77
110
|
| datastream | typeFunction | value | parent |
|
|
@@ -80,7 +113,14 @@ I want to search operation's executions
|
|
|
80
113
|
| provision.device.identifier | simple | device_executions_tests | |
|
|
81
114
|
Then I delete it
|
|
82
115
|
|
|
83
|
-
Scenario: Deleting an
|
|
116
|
+
Scenario: Postcondition - Deleting an user
|
|
117
|
+
Given an apikey user by "1e0a6fa7-d770-4072-ab4e-f98581522a65"
|
|
118
|
+
Given an ogapi "users builder" util
|
|
119
|
+
Then I want to delete a "user"
|
|
120
|
+
And the "email" "ogux_ogapi@amplia.com"
|
|
121
|
+
Then I delete it
|
|
122
|
+
|
|
123
|
+
Scenario: Postcondition - Deleting an organization to use in create device
|
|
84
124
|
Given an ogapi "organizations builder" util
|
|
85
125
|
Then I want to delete an "organization"
|
|
86
126
|
And the "name" "executions_organization"
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@operations
|
|
4
4
|
@searching
|
|
5
5
|
@searching_periodic_operations
|
|
6
|
+
|
|
6
7
|
Feature: Searching operation's executions
|
|
7
8
|
As a user of JsApi
|
|
8
9
|
I want to search periodic operations
|
|
@@ -10,7 +11,7 @@ I want to search periodic operations
|
|
|
10
11
|
Background:
|
|
11
12
|
Given an apikey user by "require-real-apikey"
|
|
12
13
|
|
|
13
|
-
Scenario: Creating an organization to use in create device
|
|
14
|
+
Scenario: Precondition - Creating an organization to use in create device
|
|
14
15
|
Given an ogapi "organizations builder" util
|
|
15
16
|
Then I want to create an "organization"
|
|
16
17
|
And the "name" "search_periodic_organization"
|
|
@@ -23,8 +24,38 @@ I want to search periodic operations
|
|
|
23
24
|
Then I delete it
|
|
24
25
|
And I create it
|
|
25
26
|
And response code should be: 201
|
|
27
|
+
|
|
28
|
+
Scenario: Precondition - Create and delete an user that does not exist
|
|
29
|
+
And an ogapi "users builder" util
|
|
30
|
+
And I want to create a "user"
|
|
31
|
+
And the "email" "ogux_ogapi@amplia.com"
|
|
32
|
+
And the "password" "Nvoiqewvouoiu32j@#!!"
|
|
33
|
+
And the "workgroup" "search_periodic_organization"
|
|
34
|
+
And the "domain" "search_periodic_organization"
|
|
35
|
+
And the "profile" "admin_domain"
|
|
36
|
+
And the "countryCode" "ES"
|
|
37
|
+
And the "langCode" "en"
|
|
38
|
+
And the "name" "test name"
|
|
39
|
+
And the "surname" "test surname"
|
|
40
|
+
And the "description" "user description"
|
|
41
|
+
Then I delete it
|
|
42
|
+
And I create it
|
|
43
|
+
Then response code should be: 201
|
|
44
|
+
|
|
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 "search_periodic_organization"
|
|
49
|
+
Then I want to create an "operation type"
|
|
50
|
+
And the "name" "ADMINISTRATIVE_STATUS_CHANGE_TEST"
|
|
51
|
+
And the "title" "Administrative status change test"
|
|
52
|
+
And the "description" "Allows to change the administrative status of an entity"
|
|
53
|
+
And the "fromCatalog" "ADMINISTRATIVE_STATUS_CHANGE"
|
|
54
|
+
Then I create it
|
|
55
|
+
And response code should be: 201
|
|
26
56
|
|
|
27
|
-
Scenario: I want to create an entity
|
|
57
|
+
Scenario: Precondition - I want to create an entity
|
|
58
|
+
Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
|
|
28
59
|
Given the entity of type "devices builder" with "search_periodic_organization"
|
|
29
60
|
And I get allowed Datastreams fields
|
|
30
61
|
And I can found "provision.device.identifier" as datastream name
|
|
@@ -33,7 +64,7 @@ I want to search periodic operations
|
|
|
33
64
|
| provision.administration.channel | simple | default_channel | |
|
|
34
65
|
| provision.administration.organization | simple | search_periodic_organization | |
|
|
35
66
|
| provision.administration.serviceGroup | simple | emptyServiceGroup | |
|
|
36
|
-
| provision.device.identifier | simple |
|
|
67
|
+
| provision.device.identifier | simple | search_periodic_oper_dev_a | |
|
|
37
68
|
| provision.device.operationalStatus | simple | NORMAL | |
|
|
38
69
|
| provision.device.administrativeState | simple | ACTIVE | |
|
|
39
70
|
|
|
@@ -42,38 +73,48 @@ I want to search periodic operations
|
|
|
42
73
|
And response code should be: 201
|
|
43
74
|
|
|
44
75
|
Scenario: Execute periodic operation every day
|
|
45
|
-
Given
|
|
76
|
+
Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
|
|
77
|
+
Given the operation by "ADMINISTRATIVE_STATUS_CHANGE_TEST"
|
|
46
78
|
And the notes by ""
|
|
47
79
|
And the timeout by 120000
|
|
48
80
|
And the ackTimeout by 0
|
|
49
81
|
And the retries by 0
|
|
50
82
|
And the retriesDelay by 0
|
|
51
|
-
And
|
|
52
|
-
And the job timeout by
|
|
83
|
+
And the parameters "{ \"admsts\" : \"ACTIVE\" }"
|
|
84
|
+
And the job timeout by 300 seconds
|
|
53
85
|
And execute every day at "2020-01-10T21:44:13Z"
|
|
54
86
|
And append entities by:
|
|
55
|
-
|
|
|
87
|
+
| search_periodic_oper_dev_a |
|
|
56
88
|
When I build it
|
|
57
89
|
And I execute it
|
|
58
90
|
Then response code should be: 201
|
|
59
91
|
|
|
60
92
|
Scenario: Searching for periodic operations
|
|
93
|
+
Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
|
|
61
94
|
Given an ogapi "periodic operations search" util
|
|
62
95
|
When I build it
|
|
63
96
|
And I execute it
|
|
64
97
|
Then response code should be: 200
|
|
65
98
|
|
|
66
99
|
|
|
67
|
-
Scenario: I want to delete the entity
|
|
100
|
+
Scenario: Postcondition - I want to delete the entity
|
|
101
|
+
Given an email "ogux_ogapi@amplia.com" and password "Nvoiqewvouoiu32j@#!!" the user logs in
|
|
68
102
|
Given the entity of type "devices builder" with "search_periodic_organization"
|
|
69
103
|
When I try to define the entity with...
|
|
70
104
|
| datastream | typeFunction | value | parent |
|
|
71
105
|
| provision.administration.channel | simple | default_channel | |
|
|
72
106
|
| provision.administration.organization | simple | search_periodic_organization | |
|
|
73
|
-
| provision.device.identifier | simple |
|
|
107
|
+
| provision.device.identifier | simple | search_periodic_oper_dev_a | |
|
|
108
|
+
Then I delete it
|
|
109
|
+
|
|
110
|
+
Scenario: Postcondition - Deleting an user
|
|
111
|
+
Given an apikey user by "1e0a6fa7-d770-4072-ab4e-f98581522a65"
|
|
112
|
+
Given an ogapi "users builder" util
|
|
113
|
+
Then I want to delete a "user"
|
|
114
|
+
And the "email" "ogux_ogapi@amplia.com"
|
|
74
115
|
Then I delete it
|
|
75
116
|
|
|
76
|
-
Scenario: Deleting an organization to use in create device
|
|
117
|
+
Scenario: Postcondition - Deleting an organization to use in create device
|
|
77
118
|
Given an ogapi "organizations builder" util
|
|
78
119
|
Then I want to delete an "organization"
|
|
79
120
|
And the "name" "search_periodic_organization"
|
|
@@ -169,9 +169,9 @@ Given(/^append entities by:$/, function (table, callback) {
|
|
|
169
169
|
callback();
|
|
170
170
|
});
|
|
171
171
|
|
|
172
|
-
Given(/^the job timeout by (\d+)
|
|
173
|
-
|
|
174
|
-
this.util.withJobTimeout(
|
|
172
|
+
Given(/^the job timeout by (\d+) seconds$/, function (seconds, callback) {
|
|
173
|
+
seconds = eval(seconds);
|
|
174
|
+
this.util.withJobTimeout(seconds, 'seconds');
|
|
175
175
|
callback();
|
|
176
176
|
});
|
|
177
177
|
|
|
@@ -183,6 +183,13 @@ Given(/^the retriesDelay by (\d+)$/, function (milliseconds, callback) {
|
|
|
183
183
|
callback();
|
|
184
184
|
});
|
|
185
185
|
|
|
186
|
+
Given('the parameters {string}', function (parameters, callback) {
|
|
187
|
+
// Write code here that turns the phrase above into concrete actions
|
|
188
|
+
parameters = JSON.parse(parameters);
|
|
189
|
+
this.util.withParameters(parameters);
|
|
190
|
+
callback();
|
|
191
|
+
});
|
|
192
|
+
|
|
186
193
|
Given(/^the retries by (\d+)$/, function (retries, callback) {
|
|
187
194
|
// Write code here that turns the phrase above into concrete actions
|
|
188
195
|
retries = eval(retries);
|
|
@@ -197,9 +204,9 @@ Given(/^the ackTimeout by (\d+)$/, function (milliseconds, callback) {
|
|
|
197
204
|
callback();
|
|
198
205
|
});
|
|
199
206
|
|
|
200
|
-
Given(
|
|
207
|
+
Given('the operationRetries by {string}', function (operationRetries, callback) {
|
|
201
208
|
// Write code here that operationRetries
|
|
202
|
-
this.util.withOperationRetries(operationRetries);
|
|
209
|
+
this.util.withOperationRetries(JSON.parse(operationRetries));
|
|
203
210
|
callback();
|
|
204
211
|
});
|
|
205
212
|
|