773: Skip the authorization step
Test Case #:773 | Test Case Name: Skip the authorization step |
System: OpenLMIS | Subsystem: requisition |
Test case designed by: Paulina Borowa | Design Date:29.07.2016 |
Short description: As an implementer, I want to configure the system to skip the authorization step so that we can go straight to approvals and match our current process. |
|
Pre – conditions: |
|
Step | Action | Expected system response | Comment |
1 | Create configurationSettings entity. URL: http://localhost:8080/api/configurationSettings?access_token=3742606d-4b7a-4bc6-b3e8-52107c528339 Method: Post Example Body: { "key": "skipAuthorization", "value": "true" } | Status 201 Created |
|
2 | Create GeographicZones entity. URL: Method: Post Example Body: { "code":"GeoZon", "name":"test" }
| Status 201 Created
geographicZones id: "http://localhost:8080/api/geographicZones/6c3e7e60-8452-40ab-af5c-ed5582d6cb86" |
|
3 | Create facilityTypes entity. URL: Method: Post Example Body: { "code":"facilityT11" } | Status 201 Created facilityTypes id: "http://localhost:8080/api/facilityTypes/5345f1b8-4896-4242-af0a-1e537d667ee0" |
|
4 | Create facilities entity. URL: Method: Post Example Body: { "code":"facilitiees2", "geographicZone":"http://localhost:8080/api/geographicZones/6c3e7e60-8452-40ab-af5c-ed5582d6cb86", "active":true, "enabled":false }
| Status 201 Created |
|
5 | Create program entity. URL: Method: Post Example Body: { "code":"programs", "skipable":true } | Status 201 Created |
|
6 | Create schedules entity. URL: Method: Post Example Body: { "code": "codecode121", "description": null, "modifiedDate": null, "name": "scheduleNamee" } | Status 201 Created |
|
7 | Create periods entity. URL: Method: Post Example Body: { "processingSchedule": { "id": "98e9eee9-25f0-4f8b-88d6-f9d0e826e6c7", "code": "codecode121", "description": null, "modifiedDate": "2016-07-29T09:07:12.280", "name": "scheduleNamee" }, "name": "name90", "description": "descriptiontest", "startDate": "2016-08-22", "endDate": "2016-08-23" } | Status 201 Created periods id: "733ab7c9-75e7-4be8-b5a6-a9bfc70adad5", |
|
8 | Create requisition entity. URL: Method: Post Example Body: { "processingPeriod":"http://localhost:8080/api/periods/733ab7c9-75e7-4be8-b5a6-a9bfc70adad5", "status":"SUBMITTED" } | Sctatus 201 Created |
|
9 | Check URL: /api/requisitions/{id}/authorize Method: Post URL:
|
| should return status BAD REQUEST |
10 | Check URL: /api/requisitions/{id}/approve Method: Post URL:
| should return requisition with status = APPROVED |