Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

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.


Verify That

  • approved requisitions are converted to an order (an order file is created)
  • an order object is associated with the requisition
  • requisition status is updated
  • an unique order number is assigned (order number is generated based on the order number configuration)

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

                                                             

Create geographicZone

URL: http://localhost:8080/api/geographicZones/?access_token=b31b42b5-6acf-4d3d-b8de-19597374c53b

Method: POST

Example body:

{

"code": "zonecode",

"name": "zonename",

"level": "http://localhost:8080/api/geographicLevels/137ca6e0-2bf7-4937-ac0a-71e4f76f81e5"

}

                                                                                                          
                                                                                                                                                                             

2

Create geographicLevel

URL: http://localhost:8080/api/geographicLevels/?access_token=b31b42b5-6acf-4d3d-b8de-19597374c53b

Method: POST

Example body:

{

"code": "levelcode",

"name": "levelname",

"levelNumber": "2"

}

 

 

3

Create facilityType

URL: http://localhost:8080/api/facilityTypes/?access_token=b31b42b5-6acf-4d3d-b8de-19597374c53b

Method: POST

Example body:

{

"code": "codefac",

"name": "namefac",

"description": "abc"

}

 

 

4

Create Schedule

URL: http://localhost:8080/api/schedules/?access_token=b31b42b5-6acf-4d3d-b8de-19597374c53b

Method: POST

Example body:

{

"code": "schedulecode",

"description": "desccode",

"name": "schedulename"

}

 

 

5

Create Period

URL: http://localhost:8080/api/periods/?access_token=b31b42b5-6acf-4d3d-b8de-19597374c53b

Method: POST

Example body:

{

"processingSchedule": {

"id": "4aeabf8e-ac1b-4b80-9d19-4f14f22e7bbc",

"code": "schedulecode",

"description": "desccode",

"name": "schedulename"

},

"name": "periodname",

"description": "descperiod",

"startDate": "2016-08-10",

"endDate": "2016-08-12"

}

  

6

Create program

URL: http://localhost:8080/api/programs/?access_token=b31b42b5-6acf-4d3d-b8de-19597374c53b

Method: POST

Example body:

{

"code": "programcode",

"name": "programname",

"periodsSkippable": "true"

}

 

 

7

Create facility

URL: http://localhost:8080/api/facilities/?access_token=b31b42b5-6acf-4d3d-b8de-19597374c53b

Method: POST

Example body:

{

"code": "facilitycode",

"name": "facilityname",

"description": "abc",

"geographicZone":"http://localhost:8080/api/geographicZones/828ad26c-746f-441f-8a36-7e4be8041a2f" ,

"type": "http://localhost:8080/api/facilityTypes/b4a5490e-e67a-465c-ae55-68e769604252",

"active": "true",

"enabled": "true"

}

 

 

8

                      

SupervisoryNode.

URL: http://localhost:8080/api/supervisoryNodes/?access_token=b31b42b5-6acf-4d3d-b8de-19597374c53b

Method: POST

Example body:

{

"code": "nodecode",

"name": "nodename",

"facility": "http://localhost:8080/api/facilities/2b746ecc-cafa-4da5-b41f-0fe42ce6dfa3"

 

}

                          
 

 

9

Create supplyLine.

URL: http://localhost:8080/api/supplyLines/?access_token=b31b42b5-6acf-4d3d-b8de-19597374c53b

Method: POST

Example body:

{

"supervisoryNode": "http://localhost:8080/api/supervisoryNodes/ad38831e-ef05-4e67-80b0-66c935dcca93",

"program": "http://localhost:8080/api/programs/919d0e61-348d-4385-9e85-1db6f6baa8bd",

"supplyingFacility": "http://localhost:8080/api/facilities/2b746ecc-cafa-4da5-b41f-0fe42ce6dfa3"

}

  
10

Create requisition.

URL: http://localhost:8080/api/requisitions/?access_token=b31b42b5-6acf-4d3d-b8de-19597374c53b

Method: POST

Example body:

{

"facility": "http://localhost:8080/api/facilities/2b746ecc-cafa-4da5-b41f-0fe42ce6dfa3",

"program":"http://localhost:8080/api/programs/919d0e61-348d-4385-9e85-1db6f6baa8bd",

"processingPeriod": "http://localhost:8080/api/periods/048c1d14-59de-4b73-8ed1-1ebb85bb2976",

"status": "APPROVED",

"emergency": "true",

"supervisoryNode": "http://localhost:8080/api/supervisoryNodes/ad38831e-ef05-4e67-80b0-66c935dcca93"

}

  
11

Try to convert requisition to order.

URL: http://localhost:8080/api/orders/requisitions/?access_token=b31b42b5-6acf-4d3d-b8de-19597374c53b

Method: POST

Example body:

 [

"id": {"35ae9e88-0f7f-4e52-9583-4756237404e5"}

]

  

 

 

Post – conditions:

  • No labels