226: Convert approved requisition to orders
Test Case #:226
| Test Case Name: Convert approved requisition to orders |
System: openLMIS | Subsystem: requisition |
Test case designed by: Lucyna Kwidzinska | Design Date:10.08.2016 |
Short description: As a storeroom manager creating a requisition, I want my requisitions to be converted to an order for my filling warehouse once my requisition has been approved so that supplying warehouse is aware of my stock needs.
|
|
Pre – conditions: |
|
Step | Action | Expected system response | Comment |
| Note: Remember to generate token for authentication using some rest client. |
| Copy the token from response (e.g. {"access_token":"121d02ed-b6b4-4233-9566-cac2b8a3aec9"...). The token will expire after 1 hour. Then, it's necessary to generate the new one. |
1 | Create geographicZone Method: POST Example body: { "code": "zonecode", "name": "zonename", }
| status: 201 created is returned,
|
|
2 | Create geographicLevel Method: POST Example body: { "code": "levelcode", "name": "levelname", "levelNumber": "2" } | status: 201 created is returned, |
|
3 | Create facilityType Method: POST Example body: { "code": "codefac", "name": "namefac", "description": "abc" } | status: 201 created is returned, |
|
4 | Create Schedule Method: POST Example body: { "code": "schedulecode", "description": "desccode", "name": "schedulename" } | status: 201 created is returned, |
|
5 | Create Period Method: POST Example body: { "processingSchedule": { "id": "136e5c30-8bf0-437c-b8b2-7485fbd966c4", "code": "schedulecode", "description": "desccode", "name": "schedulename" }, "name": "periodname", "description": "descperiod", "startDate": "2016-08-10", "endDate": "2016-08-12" } | status: 201 created is returned, |
|
6 | Create program Method: POST Example body: { "code": "programcode", "name": "programname", "periodsSkippable": "true" } | status: 201 created is returned, |
|
7 | Create facility Method: POST Example body: { "code": "facilitycode", "name": "facilityname", "descirption": "abc", "geographicZone": "http://localhost:8080/api/geographicZones/e39d79d7-6c65-47ac-9be5-c4090b40753c", "active": "true", "enabled": "true" } | status 201 created is returned,
|
|
8 |
SupervisoryNode. Method: POST Example body: { "code": "nodecode", "name": "nodename",
}
| status 201 created is returned,
|
|
9 | Create supplyLine. Method: POST Example body: { "supervisoryNode": "http://localhost:8080/api/supervisoryNodes/2e7cce9d-dabd-43ae-9283-05be2471ad21", "supplyingFacility": "http://localhost:8080/api/facilities/314e7992-c717-4ae1-89fa-821c15bc2c37" } | status 201 created is returned, |
|
10 | Create requisition. Method: POST Example body: { "processingPeriod": "http://localhost:8080/api/periods/45dbaf0f-6be7-462f-b66e-530317eb03ae", "status": "APPROVED", "emergency": "true", "supervisoryNode": "http://localhost:8080/api/supervisoryNodes/2e7cce9d-dabd-43ae-9283-05be2471ad21" } | status: 201 created is returned.
|
|
11 | Try to convert requisition to order. URL: http://localhost:8080/api/orders/requisitions/?access_token=68be1238-021f-4126-a676-8fdb7dca0d6d Method: POST Example body: [ { "id": "381204d6-f801-4a10-8d44-fc1734c33592"} ] | status: 201 created is returned. The status of requisition is changed to RELEASED. |
|
12 | Verify if order is created. Method: GET
| status: 200 OK is returned. |
|
Post – conditions: |
OpenLMIS: the global initiative for powerful LMIS software