Add normal and abnormal test scripts for set privacy policy for warranty. #229
This commit is contained in:
parent
becfad3075
commit
7a5de5c7a4
1 changed files with 343 additions and 40 deletions
|
|
@ -1807,6 +1807,285 @@
|
|||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "[Normal] Set Privacy Policy to Existing Policy",
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"id": "b8b714b9-9019-4c5b-ab03-ef8787fff1ac",
|
||||
"exec": [
|
||||
"pm.test(\"Status code is 200\", function () {",
|
||||
" pm.response.to.have.status(200);",
|
||||
"});",
|
||||
"",
|
||||
"pm.test(\"Set privacy policy\", function () {",
|
||||
" var jsonData = pm.response.json();",
|
||||
" pm.expect(jsonData.error.status).to.eql(\"success\");",
|
||||
"});"
|
||||
],
|
||||
"type": "text/javascript"
|
||||
}
|
||||
}
|
||||
],
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "privacy_policy_id",
|
||||
"value": "{{privacy_policy_id}}",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{resq_url}}/api/warranty/{{wid}}/privacy_policy?api_key={{preset_api_key}}",
|
||||
"host": [
|
||||
"{{resq_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"warranty",
|
||||
"{{wid}}",
|
||||
"privacy_policy"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "api_key",
|
||||
"value": "{{preset_api_key}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "[Normal] Set Privacy Policy to null",
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"id": "b8b714b9-9019-4c5b-ab03-ef8787fff1ac",
|
||||
"exec": [
|
||||
"pm.test(\"Status code is 200\", function () {",
|
||||
" pm.response.to.have.status(200);",
|
||||
"});",
|
||||
"",
|
||||
"pm.test(\"Set privacy policy\", function () {",
|
||||
" var jsonData = pm.response.json();",
|
||||
" pm.expect(jsonData.error.status).to.eql(\"success\");",
|
||||
"});"
|
||||
],
|
||||
"type": "text/javascript"
|
||||
}
|
||||
}
|
||||
],
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "privacy_policy_id",
|
||||
"value": "0",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{resq_url}}/api/warranty/{{wid}}/privacy_policy?api_key={{preset_api_key}}",
|
||||
"host": [
|
||||
"{{resq_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"warranty",
|
||||
"{{wid}}",
|
||||
"privacy_policy"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "api_key",
|
||||
"value": "{{preset_api_key}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "[Abnormal] Set Privacy Policy - Non existent privacy policy",
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"id": "b8b714b9-9019-4c5b-ab03-ef8787fff1ac",
|
||||
"exec": [
|
||||
"pm.test(\"Status code is 200\", function () {",
|
||||
" pm.response.to.have.status(200);",
|
||||
"});",
|
||||
"",
|
||||
"pm.test(\"Set privacy policy - Non existent privacy policy\", function () {",
|
||||
" var jsonData = pm.response.json();",
|
||||
" pm.expect(jsonData.error.status).to.eql(\"error\");",
|
||||
" pm.expect(jsonData.error.message).to.eql(\"No privacy policy found.\");",
|
||||
"});"
|
||||
],
|
||||
"type": "text/javascript"
|
||||
}
|
||||
}
|
||||
],
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "privacy_policy_id",
|
||||
"value": "{{non_existent_policy_id}}",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{resq_url}}/api/warranty/{{wid}}/privacy_policy?api_key={{preset_api_key}}",
|
||||
"host": [
|
||||
"{{resq_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"warranty",
|
||||
"{{wid}}",
|
||||
"privacy_policy"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "api_key",
|
||||
"value": "{{preset_api_key}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "[Abnormal] Set Privacy Policy - Non-existent warranty",
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"id": "b8b714b9-9019-4c5b-ab03-ef8787fff1ac",
|
||||
"exec": [
|
||||
"pm.test(\"Status code is 200\", function () {",
|
||||
" pm.response.to.have.status(200);",
|
||||
"});",
|
||||
"",
|
||||
"pm.test(\"Set privacy policy - Non existent warranty\", function () {",
|
||||
" var jsonData = pm.response.json();",
|
||||
" pm.expect(jsonData.error.status).to.eql(\"error\");",
|
||||
" pm.expect(jsonData.error.message).to.eql(\"No warranty found.\");",
|
||||
"});"
|
||||
],
|
||||
"type": "text/javascript"
|
||||
}
|
||||
}
|
||||
],
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "privacy_policy_id",
|
||||
"value": "{{privacy_policy_id}}",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{resq_url}}/api/warranty/{{non_existent_wid}}/privacy_policy?api_key={{preset_api_key}}",
|
||||
"host": [
|
||||
"{{resq_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"warranty",
|
||||
"{{non_existent_wid}}",
|
||||
"privacy_policy"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "api_key",
|
||||
"value": "{{preset_api_key}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "[Abnormal] Set Privacy Policy - Missing policy ID",
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"id": "b8b714b9-9019-4c5b-ab03-ef8787fff1ac",
|
||||
"exec": [
|
||||
"pm.test(\"Status code is 200\", function () {",
|
||||
" pm.response.to.have.status(200);",
|
||||
"});",
|
||||
"",
|
||||
"pm.test(\"Set privacy policy - missing policy ID\", function () {",
|
||||
" var jsonData = pm.response.json();",
|
||||
" pm.expect(jsonData.error.status).to.eql(\"error\");",
|
||||
" pm.expect(jsonData.error.message).to.eql(\"Missing parameter(s): privacy_policy_id\");",
|
||||
"});"
|
||||
],
|
||||
"type": "text/javascript"
|
||||
}
|
||||
}
|
||||
],
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "privacy_policy_id",
|
||||
"value": "{{privacy_policy_id}}",
|
||||
"type": "text",
|
||||
"disabled": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{resq_url}}/api/warranty/{{wid}}/privacy_policy?api_key={{preset_api_key}}",
|
||||
"host": [
|
||||
"{{resq_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"warranty",
|
||||
"{{wid}}",
|
||||
"privacy_policy"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "api_key",
|
||||
"value": "{{preset_api_key}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
],
|
||||
"event": [
|
||||
|
|
@ -1833,245 +2112,269 @@
|
|||
],
|
||||
"variable": [
|
||||
{
|
||||
"id": "8d2330fb-5db8-46f6-b179-9b587b7ffdae",
|
||||
"id": "b1881df0-5aa2-438c-8ac5-46ccd259f2c0",
|
||||
"key": "resq_url",
|
||||
"value": "resq.local",
|
||||
"type": "string",
|
||||
"disabled": true
|
||||
},
|
||||
{
|
||||
"id": "85913ee7-5c59-4194-b63a-10a2d67e7e13",
|
||||
"id": "59777f63-095b-4325-a86e-f6adceb729a8",
|
||||
"key": "phone_model",
|
||||
"value": "iPhone8",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "9db4816f-5b02-41ac-a517-ea7313349e2f",
|
||||
"id": "fc1b400f-5d55-4471-95f1-359b75eb7a2b",
|
||||
"key": "os_type",
|
||||
"value": "IOS",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "92eabed4-7c39-4cf8-bb8b-3f2422e28a88",
|
||||
"id": "aa7c948b-2de9-4691-82e7-bb6024403602",
|
||||
"key": "os_version",
|
||||
"value": "11.4",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "37fe6cd6-f03f-41e4-be90-dd0130884458",
|
||||
"id": "44e211e0-50f4-4903-9e21-b1527f887390",
|
||||
"key": "phone_id",
|
||||
"value": "11376660-F8BF-46ED-B30A-EF3F361EE223",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "41b56804-7a1e-422e-888c-998eeca61af2",
|
||||
"id": "44636d6d-4522-4ffb-a459-f05011b103a0",
|
||||
"key": "phone_number",
|
||||
"value": "9221111111",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "5613ed18-d7bc-42a2-9052-59ce6cf18384",
|
||||
"id": "4eb61ece-c824-4840-8f14-ae91e34ba6cc",
|
||||
"key": "first_name",
|
||||
"value": "Stiltzkin",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "5d2ed826-cd18-4dea-b175-6fbc444f50d1",
|
||||
"id": "35704451-b847-4099-b119-96c091bdf787",
|
||||
"key": "last_name",
|
||||
"value": "Moogle",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "d33dfddc-44c0-4e85-983d-9b0916021bcc",
|
||||
"id": "0cfe09d1-c6e2-40db-9f19-684ff95f8b9c",
|
||||
"key": "mfg_id",
|
||||
"value": "1435",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "8756da11-2452-4382-bee9-d87a2917c5c0",
|
||||
"id": "e0b3374d-559b-48ca-8df3-b9383b54b1c8",
|
||||
"key": "make_id",
|
||||
"value": "22043",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "062322be-b65a-4a7d-9069-14d5b9e08691",
|
||||
"id": "e462ba31-08b2-4e93-b88d-bde3d74600e1",
|
||||
"key": "name",
|
||||
"value": "Beetle 1.2 TSI MT (Gas)",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "7ffa69c3-0c9b-424e-9d51-16b246843dd5",
|
||||
"id": "f7b3bb29-f9e8-48bf-bb6e-160b5a99537b",
|
||||
"key": "plate_num",
|
||||
"value": "MGL1234",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "24c12bf8-25e9-4487-bbc9-f1f78e9885f0",
|
||||
"id": "56b95327-9735-4e0b-b1b5-6e8dd2a06b57",
|
||||
"key": "model_year",
|
||||
"value": "2016",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "aeaa3842-7788-4978-a9ff-5aa06cd4208e",
|
||||
"id": "21873510-bb46-4b6d-861a-1269b3d693ec",
|
||||
"key": "color",
|
||||
"value": "White",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "7a1d5798-256b-4f58-a901-e0f4d590b791",
|
||||
"id": "ca7c31a9-a64c-44ce-bd21-ed6fb959a8fc",
|
||||
"key": "condition",
|
||||
"value": "Brand New",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "37cc3206-05f8-41cb-bfda-7b31b3ac0f1f",
|
||||
"id": "916d7aad-3769-4680-8898-2f662cd84da8",
|
||||
"key": "fuel_type",
|
||||
"value": "Gas",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "c1c743a5-8795-45ad-9fc3-6b4a3a685b1a",
|
||||
"id": "9335b8b3-c38e-48c9-b2de-f41db10bbe33",
|
||||
"key": "wty_code",
|
||||
"value": "MKUP0123456",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "546efeb7-b0b1-49d6-baed-2bb0d81e6db4",
|
||||
"id": "02c4d2e7-eb4e-4812-b154-b463b5a9d862",
|
||||
"key": "wty_expire",
|
||||
"value": "20201125",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "f593c5e2-a408-453d-ae48-31eb0ac94d2b",
|
||||
"id": "f8c89bf6-1aed-4664-b169-d38cf4fa564d",
|
||||
"key": "service_type",
|
||||
"value": "battery_new",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "ccbd96fb-d538-41c6-aa98-fbd30db888df",
|
||||
"id": "d38e4c12-b0be-4094-838f-474737acb9ae",
|
||||
"key": "trade_in",
|
||||
"value": "MOTOLITE",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "a12f7829-c214-405a-8966-42886a6c01cf",
|
||||
"id": "7b2cfb98-c8cc-42a8-90cd-0cba4f95c49d",
|
||||
"key": "longitude",
|
||||
"value": "121.018039",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "03e74d4e-84b5-486c-a345-c6912c3b634d",
|
||||
"id": "51e80736-d5d6-4bfd-9ea7-d11777924012",
|
||||
"key": "latitude",
|
||||
"value": "14.606807",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "ccc96e0c-20ed-487a-93d4-f587d5868396",
|
||||
"id": "26f630f6-65d3-4d15-8541-e7fb855bcaa6",
|
||||
"key": "warranty",
|
||||
"value": "private",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "1a06bec2-ccff-470b-87c6-976c5fd45e46",
|
||||
"id": "19727bd1-4fb5-4e6e-828f-f8994dac0746",
|
||||
"key": "mode_of_payment",
|
||||
"value": "CASH",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "e0f7a8aa-8641-4be4-b835-9d4e22bc9f66",
|
||||
"id": "3f38ff8a-3657-416f-ba81-edba8aba0786",
|
||||
"key": "delivery_address",
|
||||
"value": "#123 Moogle Drive",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "07b61f80-1944-49e8-9fb1-ba53e138eed6",
|
||||
"id": "423522ed-d679-42bf-8c2c-b2459ca90821",
|
||||
"key": "delivery_instructions",
|
||||
"value": "Look for the red bon-bon",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "49422a74-4683-4fad-80f3-fad0fe7c1674",
|
||||
"id": "9771cf9f-8750-488a-a0bd-d63086cde611",
|
||||
"key": "promo_id",
|
||||
"value": "1",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "6f778734-29ec-47d3-b8c0-dc56c403408c",
|
||||
"id": "43a22bdb-8b53-4afa-af73-0eb900fcc8cf",
|
||||
"key": "code",
|
||||
"value": "123456",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "4f5e4acf-511e-43e7-96aa-1bb8f92a60e3",
|
||||
"id": "6f9b4bf9-a70b-48fa-9b37-93ec646e01ed",
|
||||
"key": "batt_id",
|
||||
"value": "1050",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "c43b9981-550a-40b6-b3a6-28007f8bb8a8",
|
||||
"id": "e95eeff1-5999-4a94-939d-f0b317b8b85d",
|
||||
"key": "jo_id_for_rider_rating",
|
||||
"value": "4",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "436646d7-8233-493d-aada-241fe92085a8",
|
||||
"id": "04c336f3-e1c7-40fb-972b-15ab693dea3f",
|
||||
"key": "preset_api_key",
|
||||
"value": "5d427428b1541",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "65fcc401-ba87-4a22-be52-9cf1c7e1ffa5",
|
||||
"id": "71af4a9f-0db2-46d0-9a98-b20397690e1c",
|
||||
"key": "rating",
|
||||
"value": "4",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "d50b735d-29e3-48aa-8391-af2cc638a600",
|
||||
"id": "73fe6c29-ce57-49d9-b6d7-b154b7334c0a",
|
||||
"key": "comment",
|
||||
"value": "Very professional, kupo!",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "e5790ffa-d2aa-4210-936c-9cbcddec4e87",
|
||||
"id": "0fb165ee-feef-403d-b59b-1327a644ea6d",
|
||||
"key": "jo_id_for_cancel_jo",
|
||||
"value": "3",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "d5a7f058-4e54-47ac-b60b-d3595618adb1",
|
||||
"id": "fb396968-a759-4964-b8be-05dc2e0c612d",
|
||||
"key": "cancel_reason",
|
||||
"value": "No money, kupo!",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "ca9ad85f-5809-42aa-afcd-89008810e6b2",
|
||||
"id": "ee6dd9ed-f3e0-4a3a-bb0c-dc0403cdf98f",
|
||||
"key": "device_id",
|
||||
"value": "123456",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "6b7f078a-e509-4fb9-b99d-91c48cb26718",
|
||||
"id": "60b1d451-0af1-40de-a85e-bc2d01aad073",
|
||||
"key": "partner_id",
|
||||
"value": "1",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "98abae1f-9ca4-4041-95d3-62c659fc11b7",
|
||||
"id": "45487aec-b2c4-4e2a-b6c5-ed44dba9de82",
|
||||
"key": "preset_api_key_unconfirmed",
|
||||
"value": "5d439b3a43f40",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "37bddaba-3933-4895-adf9-8b2b1be68d48",
|
||||
"id": "ffe45ee9-85b6-4fc4-806d-f330a72be98f",
|
||||
"key": "service_id",
|
||||
"value": "2",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "94e86dc8-2237-41b1-8fdc-8da7e1ac8331",
|
||||
"id": "ffab2ad5-357e-45e4-b7d7-f27028986e22",
|
||||
"key": "limit",
|
||||
"value": "5",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "37d55a82-d5e7-498a-8b76-e04c1936a3ea",
|
||||
"key": "wid",
|
||||
"value": "185480",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "e6e71ab9-7e61-47a2-8be0-5b02b85dcc5a",
|
||||
"key": "privacy_policy_id",
|
||||
"value": "3",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "749e4f23-b5f1-478d-8927-ee38d3dbf24a",
|
||||
"key": "non_existent_wid",
|
||||
"value": "111111",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "bf0b8bfb-bfeb-4b13-aa52-368a22771813",
|
||||
"key": "non_existent_policy_id",
|
||||
"value": "9999",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in a new issue