-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca00104
commit 85c8fed
Showing
4 changed files
with
227 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2049,6 +2049,161 @@ | |
} | ||
], | ||
"description": "This Test Collection will verify that the Content Type Filtering Endpoint works as expected. This endpoint can take a list of specific Content Types and perform filtering and pagination operations on them." | ||
}, | ||
{ | ||
"name": "Test delete publish/expire field", | ||
"item": [ | ||
{ | ||
"name": "Create ContentType with publish/expire fields", | ||
"event": [ | ||
{ | ||
"listen": "test", | ||
"script": { | ||
"exec": [ | ||
"var jsonData = pm.response.json();", | ||
"", | ||
"pm.collectionVariables.set(\"contentTypeID\", jsonData.entity[0].id);", | ||
"pm.collectionVariables.set(\"contentTypeVAR\", jsonData.entity[0].variable);", | ||
"pm.collectionVariables.set(\"contentTypeFieldID\", jsonData.entity[0].fields[0].id);", | ||
"", | ||
"pm.test(\"Status code should be ok 200\", function () {", | ||
" pm.response.to.have.status(200);", | ||
"});", | ||
"", | ||
"pm.test(\"icon check\", function () {", | ||
" pm.expect(jsonData.entity[0].icon).to.eql('testIcon');", | ||
"});", | ||
"", | ||
"pm.test(\"Fields check\", function () {", | ||
" pm.expect(jsonData.entity[0].fields.length).to.eql(2);", | ||
"});" | ||
], | ||
"type": "text/javascript" | ||
} | ||
} | ||
], | ||
"request": { | ||
"auth": { | ||
"type": "basic", | ||
"basic": [ | ||
{ | ||
"key": "password", | ||
"value": "admin", | ||
"type": "string" | ||
}, | ||
{ | ||
"key": "username", | ||
"value": "[email protected]", | ||
"type": "string" | ||
}, | ||
{ | ||
"key": "saveHelperData", | ||
"type": "any" | ||
}, | ||
{ | ||
"key": "showPassword", | ||
"value": false, | ||
"type": "boolean" | ||
} | ||
] | ||
}, | ||
"method": "POST", | ||
"header": [ | ||
{ | ||
"key": "Content-Type", | ||
"name": "Content-Type", | ||
"type": "text", | ||
"value": "application/json" | ||
} | ||
], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n\t\"clazz\": \"com.dotcms.contenttype.model.type.SimpleContentType\",\n\t\"description\": \"My Structure\",\n\t\"defaultType\": false,\n\t\"system\": false,\n\t\"folder\": \"SYSTEM_FOLDER\",\n\t\"name\": \"Test dates content {{$randomBankAccount}}\",\n\t\"variable\": \"testDatesContent{{$randomBankAccount}}\",\n\t\"host\": \"SYSTEM_HOST\",\n\t\"fixed\": false,\n \"icon\": \"testIcon\",\n \"sortOrder\": 3,\n \"publishDateVar\": \"publishDate\",\n \"expireDateVar\": \"expireDate\",\n\t\"fields\": [\n {\n \"clazz\": \"com.dotcms.contenttype.model.field.ImmutableDateTimeField\",\n \"dataType\": \"DATE\",\n \"fieldType\": \"Date-and-Time\",\n \"fieldTypeLabel\": \"Date and Time\",\n \"fieldVariables\": [],\n \"fixed\": false,\n \"forceIncludeInApi\": false,\n \"indexed\": true,\n \"listed\": true,\n \"name\": \"Publish Date\",\n \"readOnly\": false,\n \"required\": false,\n \"searchable\": false,\n \"sortOrder\": 3,\n \"unique\": false,\n \"variable\": \"publishDate\"\n },\n {\n \"clazz\": \"com.dotcms.contenttype.model.field.ImmutableDateTimeField\",\n \"dataType\": \"DATE\",\n \"fieldType\": \"Date-and-Time\",\n \"fieldTypeLabel\": \"Date and Time\",\n \"fieldVariables\": [],\n \"fixed\": false,\n \"forceIncludeInApi\": false,\n \"iDate\": 1685054935000,\n \"indexed\": true,\n \"listed\": true,\n \"modDate\": 1685054935000,\n \"name\": \"Expire Date\",\n \"readOnly\": false,\n \"required\": false,\n \"searchable\": false,\n \"sortOrder\": 3,\n \"unique\": false,\n \"variable\": \"expireDate\"\n }\n\n\t],\n \"workflow\":[\"d61a59e1-a49c-46f2-a929-db2b4bfa88b2\"]\n}" | ||
}, | ||
"url": { | ||
"raw": "{{serverURL}}/api/v1/contenttype", | ||
"host": [ | ||
"{{serverURL}}" | ||
], | ||
"path": [ | ||
"api", | ||
"v1", | ||
"contenttype" | ||
] | ||
}, | ||
"description": "Given a content type payload containing field variables.\nWhen sending a POST.\nExpect that code is 200.\nExpect content type is created with the provided fields.\nExpect that new properties of content types are set (icon and sortOrder)." | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Delete dateTime field", | ||
"event": [ | ||
{ | ||
"listen": "test", | ||
"script": { | ||
"exec": [ | ||
"pm.test(\"Status code should be 400\", function () {", | ||
" pm.response.to.have.status(400);", | ||
"});" | ||
], | ||
"type": "text/javascript" | ||
} | ||
} | ||
], | ||
"request": { | ||
"auth": { | ||
"type": "basic", | ||
"basic": [ | ||
{ | ||
"key": "password", | ||
"value": "admin", | ||
"type": "string" | ||
}, | ||
{ | ||
"key": "username", | ||
"value": "[email protected]", | ||
"type": "string" | ||
}, | ||
{ | ||
"key": "saveHelperData", | ||
"type": "any" | ||
}, | ||
{ | ||
"key": "showPassword", | ||
"value": false, | ||
"type": "boolean" | ||
} | ||
] | ||
}, | ||
"method": "DELETE", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\"fieldsID\": [\"{{contentTypeFieldID}}\"]}", | ||
"options": { | ||
"raw": { | ||
"language": "json" | ||
} | ||
} | ||
}, | ||
"url": { | ||
"raw": "{{serverURL}}/api/v3/contenttype/{{contentTypeID}}/fields", | ||
"host": [ | ||
"{{serverURL}}" | ||
], | ||
"path": [ | ||
"api", | ||
"v3", | ||
"contenttype", | ||
"{{contentTypeID}}", | ||
"fields" | ||
] | ||
}, | ||
"description": "Given a content type ID.\nExpect that code is 200.\nExpect content type is deleted successfully." | ||
}, | ||
"response": [] | ||
} | ||
] | ||
} | ||
], | ||
"variable": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters