Test Case #:284
Test Case Name: Refactor hasRight endpoint to check supervision rights by facility | |
System: openLMIS | Subsystem: blue |
Test case designed by: Lucyna Laska | Design Date:21.11.2016 |
Short description: |
|
Pre – conditions: |
Step | Action | Expected system response | Comment |
1 | Check if administrator has an supervisory right assigned to his program and facility. URL: | true | |
2 | Check if administrator has an orderfulfillment right assigned. URL: | true | |
3 | Check if administrator has an supervisory right to proper program with wrong facilityId (without access to this) URL: | false | |
Check if administrator has the Order Fulfillmnet right when wrong warehouseID is provided (without access to this). URL: | false | ||
Check if administrator can verify his rights when program is definined in request but facility don't. URL: | error mesage displayed | ||
4 | Check if it possible to check the user rights when parameter rightID is not specified in the request. URL: | no | |
6 | Check if devadmin has the supervision right when rights are not assigned. URL: | false | Assign supervision right to devadmin: { "id": "56a50e9a-9668-437d-a09c-7e709ce22222", "username": "devadmin", "firstName": "Admin", "lastName": "Admin", "email": "devadmin@openlmis.org", "timezone": "CET", "homeFacility": { "code": "W01", "name": "CMST Warehouse", "geographicZone": { "code": "Mal-So", "name": "Southern Region", "level": { "code": "Region", "levelNumber": 2, "id": "9b497d87-cdd9-400e-bb04-fae0bf6a9491" }, "id": "0bbd69c1-e20f-48f5-aae4-26dcd8aa7602" }, "type": { "code": "WH", "name": "Warehouse", "displayOrder": 3, "active": true, "id": "e2faaa9e-4b2d-4212-bb60-fd62970b2113" }, "operator": { "code": "moh", "name": "Ministry of Health", "displayOrder": 1, "id": "9456c3e9-c4a6-4a28-9e08-47ceb16a4121" }, "active": true, "enabled": true, "openLmisAccessible": true, "supportedPrograms": [ { "code": "PRG003", "name": "New program", "active": true, "periodsSkippable": false, "id": "66032ea8-b69b-4102-a1eb-844e57143187" } ], "id": "19121381-9f3d-4e77-b9e5-d3f59fc1639e" }, "verified": true, "active": true, "loginRestricted": false, "roleAssignments": [ { "roleId": "d30a2fbb-51d9-49ad-90fe-fb405470a439", "programCode": "PRG003", "supervisoryNodeCode": "N3" }] } |
7 | After assigning the supervision right check again, if user has an access now. URL: | true | |
8 |
Post – conditions: |