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: http://localhost:8080/api/geographicZones?access_token=3742606d-4b7a-4bc6-b3e8-52107c528339 Method: Post Example Body: { "code":"GeoZon", "level":"http://localhost:8080/api/geographicLevels/563bd1a9-e53a-4a65-a5cd-bae55614a522", "name":"test" }
| Status 201 Created
|
geographicZones id: "http://localhost:8080/api/geographicZones/6c3e7e60-8452-40ab-af5c-ed5582d6cb86" | ||
3 | Create facilityTypes entity. URL: http://localhost:8080/api/facilityTypes?access_token=3742606d-4b7a-4bc6-b3e8-52107c528339 Method: Post Example Body: { "code":"facilityT11" } | Status 201 Created |
2
3
4
5
6
7
8
facilityTypes id: "http://localhost:8080/api/facilityTypes/5345f1b8-4896-4242-af0a-1e537d667ee0" |
| ||
4 | Create facilities entity. URL: http://localhost:8080/api/facilities?access_token=3742606d-4b7a-4bc6-b3e8-52107c528339 Method: Post Example Body: { "code":"facilitiees2", "geographicZone":"http://localhost:8080/api/geographicZones/6c3e7e60-8452-40ab-af5c-ed5582d6cb86", "type":"http://localhost:8080/api/facilityTypes/5345f1b8-4896-4242-af0a-1e537d667ee0", "active":true, "enabled":false } | Status 201 Created facilities id: "http://localhost:8080/api/facilities/40fee848-00aa-4c51-a170-f18e0c7538e9" |
|
5 | Create program entity. URL: http://localhost:8080/api/programs?access_token=3742606d-4b7a-4bc6-b3e8-52107c528339 Method: Post Example Body: { "code":"programs", "skipable":true } | Status 201 Created program id: "http://localhost:8080/api/programs/8e0a0ef5-14f6-4241-afb5-1769433527cd" |
|
6 | Create schedules entity. URL: http://localhost:8080/api/schedules?access_token=3742606d-4b7a-4bc6-b3e8-52107c528339 Method: Post Example Body: { "code": "codecode121", "description": null, "modifiedDate": null, "name": "scheduleNamee" } | Status 201 Created schedules id: "http://localhost:8080/api/schedules/98e9eee9-25f0-4f8b-88d6-f9d0e826e6c7" | |
7 | Create periods entity. URL: http://localhost:8080/api/periods?access_token=3742606d-4b7a-4bc6-b3e8-52107c528339 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: http://localhost:8080/api/requisitions?access_token=3742606d-4b7a-4bc6-b3e8-52107c528339 Method: Post Example Body: { "facility":"http://localhost:8080/api/facilities/40fee848-00aa-4c51-a170-f18e0c7538e9", "program":"http://localhost:8080/api/programs/8e0a0ef5-14f6-4241-afb5-1769433527cd", "processingPeriod":"http://localhost:8080/api/periods/733ab7c9-75e7-4be8-b5a6-a9bfc70adad5", "status":"SUBMITTED" } | Sctatus 201 Created requisition id: "http://localhost:8080/api/requisitions/a270e26c-a03b-4775-9727-2a82dd52f2dd" |
|
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 |