Skip to content

Commit

Permalink
#26861 fixing the postman test
Browse files Browse the repository at this point in the history
  • Loading branch information
jdotcms committed Dec 6, 2023
1 parent b358f45 commit a9970e4
Showing 1 changed file with 86 additions and 2 deletions.
88 changes: 86 additions & 2 deletions dotCMS/src/curl-test/Workflow_Resource_Tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -16530,6 +16530,67 @@
{
"name": "issue-26861",
"item": [
{
"name": "CreateItaliam",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();",
"",
"pm.collectionVariables.set(\"italianLanguageId\", jsonData.entity.id);",
"pm.test(\"Status code should be ok 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "admin",
"type": "string"
},
{
"key": "username",
"value": "admin@dotcms.com",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"languageCode\":\"it\",\n \"countryCode\":\"it\",\n \"language\":\"Italian\",\n \"country\":\"Italy\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{serverURL}}/api/v2/languages",
"host": [
"{{serverURL}}"
],
"path": [
"api",
"v2",
"languages"
]
}
},
"response": []
},
{
"name": "CreateEnglish",
"event": [
Expand All @@ -16539,7 +16600,7 @@
"exec": [
"var jsonData = pm.response.json();",
"",
"pm.collectionVariables.set(\"identifier\", jsonData.entity.identifier);",
"pm.collectionVariables.set(\"englishidentifier\", jsonData.entity.identifier);",
"pm.test(\"Status code should be ok 200\", function () {",
" pm.response.to.have.status(200);",
"});",
Expand Down Expand Up @@ -16621,11 +16682,26 @@
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "admin",
"type": "string"
},
{
"key": "username",
"value": "admin@dotcms.com",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"contentlet\":{\n \"identifier\":\"{{identifier}}\",\n \"languageId\":2,\n \"contentType\":\"webPageContent\",\n \"title\":\"TestEnglishSpanish\",\n \"contentHost\":\"default\",\n \"body\":\"Cuerpo de prueba\"\n }\n}",
"raw": "{\n \"contentlet\":{\n \"identifier\":\"{{englishidentifier}}\",\n \"languageId\":{{italianLanguageId}},\n \"contentType\":\"webPageContent\",\n \"title\":\"TestEnglishSpanish\",\n \"contentHost\":\"default\",\n \"body\":\"Corpo di prova\"\n }\n}",
"options": {
"raw": {
"language": "json"
Expand Down Expand Up @@ -16787,6 +16863,14 @@
{
"key": "identifier22756",
"value": ""
},
{
"key": "englishidentifier",
"value": ""
},
{
"key": "italianLanguageId",
"value": ""
}
]
}

0 comments on commit a9970e4

Please sign in to comment.