opengate-js 10.5.3 → 10.6.2
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-10.5.3.js → opengate-api-bower-10.6.2.js} +12732 -304
- package/dist/opengate-api-bower-10.6.2.js.map +1 -0
- package/dist/{opengate-api-bower-10.5.3.min.js → opengate-api-bower-10.6.2.min.js} +35 -33
- package/dist/opengate-api-bower-10.6.2.min.js.map +1 -0
- package/dist/src/provision/bulk/BulkExecutionBuilder.js +1 -4
- package/dist/src/provision/bulk/BulkExecutionBuilder.js.map +1 -1
- package/dist/src/searching/StaticSearch.js +18 -18
- package/dist/src/searching/StaticSearch.js.map +1 -1
- package/dist/src/util/NorthAmpliaREST.js +126 -50
- package/dist/src/util/NorthAmpliaREST.js.map +1 -1
- package/docs/ast/source/provision/bulk/BulkExecutionBuilder.js.json +1840 -2555
- package/docs/ast/source/searching/StaticSearch.js.json +21408 -20094
- package/docs/ast/source/util/NorthAmpliaREST.js.json +17082 -11354
- package/docs/class/src/util/NorthAmpliaREST.js~NorthAmpliaREST.html +7 -7
- package/docs/dump.json +440 -412
- package/docs/file/src/provision/bulk/BulkExecutionBuilder.js.html +1 -4
- package/docs/file/src/searching/StaticSearch.js.html +18 -18
- package/docs/file/src/util/NorthAmpliaREST.js.html +115 -45
- package/docs/package.json +1 -1
- package/docs/source.html +196 -196
- package/features/features/provision/bulk/execute_bulk.feature +0 -1
- package/features/features/provision/bulk/find_bulk_execution.feature +0 -1
- package/features/features/provision/processors/create_delete_processors.feature +3 -3
- package/features/features/provision/processors/find_provision_processors.feature +1 -2
- package/features/features/provision/processors/update_provision_processors.feature +28 -9
- package/features/features/searching/bulk/searching_bulk_executions.feature +0 -1
- package/features/step_definitions/when_step_definitions.js +142 -53
- package/package.json +1 -1
- package/src/provision/bulk/BulkExecutionBuilder.js +1 -4
- package/src/searching/StaticSearch.js +18 -18
- package/src/util/NorthAmpliaREST.js +115 -45
- package/dist/opengate-api-bower-10.5.3.js.map +0 -1
- package/dist/opengate-api-bower-10.5.3.min.js.map +0 -1
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
@processors
|
|
4
4
|
@create_processors
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
Feature: Delete and Create a processors
|
|
8
7
|
As a user of JsApi
|
|
9
8
|
I want to create a processors
|
|
10
9
|
So, I can create a new processors with the parametres that I have been defined
|
|
11
10
|
|
|
12
11
|
Background:
|
|
13
|
-
Given an apikey user by "
|
|
12
|
+
Given an apikey user by "require-real-apikey"
|
|
14
13
|
|
|
15
14
|
Scenario: Creating an organization to use in processors tests
|
|
16
15
|
Given an ogapi "organizations builder" util
|
|
@@ -30,7 +29,6 @@ So, I can create a new processors with the parametres that I have been defined
|
|
|
30
29
|
And an ogapi "provision processors builder" util
|
|
31
30
|
And I want to create a "provisionProcessors"
|
|
32
31
|
And the "organization" "provisionProcessors"
|
|
33
|
-
And the "identifier" "provision_Processor_id_1"
|
|
34
32
|
And the "name" "mockProvisionProcessors"
|
|
35
33
|
And the "configurationParams" with...
|
|
36
34
|
| param |
|
|
@@ -40,6 +38,8 @@ So, I can create a new processors with the parametres that I have been defined
|
|
|
40
38
|
| {"script": "function normalizeRawObject(rawObject) { try { var normalizedObject = {}; return normalizedObject; } catch (e) { printLog('>> normalizeRawObject(): exception: ' + e); throw e; } } function actionsPlanning(normalizedObject) { try { var actions = []; return actions; } catch (e) { printLog('>> actionsPlanning(): exception: ' + e); throw e; } }"} |
|
|
41
39
|
Then I create it
|
|
42
40
|
And response code should be: 201
|
|
41
|
+
Then I delete it with identfier from location
|
|
42
|
+
And response code should be: 200
|
|
43
43
|
|
|
44
44
|
Scenario: Deleting an organization
|
|
45
45
|
Given an ogapi "organizations builder" util
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
@provision
|
|
3
3
|
@finder
|
|
4
4
|
@find_provision
|
|
5
|
-
|
|
6
5
|
Feature: Find an area
|
|
7
6
|
As a user of JsApi
|
|
8
7
|
I want to find an provisionProcessors
|
|
9
8
|
So I can check if a provisionProcessors exists and get their information
|
|
10
9
|
|
|
11
10
|
Background:
|
|
12
|
-
Given an apikey user by "
|
|
11
|
+
Given an apikey user by "require-real-apikey"
|
|
13
12
|
|
|
14
13
|
Scenario: Creating an organization to use in processors tests
|
|
15
14
|
Given an ogapi "organizations builder" util
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
@provision
|
|
3
3
|
@processors
|
|
4
4
|
@update_processors
|
|
5
|
-
@prueba23
|
|
6
|
-
|
|
7
5
|
|
|
8
6
|
Feature: Delete and Create a processors
|
|
9
7
|
As a user of JsApi
|
|
@@ -11,22 +9,43 @@ I want to create a processors
|
|
|
11
9
|
So, I can create a new processors with the parametres that I have been defined
|
|
12
10
|
|
|
13
11
|
Background:
|
|
14
|
-
Given an apikey user by "
|
|
12
|
+
Given an apikey user by "require-real-apikey"
|
|
13
|
+
|
|
14
|
+
Scenario: Creating an organization to use in processors tests
|
|
15
|
+
Given an ogapi "organizations builder" util
|
|
16
|
+
Then I want to create an "organization"
|
|
17
|
+
And the "name" "provisionProcessors"
|
|
18
|
+
And the "description" "provisionProcessors organization"
|
|
19
|
+
And the "country code" "ES"
|
|
20
|
+
And the "lang code" "es"
|
|
21
|
+
And the "time zone" "Europe/Andorra"
|
|
22
|
+
And the "zoom" 10
|
|
23
|
+
And the "location" with 1 and 1
|
|
24
|
+
Then I delete it
|
|
25
|
+
Then I create it
|
|
26
|
+
And response code should be: 201
|
|
15
27
|
|
|
16
28
|
Scenario: Update processors
|
|
17
29
|
And an ogapi "provision processors builder" util
|
|
18
|
-
And I want to
|
|
30
|
+
And I want to create a "provisionProcessors"
|
|
19
31
|
And the "organization" "provisionProcessors"
|
|
20
32
|
And the "name" "mockProvisionProcessors"
|
|
21
|
-
And the "identifier" "91010e20-1a55-4319-990d-c3752b501065"
|
|
22
33
|
And the "configurationParams" with...
|
|
23
34
|
| param |
|
|
24
35
|
| {"spreadsheet": {"sheetName": "PARA", "headerRow": 2,"resultColumnName": "ODM_Result" }} |
|
|
25
36
|
And the "scriptProcessor" with...
|
|
26
37
|
| param |
|
|
27
38
|
| {"script": "function normalizeRawObject(rawObject) { try { var normalizedObject = {}; return normalizedObject; } catch (e) { printLog('>> normalizeRawObject(): exception: ' + e); throw e; } } function actionsPlanning(normalizedObject) { try { var actions = []; return actions; } catch (e) { printLog('>> actionsPlanning(): exception: ' + e); throw e; } }"} |
|
|
28
|
-
Then I
|
|
29
|
-
And response code should be:
|
|
30
|
-
Then the "
|
|
31
|
-
|
|
39
|
+
Then I create it
|
|
40
|
+
And response code should be: 201
|
|
41
|
+
Then the "name" "mockProvisionProcessors2"
|
|
42
|
+
Then I update it with identfier from location
|
|
32
43
|
Then response code should be: 200
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
Scenario: Deleting an organization
|
|
47
|
+
Given an ogapi "organizations builder" util
|
|
48
|
+
Then I want to delete an "organization"
|
|
49
|
+
And the "name" "provisionProcessors"
|
|
50
|
+
Then I delete it
|
|
51
|
+
And response code should be: 200
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
// features/step_definitions/when_step_definitions.js
|
|
2
2
|
|
|
3
3
|
var GenericFinder = require(process.cwd() + '/dist/src/GenericFinder');
|
|
4
|
-
var {
|
|
4
|
+
var {
|
|
5
|
+
When,
|
|
6
|
+
Given
|
|
7
|
+
} = require('cucumber');
|
|
5
8
|
|
|
6
9
|
When(/^I want "([^"]*)"( (\d*) minutes| for this url "([^"]*)" for)? (a|of a) operation$/, function (action, nothing, minutes, data, exclude) {
|
|
7
10
|
var _this = this;
|
|
8
11
|
|
|
9
|
-
function digestResponseData
|
|
12
|
+
function digestResponseData(response) {
|
|
10
13
|
//Guardamos el identificador anterior por si hiciera falta para el siguiente paso
|
|
11
14
|
var id = _this.responseData.id;
|
|
12
15
|
var location = _this.responseData.location;
|
|
@@ -33,7 +36,7 @@ When(/^I want "([^"]*)"( (\d*) minutes| for this url "([^"]*)" for)? (a|of a) op
|
|
|
33
36
|
this.error = undefined;
|
|
34
37
|
}
|
|
35
38
|
|
|
36
|
-
function digestErrorData
|
|
39
|
+
function digestErrorData(response) {
|
|
37
40
|
|
|
38
41
|
var cache = [];
|
|
39
42
|
var error = JSON.stringify(response, function (key, value) {
|
|
@@ -102,7 +105,7 @@ When(/^I try to find an operation for its id of periodicity and save its id$/, f
|
|
|
102
105
|
var _this = this;
|
|
103
106
|
_this.error = undefined;
|
|
104
107
|
|
|
105
|
-
function digestResponseData
|
|
108
|
+
function digestResponseData(response) {
|
|
106
109
|
_this.responseData = {
|
|
107
110
|
data: response.data[0],
|
|
108
111
|
statusCode: response.statusCode,
|
|
@@ -111,7 +114,7 @@ When(/^I try to find an operation for its id of periodicity and save its id$/, f
|
|
|
111
114
|
_this.error = undefined;
|
|
112
115
|
}
|
|
113
116
|
|
|
114
|
-
function digestErrorData
|
|
117
|
+
function digestErrorData(error) {
|
|
115
118
|
//console.log("STEP GENERIC_FINDER ERROR: " + JSON.stringify(error));
|
|
116
119
|
_this.error = error;
|
|
117
120
|
_this.responseData = error;
|
|
@@ -139,7 +142,7 @@ When(/^I try to find by operation's id$/, function () {
|
|
|
139
142
|
var _this = this;
|
|
140
143
|
this.error = undefined;
|
|
141
144
|
|
|
142
|
-
function digestResponseData
|
|
145
|
+
function digestResponseData(response) {
|
|
143
146
|
//console.log("FIND BY EXECUTION ID RESPONSE: " + JSON.stringify(response));
|
|
144
147
|
//Guardamos el id y/o location por si hiciera falta en el siguiente step
|
|
145
148
|
var id = _this.responseData.id;
|
|
@@ -157,7 +160,7 @@ When(/^I try to find by operation's id$/, function () {
|
|
|
157
160
|
this.error = undefined;
|
|
158
161
|
}
|
|
159
162
|
|
|
160
|
-
function digestErrorData
|
|
163
|
+
function digestErrorData(response) {
|
|
161
164
|
//console.log("FIND BY EXECUTION ID ERROR: " + JSON.stringify(response));
|
|
162
165
|
_this.error = response;
|
|
163
166
|
_this.responseData = response;
|
|
@@ -342,13 +345,13 @@ When(/^I execute it$/, function () {
|
|
|
342
345
|
_this.error = undefined;
|
|
343
346
|
_this.responseData = undefined;
|
|
344
347
|
|
|
345
|
-
function catchResponse
|
|
348
|
+
function catchResponse(data) {
|
|
346
349
|
// console.log("EXECUTE RESPONSE: " + JSON.stringify(data));
|
|
347
350
|
_this.responseData = data;
|
|
348
351
|
_this.error = undefined;
|
|
349
352
|
}
|
|
350
353
|
|
|
351
|
-
function catchErrorResponse
|
|
354
|
+
function catchErrorResponse(err) {
|
|
352
355
|
// console.log(err);
|
|
353
356
|
//console.log("EXECUTE ERROR: " + JSON.stringify(err));
|
|
354
357
|
_this.responseData = err;
|
|
@@ -371,12 +374,12 @@ When(/^I download csv it$/, function () {
|
|
|
371
374
|
_this.error = undefined;
|
|
372
375
|
_this.responseData = undefined;
|
|
373
376
|
|
|
374
|
-
function catchResponse
|
|
377
|
+
function catchResponse(data) {
|
|
375
378
|
_this.responseData = data;
|
|
376
379
|
_this.error = undefined;
|
|
377
380
|
}
|
|
378
381
|
|
|
379
|
-
function catchErrorResponse
|
|
382
|
+
function catchErrorResponse(err) {
|
|
380
383
|
//console.log("EXECUTE ERROR: " + JSON.stringify(err));
|
|
381
384
|
_this.responseData = err;
|
|
382
385
|
_this.error = err;
|
|
@@ -400,21 +403,21 @@ When(/^I execute with async paging it$/, function () {
|
|
|
400
403
|
_this.responseData = undefined;
|
|
401
404
|
_this.data = [];
|
|
402
405
|
|
|
403
|
-
function catchResponse
|
|
406
|
+
function catchResponse(data) {
|
|
404
407
|
//console.log("EXECUTE RESPONSE: " + JSON.stringify(data));
|
|
405
408
|
_this.responseData = data;
|
|
406
409
|
_this.error = undefined;
|
|
407
410
|
//console.log(data);
|
|
408
411
|
}
|
|
409
412
|
|
|
410
|
-
function catchErrorResponse
|
|
413
|
+
function catchErrorResponse(err) {
|
|
411
414
|
//console.log("EXECUTE ERROR: " + JSON.stringify(err));
|
|
412
415
|
_this.responseData = err;
|
|
413
416
|
_this.error = err;
|
|
414
417
|
|
|
415
418
|
}
|
|
416
419
|
|
|
417
|
-
function catchNotification
|
|
420
|
+
function catchNotification(notification) {
|
|
418
421
|
//console.log("EXECUTE NOTIFICATION: " + JSON.stringify(notification));
|
|
419
422
|
_this.error = undefined;
|
|
420
423
|
_this.responseData = undefined;
|
|
@@ -436,21 +439,21 @@ When(/^I execute with async paging it and cancel it$/, function () {
|
|
|
436
439
|
_this.responseData = undefined;
|
|
437
440
|
_this.data = [];
|
|
438
441
|
|
|
439
|
-
function catchResponse
|
|
442
|
+
function catchResponse(data) {
|
|
440
443
|
//console.log("EXECUTE RESPONSE: " + JSON.stringify(data));
|
|
441
444
|
_this.responseData = data;
|
|
442
445
|
_this.error = undefined;
|
|
443
446
|
//console.log(data);
|
|
444
447
|
}
|
|
445
448
|
|
|
446
|
-
function catchErrorResponse
|
|
449
|
+
function catchErrorResponse(err) {
|
|
447
450
|
//console.log("EXECUTE ERROR: " + JSON.stringify(err));
|
|
448
451
|
_this.responseData = err;
|
|
449
452
|
_this.error = err;
|
|
450
453
|
|
|
451
454
|
}
|
|
452
455
|
|
|
453
|
-
function catchNotification
|
|
456
|
+
function catchNotification(notification) {
|
|
454
457
|
//console.log("EXECUTE NOTIFICATION: " + JSON.stringify(notification));
|
|
455
458
|
_this.error = undefined;
|
|
456
459
|
_this.responseData = undefined;
|
|
@@ -473,21 +476,21 @@ When(/^I execute with async paging it and cancel it with custom message$/, funct
|
|
|
473
476
|
_this.responseData = undefined;
|
|
474
477
|
_this.data = [];
|
|
475
478
|
|
|
476
|
-
function catchResponse
|
|
479
|
+
function catchResponse(data) {
|
|
477
480
|
//console.log("EXECUTE RESPONSE: " + JSON.stringify(data));
|
|
478
481
|
_this.responseData = data;
|
|
479
482
|
_this.error = undefined;
|
|
480
483
|
//console.log(data);
|
|
481
484
|
}
|
|
482
485
|
|
|
483
|
-
function catchErrorResponse
|
|
486
|
+
function catchErrorResponse(err) {
|
|
484
487
|
//console.log("EXECUTE ERROR: " + JSON.stringify(err));
|
|
485
488
|
_this.responseData = err;
|
|
486
489
|
_this.error = err;
|
|
487
490
|
|
|
488
491
|
}
|
|
489
492
|
|
|
490
|
-
function catchNotification
|
|
493
|
+
function catchNotification(notification) {
|
|
491
494
|
//console.log("EXECUTE NOTIFICATION: " + JSON.stringify(notification));
|
|
492
495
|
_this.error = undefined;
|
|
493
496
|
_this.responseData = undefined;
|
|
@@ -509,13 +512,13 @@ When(/^I update periodicity$/, function () {
|
|
|
509
512
|
_this.error = undefined;
|
|
510
513
|
_this.responseData = undefined;
|
|
511
514
|
|
|
512
|
-
function catchResponse
|
|
515
|
+
function catchResponse(data) {
|
|
513
516
|
//console.log("EXECUTE RESPONSE: " + JSON.stringify(data));
|
|
514
517
|
_this.responseData = data;
|
|
515
518
|
_this.error = undefined;
|
|
516
519
|
}
|
|
517
520
|
|
|
518
|
-
function catchErrorResponse
|
|
521
|
+
function catchErrorResponse(err) {
|
|
519
522
|
var cache = [];
|
|
520
523
|
var error = JSON.stringify(err.data.errors, function (key, value) {
|
|
521
524
|
if (typeof value === 'object' && value !== null) {
|
|
@@ -544,28 +547,30 @@ When(/^I update periodicity$/, function () {
|
|
|
544
547
|
}
|
|
545
548
|
});
|
|
546
549
|
|
|
547
|
-
When(/^I create it$/, {
|
|
550
|
+
When(/^I create it$/, {
|
|
551
|
+
timeout: 60 * 1000
|
|
552
|
+
}, function () {
|
|
548
553
|
|
|
549
554
|
var _this = this;
|
|
550
555
|
_this.error = undefined;
|
|
551
556
|
_this.responseData = undefined;
|
|
552
|
-
console.log('responseData1',
|
|
557
|
+
console.log('responseData1', _this.responseData)
|
|
553
558
|
|
|
554
|
-
function catchResponse
|
|
559
|
+
function catchResponse(data) {
|
|
555
560
|
console.log("OK");
|
|
556
561
|
console.log("data: " + JSON.stringify(data));
|
|
557
562
|
_this.responseData = data;
|
|
558
563
|
_this.location = _this.responseData.location;
|
|
559
564
|
_this.error = undefined;
|
|
560
|
-
console.log('responseData2',
|
|
565
|
+
console.log('responseData2', _this.responseData)
|
|
561
566
|
|
|
562
567
|
}
|
|
563
568
|
|
|
564
|
-
function catchErrorResponse
|
|
569
|
+
function catchErrorResponse(err) {
|
|
565
570
|
console.log("NOK");
|
|
566
571
|
console.log("ERROR: " + JSON.stringify(err));
|
|
567
572
|
_this.responseData = err;
|
|
568
|
-
console.log('responseData3',
|
|
573
|
+
console.log('responseData3', _this.responseData)
|
|
569
574
|
if (err.errors) {
|
|
570
575
|
_this.error = err.errors;
|
|
571
576
|
} else if (err.data.errors) {
|
|
@@ -595,7 +600,7 @@ When(/^I "([^"]*)" it with bulk$/, function (action) {
|
|
|
595
600
|
_this.error = undefined;
|
|
596
601
|
_this.responseData = undefined;
|
|
597
602
|
|
|
598
|
-
function catchResponse
|
|
603
|
+
function catchResponse(data) {
|
|
599
604
|
//console.log("OK");
|
|
600
605
|
//console.log("data: " + JSON.stringify(data));
|
|
601
606
|
_this.responseData = data;
|
|
@@ -603,7 +608,7 @@ When(/^I "([^"]*)" it with bulk$/, function (action) {
|
|
|
603
608
|
_this.error = this.error = undefined;
|
|
604
609
|
}
|
|
605
610
|
|
|
606
|
-
function catchErrorResponse
|
|
611
|
+
function catchErrorResponse(err) {
|
|
607
612
|
//console.log("NOK");
|
|
608
613
|
//console.log("ERROR: " + JSON.stringify(err));
|
|
609
614
|
_this.responseData = err;
|
|
@@ -628,12 +633,14 @@ When(/^I "([^"]*)" it with bulk$/, function (action) {
|
|
|
628
633
|
}
|
|
629
634
|
});
|
|
630
635
|
|
|
631
|
-
When(/^I "([^"]*)" it with bulk execution$/, {
|
|
636
|
+
When(/^I "([^"]*)" it with bulk execution$/, {
|
|
637
|
+
timeout: 60 * 1000
|
|
638
|
+
}, function (action) {
|
|
632
639
|
var _this = this;
|
|
633
640
|
_this.error = undefined;
|
|
634
641
|
_this.responseData = undefined;
|
|
635
642
|
|
|
636
|
-
function catchResponse
|
|
643
|
+
function catchResponse(data) {
|
|
637
644
|
//console.log("OK");
|
|
638
645
|
//console.log("data: " + JSON.stringify(data));
|
|
639
646
|
//console.log("_this.responseData: ", _this.responseData);
|
|
@@ -642,7 +649,7 @@ When(/^I "([^"]*)" it with bulk execution$/, {timeout: 60*1000}, function (actio
|
|
|
642
649
|
_this.error = this.error = undefined;
|
|
643
650
|
}
|
|
644
651
|
|
|
645
|
-
function catchErrorResponse
|
|
652
|
+
function catchErrorResponse(err) {
|
|
646
653
|
//console.log(err)
|
|
647
654
|
//console.log("NOK");
|
|
648
655
|
//console.log("ERROR: " + JSON.stringify(err));
|
|
@@ -673,14 +680,14 @@ When(/^I "([^"]*)" it with bulk and response with format csv$/, function (action
|
|
|
673
680
|
_this.error = undefined;
|
|
674
681
|
_this.responseData = undefined;
|
|
675
682
|
|
|
676
|
-
function catchResponse
|
|
683
|
+
function catchResponse(data) {
|
|
677
684
|
//console.log("OK");
|
|
678
685
|
//console.log("data: " + JSON.stringify(data));
|
|
679
686
|
_this.responseData = data;
|
|
680
687
|
_this.error = undefined;
|
|
681
688
|
}
|
|
682
689
|
|
|
683
|
-
function catchErrorResponse
|
|
690
|
+
function catchErrorResponse(err) {
|
|
684
691
|
//console.log("EXECUTE ERROR: " + JSON.stringify(err));
|
|
685
692
|
_this.responseData = err;
|
|
686
693
|
_this.error = err;
|
|
@@ -696,7 +703,51 @@ When(/^I "([^"]*)" it with bulk and response with format csv$/, function (action
|
|
|
696
703
|
return;
|
|
697
704
|
}
|
|
698
705
|
});
|
|
706
|
+
When(/^I delete it with identfier from location$/, function () {
|
|
699
707
|
|
|
708
|
+
var _this = this;
|
|
709
|
+
_this.error = undefined;
|
|
710
|
+
_this.responseData = undefined;
|
|
711
|
+
|
|
712
|
+
function catchResponse(data) {
|
|
713
|
+
//console.log("OK");
|
|
714
|
+
//console.log(JSON.stringify(data));
|
|
715
|
+
_this.responseData = data;
|
|
716
|
+
_this.error = undefined;
|
|
717
|
+
//console.log(data);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
function catchErrorResponse(err) {
|
|
721
|
+
//console.log("NOK");
|
|
722
|
+
//console.log(JSON.stringify(err));
|
|
723
|
+
_this.responseData = err;
|
|
724
|
+
_this.error = err;
|
|
725
|
+
|
|
726
|
+
}
|
|
727
|
+
var id;
|
|
728
|
+
try {
|
|
729
|
+
if(this.responseData){
|
|
730
|
+
if (this.responseData.location)
|
|
731
|
+
id = this.responseData.location.substring(this.responseData.location.lastIndexOf("/") + 1);
|
|
732
|
+
else if (this.responseData.data)
|
|
733
|
+
id = this.responseData.data.id;
|
|
734
|
+
else if (this.responseData[0])
|
|
735
|
+
id = this.responseData[0].id;
|
|
736
|
+
}else if(this.location){
|
|
737
|
+
id = this.location.substring(this.location.lastIndexOf("/") + 1);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
_this.util.withIdentifier(id)
|
|
741
|
+
return _this.util.delete().then(catchResponse).catch(catchErrorResponse);
|
|
742
|
+
|
|
743
|
+
} catch (err) {
|
|
744
|
+
//console.error(err);
|
|
745
|
+
_this.responseData = err;
|
|
746
|
+
_this.error = err;
|
|
747
|
+
//this.expect(this.error).to.be.undefined;
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
});
|
|
700
751
|
|
|
701
752
|
When(/^I delete it$/, function () {
|
|
702
753
|
|
|
@@ -704,7 +755,7 @@ When(/^I delete it$/, function () {
|
|
|
704
755
|
_this.error = undefined;
|
|
705
756
|
_this.responseData = undefined;
|
|
706
757
|
|
|
707
|
-
function catchResponse
|
|
758
|
+
function catchResponse(data) {
|
|
708
759
|
//console.log("OK");
|
|
709
760
|
//console.log(JSON.stringify(data));
|
|
710
761
|
_this.responseData = data;
|
|
@@ -712,7 +763,7 @@ When(/^I delete it$/, function () {
|
|
|
712
763
|
//console.log(data);
|
|
713
764
|
}
|
|
714
765
|
|
|
715
|
-
function catchErrorResponse
|
|
766
|
+
function catchErrorResponse(err) {
|
|
716
767
|
//console.log("NOK");
|
|
717
768
|
//console.log(JSON.stringify(err));
|
|
718
769
|
_this.responseData = err;
|
|
@@ -740,7 +791,7 @@ When(/^I delete it all$/, function () {
|
|
|
740
791
|
_this.error = undefined;
|
|
741
792
|
_this.responseData = undefined;
|
|
742
793
|
|
|
743
|
-
function catchResponse
|
|
794
|
+
function catchResponse(data) {
|
|
744
795
|
//console.log("OK");
|
|
745
796
|
//console.log(JSON.stringify(data));
|
|
746
797
|
_this.responseData = data;
|
|
@@ -748,7 +799,7 @@ When(/^I delete it all$/, function () {
|
|
|
748
799
|
//console.log(data);
|
|
749
800
|
}
|
|
750
801
|
|
|
751
|
-
function catchErrorResponse
|
|
802
|
+
function catchErrorResponse(err) {
|
|
752
803
|
//console.log("NOK");
|
|
753
804
|
//console.log(JSON.stringify(err));
|
|
754
805
|
_this.responseData = err;
|
|
@@ -770,18 +821,56 @@ When(/^I delete it all$/, function () {
|
|
|
770
821
|
}
|
|
771
822
|
});
|
|
772
823
|
|
|
824
|
+
When(/^I update it with identfier from location$/, function () {
|
|
825
|
+
var _this = this;
|
|
826
|
+
_this.error = undefined;
|
|
827
|
+
_this.responseData = undefined;
|
|
828
|
+
|
|
829
|
+
function catchResponse(data) {
|
|
830
|
+
_this.responseData = data;
|
|
831
|
+
_this.error = undefined;
|
|
832
|
+
//console.log(JSON.stringify(_this.data));
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
function catchErrorResponse(err) {
|
|
836
|
+
_this.responseData = err;
|
|
837
|
+
_this.error = err;
|
|
838
|
+
|
|
839
|
+
}
|
|
840
|
+
var id
|
|
841
|
+
try {
|
|
842
|
+
if(this.responseData){
|
|
843
|
+
if (this.responseData.location)
|
|
844
|
+
id = this.responseData.location.substring(this.responseData.location.lastIndexOf("/") + 1);
|
|
845
|
+
else if (this.responseData.data)
|
|
846
|
+
id = this.responseData.data.id;
|
|
847
|
+
else if (this.responseData[0])
|
|
848
|
+
id = this.responseData[0].id;
|
|
849
|
+
}else if(this.location){
|
|
850
|
+
id = this.location.substring(this.location.lastIndexOf("/") + 1);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
_this.util.withIdentifier(id)
|
|
854
|
+
return _this.util.update().then(catchResponse).catch(catchErrorResponse);
|
|
855
|
+
} catch (err) {
|
|
856
|
+
this.error = err;
|
|
857
|
+
//console.log(err);
|
|
858
|
+
return;
|
|
859
|
+
}
|
|
860
|
+
});
|
|
861
|
+
|
|
773
862
|
When(/^I update it$/, function () {
|
|
774
863
|
var _this = this;
|
|
775
864
|
_this.error = undefined;
|
|
776
865
|
_this.responseData = undefined;
|
|
777
866
|
|
|
778
|
-
function catchResponse
|
|
867
|
+
function catchResponse(data) {
|
|
779
868
|
_this.responseData = data;
|
|
780
869
|
_this.error = undefined;
|
|
781
870
|
//console.log(JSON.stringify(_this.data));
|
|
782
871
|
}
|
|
783
872
|
|
|
784
|
-
function catchErrorResponse
|
|
873
|
+
function catchErrorResponse(err) {
|
|
785
874
|
_this.responseData = err;
|
|
786
875
|
_this.error = err;
|
|
787
876
|
|
|
@@ -801,13 +890,13 @@ When(/^I update password with "([^"]*)"$/, function (field) {
|
|
|
801
890
|
_this.error = undefined;
|
|
802
891
|
_this.responseData = undefined;
|
|
803
892
|
|
|
804
|
-
function catchResponse
|
|
893
|
+
function catchResponse(data) {
|
|
805
894
|
_this.responseData = data;
|
|
806
895
|
_this.error = undefined;
|
|
807
896
|
//console.log(JSON.stringify(_this.data));
|
|
808
897
|
}
|
|
809
898
|
|
|
810
|
-
function catchErrorResponse
|
|
899
|
+
function catchErrorResponse(err) {
|
|
811
900
|
_this.responseData = err;
|
|
812
901
|
_this.error = err;
|
|
813
902
|
|
|
@@ -827,13 +916,13 @@ When(/^I get filter fields$/, function () {
|
|
|
827
916
|
_this.error = undefined;
|
|
828
917
|
_this.responseData = undefined;
|
|
829
918
|
|
|
830
|
-
function catchResponse
|
|
919
|
+
function catchResponse(data) {
|
|
831
920
|
//console.log("EXECUTE RESPONSE: " + JSON.stringify(data));
|
|
832
921
|
_this.responseData = data;
|
|
833
922
|
_this.error = undefined;
|
|
834
923
|
}
|
|
835
924
|
|
|
836
|
-
function catchErrorResponse
|
|
925
|
+
function catchErrorResponse(err) {
|
|
837
926
|
//console.log("EXECUTE ERROR: " + JSON.stringify(err));
|
|
838
927
|
_this.responseData = err;
|
|
839
928
|
_this.error = err;
|
|
@@ -854,12 +943,12 @@ When(/^I clone it with...$/, function (table) {
|
|
|
854
943
|
_this.error = undefined;
|
|
855
944
|
_this.responseData = undefined;
|
|
856
945
|
|
|
857
|
-
function catchResponse
|
|
946
|
+
function catchResponse(data) {
|
|
858
947
|
_this.responseData = data;
|
|
859
948
|
_this.error = undefined;
|
|
860
949
|
}
|
|
861
950
|
|
|
862
|
-
function catchErrorResponse
|
|
951
|
+
function catchErrorResponse(err) {
|
|
863
952
|
_this.responseData = err;
|
|
864
953
|
_this.error = err;
|
|
865
954
|
|
|
@@ -903,8 +992,8 @@ When(/^I get allowed Datastreams fields$/, function (callback) {
|
|
|
903
992
|
Given(/^I can found "([^"]*)" as datastream name$/, function (dsName, callback) {
|
|
904
993
|
// Write code here that turns the phrase above into concrete actions
|
|
905
994
|
if (this.responseData.filter(function (item) {
|
|
906
|
-
|
|
907
|
-
|
|
995
|
+
return item.identifier === dsName;
|
|
996
|
+
}).length === 0) {
|
|
908
997
|
throw new Error('Datastream not found. DSName:' + dsName);
|
|
909
998
|
}
|
|
910
999
|
callback();
|
|
@@ -913,8 +1002,8 @@ Given(/^I can found "([^"]*)" as datastream name$/, function (dsName, callback)
|
|
|
913
1002
|
Given(/^I can not found "([^"]*)" as datastream name$/, function (dsName, callback) {
|
|
914
1003
|
// Write code here that turns the phrase above into concrete actions
|
|
915
1004
|
if (this.responseData.filter(function (item) {
|
|
916
|
-
|
|
917
|
-
|
|
1005
|
+
return item.identifier === dsName;
|
|
1006
|
+
}).length === 0) {
|
|
918
1007
|
callback();
|
|
919
1008
|
}
|
|
920
1009
|
throw new Error('Datastream found. DSName:' + dsName);
|
|
@@ -927,12 +1016,12 @@ When(/^I delete all$/, function () {
|
|
|
927
1016
|
_this.error = undefined;
|
|
928
1017
|
_this.responseData = undefined;
|
|
929
1018
|
|
|
930
|
-
function catchResponse
|
|
1019
|
+
function catchResponse(data) {
|
|
931
1020
|
_this.responseData = data;
|
|
932
1021
|
_this.error = undefined;
|
|
933
1022
|
}
|
|
934
1023
|
|
|
935
|
-
function catchErrorResponse
|
|
1024
|
+
function catchErrorResponse(err) {
|
|
936
1025
|
_this.responseData = err;
|
|
937
1026
|
_this.error = err;
|
|
938
1027
|
|
package/package.json
CHANGED
|
@@ -79,10 +79,7 @@ export default class BulkExecutionBuilder extends BaseProvision {
|
|
|
79
79
|
let form;
|
|
80
80
|
if (typeof rawFile !== 'string') {
|
|
81
81
|
form = new FormData();
|
|
82
|
-
|
|
83
|
-
type: this._extension
|
|
84
|
-
});
|
|
85
|
-
form.append('file', processorBulkFile);
|
|
82
|
+
form.append('file', rawFile);
|
|
86
83
|
} else {
|
|
87
84
|
form = {};
|
|
88
85
|
form.processorBulkFile = rawFile;
|