diff --git a/dotcms-postman/config.json b/dotcms-postman/config.json index dca5b14e7a4..024a7bc6beb 100644 --- a/dotcms-postman/config.json +++ b/dotcms-postman/config.json @@ -8,7 +8,6 @@ "collections": [ "Category.postman_collection", "ContentResourceV1.postman_collection", - "ContentTypeResourceTests", "Content_Resource.postman_collection" ] }, @@ -45,7 +44,10 @@ }, { "name": "template", - "collections": ["Template_Resource.postman_collection"] + "collections": [ + "Template_Resource.postman_collection", + "ContentTypeResourceTests" + ] }, { "name": "workflow", diff --git a/dotcms-postman/src/main/resources/postman/ContentTypeResourceTests.json b/dotcms-postman/src/main/resources/postman/ContentTypeResourceTests.json index fd9694047df..ec84616782d 100644 --- a/dotcms-postman/src/main/resources/postman/ContentTypeResourceTests.json +++ b/dotcms-postman/src/main/resources/postman/ContentTypeResourceTests.json @@ -1866,6 +1866,66 @@ { "name": "Test Get ContentTypes", "item": [ + { + "name": "Ensure Video DotAsset type exists (setup)", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "// Setup: the 'ensure' tests in this folder expect a 'Video' content type to exist.", + "// Nothing in dotCMS creates it eagerly at startup, so when this collection runs", + "// without the collections that create it indirectly, the assertions fail.", + "// Create it if missing so this collection is self-contained (400 = already exists).", + "pm.test(\"Video type exists or was created\", function () {", + " pm.expect([200, 201, 400]).to.include(pm.response.code);", + "});" + ], + "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": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"clazz\": \"com.dotcms.contenttype.model.type.ImmutableDotAssetContentType\",\n \"defaultType\": false,\n \"fixed\": false,\n \"system\": false,\n \"folder\": \"SYSTEM_FOLDER\",\n \"name\": \"Video\",\n \"variable\": \"Video\",\n \"workflow\": [\n \"d61a59e1-a49c-46f2-a929-db2b4bfa88b2\"\n ]\n}" + }, + "url": { + "raw": "{{serverURL}}/api/v1/contenttype", + "host": [ + "{{serverURL}}" + ], + "path": [ + "api", + "v1", + "contenttype" + ] + } + }, + "response": [] + }, { "name": "Get ContentTypes sending HostID", "event": [