-
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
Showing
2 changed files
with
294 additions
and
20 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 |
---|---|---|
@@ -0,0 +1,272 @@ | ||
{ | ||
"info": { | ||
"_postman_id": "029879f9-ad5c-48a1-94b8-12f0369d3605", | ||
"name": "EMA", | ||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", | ||
"_exporter_id": "781456" | ||
}, | ||
"item": [ | ||
{ | ||
"name": "TestNoConfig", | ||
"item": [ | ||
{ | ||
"name": "NoConfig", | ||
"event": [ | ||
{ | ||
"listen": "test", | ||
"script": { | ||
"exec": [ | ||
"pm.test(\"User FE has not access to EMA\", function () {", | ||
" pm.response.to.have.status(404);", | ||
"", | ||
" ", | ||
"});" | ||
], | ||
"type": "text/javascript" | ||
} | ||
} | ||
], | ||
"request": { | ||
"auth": { | ||
"type": "basic", | ||
"basic": [ | ||
{ | ||
"key": "password", | ||
"value": "admin", | ||
"type": "string" | ||
}, | ||
{ | ||
"key": "username", | ||
"value": "admin@dotcms.com", | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "{{serverURL}}/api/v1/ema", | ||
"host": [ | ||
"{{serverURL}}" | ||
], | ||
"path": [ | ||
"api", | ||
"v1", | ||
"ema" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "app-save Copy", | ||
"event": [ | ||
{ | ||
"listen": "test", | ||
"script": { | ||
"exec": [ | ||
"pm.test(\"Status code is 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" | ||
}, | ||
{ | ||
"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 \"configuration\": {\n\t\t \"value\": \"{\\r\\n \\\"config\\\":[\\r\\n {\\r\\n \\\"pattern\\\":\\\"\\/blogs\\/(.*)\\\",\\r\\n \\\"url\\\":\\\"https:\\/\\/myspa.blogs.com:3000\\\",\\r\\n \\\"options\\\":{\\r\\n \\\"authenticationToken\\\":\\\"123\\\",\\r\\n \\\"depth\\\":3,\\r\\n \\\"X-CONTENT-APP\\\":\\\"dotCMS\\\"\\r\\n }\\r\\n },\\r\\n {\\r\\n \\\"pattern\\\":\\\".*\\\",\\r\\n \\\"url\\\":\\\"https:\\/\\/myspa.com:3000\\\",\\r\\n \\\"options\\\":{\\r\\n \\\"authenticationToken\\\":\\\"456\\\",\\r\\n \\\"depth\\\":1,\\r\\n \\\"X-CONTENT-APP\\\":\\\"dotCMS\\\"\\r\\n }\\r\\n }\\r\\n ]\\r\\n }\"\n }\n}\n" | ||
}, | ||
"url": { | ||
"raw": "{{serverURL}}/api/v1/apps/dotema-config-v2/8a7d5e23-da1e-420a-b4f0-471e7da8ea2d", | ||
"host": [ | ||
"{{serverURL}}" | ||
], | ||
"path": [ | ||
"api", | ||
"v1", | ||
"apps", | ||
"dotema-config-v2", | ||
"8a7d5e23-da1e-420a-b4f0-471e7da8ea2d" | ||
] | ||
}, | ||
"description": "This tests the endpoint that brings back one specific App/integration given the App-key followed by the site-id" | ||
}, | ||
"response": [] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "TestFrontEndAccess", | ||
"item": [ | ||
{ | ||
"name": "CreateFrontEndUsers", | ||
"event": [ | ||
{ | ||
"listen": "test", | ||
"script": { | ||
"exec": [ | ||
"pm.test(\"User FE creation sucessfully\", function () {", | ||
" pm.response.to.have.status(200);", | ||
"", | ||
" var jsonData = pm.response.json();", | ||
" console.log(jsonData);", | ||
"", | ||
" pm.expect(jsonData[\"emailAddress\"]).to.eql(\"frontend2@dotcms.com\");", | ||
" pm.expect(jsonData[\"firstName\"]).to.eql(\"FrontEnd\");", | ||
"});" | ||
], | ||
"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 \"userId\":\"userid-fe1-12345678\",\n \"active\":true,\n \"firstName\":\"FrontEnd\",\n \"middleName\":\"F\",\n \"lastName\":\"FE\",\n \"nickName\":\"FE\",\n \"email\":\"frontend2@dotcms.com\",\n \"male\":true,\n \"password\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\"],\n \"roles\":[\"DOTCMS_FRONT_END_USER\"]\n}", | ||
"options": { | ||
"raw": { | ||
"language": "json" | ||
} | ||
} | ||
}, | ||
"url": { | ||
"raw": "{{serverURL}}/api/v1/users", | ||
"host": [ | ||
"{{serverURL}}" | ||
], | ||
"path": [ | ||
"api", | ||
"v1", | ||
"users" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "CallLogout", | ||
"request": { | ||
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "{{serverURL}}/dotAdmin/logout", | ||
"host": [ | ||
"{{serverURL}}" | ||
], | ||
"path": [ | ||
"dotAdmin", | ||
"logout" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "CheckEMAwithFEUserExpectedDenied", | ||
"event": [ | ||
{ | ||
"listen": "test", | ||
"script": { | ||
"exec": [ | ||
"pm.test(\"User FE has not access to EMA\", function () {", | ||
" pm.response.to.have.status(401);", | ||
"", | ||
" ", | ||
"});" | ||
], | ||
"type": "text/javascript" | ||
} | ||
} | ||
], | ||
"request": { | ||
"auth": { | ||
"type": "basic", | ||
"basic": [ | ||
{ | ||
"key": "username", | ||
"value": "frontend2@dotcms.com", | ||
"type": "string" | ||
}, | ||
{ | ||
"key": "password", | ||
"value": "12345678", | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "{{serverURL}}/api/v1/ema", | ||
"host": [ | ||
"{{serverURL}}" | ||
], | ||
"path": [ | ||
"api", | ||
"v1", | ||
"ema" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "TestBeLimitedUser", | ||
"item": [] | ||
} | ||
] | ||
} |
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