diff options
author | Rene_Robert <rene.robert@orange.com> | 2019-10-22 17:27:21 +0200 |
---|---|---|
committer | Rene_Robert <rene.robert@orange.com> | 2019-10-23 08:40:24 +0200 |
commit | 11c5783d20e52601853552ab00819a546b49fa83 (patch) | |
tree | c139a4a49332226b98d5376eebf63146cb71affc /test/postman/01_Onboard_Vendor.postman_collection.json | |
parent | 057c10b4339a1adff9846db38297c70e45094b15 (diff) |
update Postman collections and doc,with corrections
Issue-ID: INT-1340
Signed-off-by: Rene_Robert <rene.robert@orange.com>
Change-Id: Idcb5ef7669805f0d8c4266ee45310078d33260c2
Diffstat (limited to 'test/postman/01_Onboard_Vendor.postman_collection.json')
-rw-r--r-- | test/postman/01_Onboard_Vendor.postman_collection.json | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/test/postman/01_Onboard_Vendor.postman_collection.json b/test/postman/01_Onboard_Vendor.postman_collection.json index 123f5f575..17d23d320 100644 --- a/test/postman/01_Onboard_Vendor.postman_collection.json +++ b/test/postman/01_Onboard_Vendor.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "fa388fc9-15ed-4e6c-8c47-96fdc4ac7f12", + "_postman_id": "338c7225-c4d5-40c8-8619-ae904f41a83d", "name": "01_Onboard_Vendor", "description": "onboard new vendor", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" @@ -22,20 +22,19 @@ "", "var vendor_found = false;", "for (var i = 0; i < jsonData.results.length; i++) { ", - " if (jsonData.results[i].name === pm.globals.get(\"vendor_name\")) {", + " if (jsonData.results[i].name === pm.environment.get(\"vendor_name\")) {", " vendor_found = true;", - " pm.globals.set(\"auto_vendor_id\", \"\"+jsonData.results[i].id+\"\");", + " pm.environment.set(\"auto_vendor_id\", \"\"+jsonData.results[i].id+\"\");", " }", "}", "if (vendor_found === false) {", - " tests[pm.globals.get(\"vendor_name\")+\" not yet declared\"] = true;", + " tests[pm.environment.get(\"vendor_name\")+\" not yet declared\"] = true;", "}", "", "else {", - " tests[pm.globals.get(\"vendor_name\")+\" already exists, we stop the run\"] = false;", + " tests[pm.environment.get(\"vendor_name\")+\" already exists, we stop the run\"] = false;", " postman.setNextRequest(null);", "}", - "", "" ], "type": "text/javascript" @@ -100,8 +99,8 @@ "", "var jsonData = pm.response.json();", "", - "pm.globals.set(\"auto_vendor_id\", \"\"+jsonData.itemId+\"\");", - "pm.globals.set(\"auto_vendor_version_id\", \"\"+jsonData.version.id+\"\");", + "pm.environment.set(\"auto_vendor_id\", \"\"+jsonData.itemId+\"\");", + "pm.environment.set(\"auto_vendor_version_id\", \"\"+jsonData.version.id+\"\");", "", "tests[\"Vendor status is : \"+jsonData.version.status] = jsonData.version.status === \"Draft\";" ], @@ -169,12 +168,12 @@ "", "var vendor_found = false;", "for (var i = 0; i < jsonData.results.length; i++) { ", - " if (jsonData.results[i].name === pm.globals.get(\"vendor_name\")) {", + " if (jsonData.results[i].name === pm.environment.get(\"vendor_name\")) {", " vendor_found = true;", - " pm.globals.set(\"auto_vendor_id\", \"\"+jsonData.results[i].id+\"\");", + " pm.environment.set(\"auto_vendor_id\", \"\"+jsonData.results[i].id+\"\");", " }", "}", - "tests[pm.globals.get(\"vendor_name\")+\" found\"] = vendor_found === vendor_found;", + "tests[pm.environment.get(\"vendor_name\")+\" found\"] = vendor_found === vendor_found;", "", "", "" |