aboutsummaryrefslogtreecommitdiffstats
path: root/test/postman/01_Onboard_Vendor.postman_collection.json
diff options
context:
space:
mode:
Diffstat (limited to 'test/postman/01_Onboard_Vendor.postman_collection.json')
-rw-r--r--test/postman/01_Onboard_Vendor.postman_collection.json21
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;",
"",
"",
""