227: Assign supplying depot to requisitions for "Convert to Order"

Test Case #:227


Test Case Name: Assign supplying depot to requisitions for "Convert to Order"

System: openLMIS

Subsystem: blue

Test case designed by: Lucyna Laska

Design Date:10.11.2016

Short description

  • Provide API endpoint(s) to retrieve all valid supplying depots for a given approved requisition
    • valid supplying depots - look into the logic in v2 to determine which supplying depots should be considered valid (I think some combination of supply line/supervisory node/program) Please update the acceptance criteria once it is identified
  • can select the supplying depot (depots are previously defined and sit in reference data) and assign it to a specific approved requisition (UI)
  • once supply depot is assigned to the requisition, the user can 'convert to order' (process of converting an order is addressed in another story OLMIS-226 Done ) (may be mainly in the UI)
    • convert to order process should retrieve the supply depot selected
  • receive an error message if they attempt to convert an order without selecting a supply depot
  • can select and assign supplying depots to multiple requisitions at once (then all will be converted)
  • the system pre-populates the supply depot when there is only one depot associated with the requisition in the system (not sure if this is just within the UI or if this can be implemented in the API calls)
  • appropriate user permissions are enforced

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

Step

Action

Expected system response

Comment

1

                                                                               Ticket has been verified using demo-data.                                                                              

                                                                                                                            

                                                 

2

 

 

3

 List all requisitions ready for convert to order.

URL:   http://10.222.17.134/requisition/api/requisitions/requisitionsForApproval?access_token=7da02b0e-a470-47af-a7bb-0881aae453ca

Method: GET



 

 

4

 

 

5

 

 

6

 Retrieve all available supplying facilities for program and supervisory node.

URL:  http://10.222.17.134/referencedata/api/facilities/supplying?programId=dce17f2e-af3e-40ad-8e00-3496adef44c3&supervisoryNodeId=fb38bd1c-beeb-4527-8345-900900329c10&access_token=7aa056cb-92e4-4b9f-aa70-11dd10c12b2d

Method: GET

 

 

7

 Conver to order the requisition.

URL:  http://10.222.17.134/requisition/api/orders/requisitions?access_token=d29b9565-dc41-4895-862f-ac447614b95d

Method: GET

Body:

 [

{

"requisitionId": "c6ce0209-6caf-4f40-bea8-01ce529fdc67",

"supplyingDepotId": "e6799d64-d10d-4011-b8c2-0e4d4a3f65ce"

}

]

 

 

8

                        Try to convert to order the requistion when it's not APPROVED.                       

 

 

9Try to convert the requisition to order when

Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software