Skip to content

Commit

Permalink
#30472 adding postman to check shortyId (#30514)
Browse files Browse the repository at this point in the history
Adding postman to check if shortyId is there
  • Loading branch information
jdotcms authored Oct 31, 2024
1 parent 265496a commit 7408571
Showing 1 changed file with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info": {
"_postman_id": "05e460a0-406c-42b4-a8e7-0d61a8c6f794",
"_postman_id": "015f66fd-6d09-4641-873d-03e8b08011f4",
"name": "ContentResourceV1",
"description": "This folder contains a comprehensive set of API requests related to the `ContentResourceV1` API endpoints. These requests cover various operations such as creating, retrieving and updating content. The folder is organized to help developers and testers efficiently validate and interact with the content resource endpoints in the system.\n\n#### Objectives:\n\n1. **Create Content**:\n \n - Test the creation of new content items with valid and invalid data.\n \n - Ensure that the response includes all necessary details for the created content.\n \n2. **Retrieve Content**:\n \n - Validate the retrieval of content items by ID.\n \n - Ensure the response contains accurate and complete content details.\n \n3. **Update Content**:\n \n - Test updating existing content items with valid and invalid data.\n \n - Verify that the response reflects the updated content accurately.\n \n - Ensure that only authorized users can update content.\n \n4. **Error Handling**:\n \n - Verify that the API returns appropriate error messages for invalid requests.\n \n - Ensure the correct HTTP status codes are used for different error scenarios.\n \n5. **Security**:\n \n - Validate that only authorized users can perform operations on the content.\n \n - Ensure that all security protocols are enforced during API interactions.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
Expand Down Expand Up @@ -474,11 +474,16 @@
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();",
"",
"pm.test(\"Valid response\", function () {",
" pm.expect(pm.response.text()).to.include(\"SucessRequest\");",
"",
" pm.expect(jsonData.entity).to.have.property('shortyId');",
" pm.expect(jsonData.entity).to.have.property('identifier');",
"});",
"",
"var jsonData = pm.response.json();",
"",
"pm.collectionVariables.set(\"contentletIdentifier\", jsonData.entity.identifier);",
"pm.collectionVariables.set(\"contentletInode\", jsonData.entity.inode);",
"",
Expand All @@ -490,6 +495,16 @@
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{jwt}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [
{
Expand All @@ -499,7 +514,7 @@
],
"body": {
"mode": "raw",
"raw": "{ \"contentlet\" : {\n \"stInode\" : \"f4d7c1b8-2c88-4071-abf1-a5328977b07d\",\n \"languageId\" : 1,\n \"key\": \"SucessRequest{{$timestamp}}\",\n \"value\": \"SucessRequest{{$timestamp}}\"\n}\n}"
"raw": "{\n \"contentlet\": {\n \"stInode\": \"f4d7c1b8-2c88-4071-abf1-a5328977b07d\",\n \"languageId\": 1,\n \"key\": \"SucessRequest{{$timestamp}}\",\n \"value\": \"SucessRequest{{$timestamp}}\"\n }\n}"
},
"url": {
"raw": "{{serverURL}}/api/v1/workflow/actions/default/fire/PUBLISH",
Expand Down Expand Up @@ -2871,6 +2886,14 @@
{
"key": "contentIdentifier",
"value": ""
},
{
"key": "contentletIdentifier",
"value": ""
},
{
"key": "contentletInode",
"value": ""
}
]
}

0 comments on commit 7408571

Please sign in to comment.