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

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

Find a user with assigned roles.

Method: GET

 

3

 List all requisitions ready for convert to order.

Method: GET

 

 

 

4

Get all the facilities that the user has fulfillment rights for. 

Method: GET

 

5

Get all the facilities that the user supervises, by right and program. 

Methof: GET

 

6

 Retrieve all available supplying facilities for program and supervisory node.

Method: GET

 

7

 Conver to order the requisition.

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.                       

 

9

Try to convert the requisition to order when

 

 

Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software