1334: Refactor Requisition code to check if facility supports program

Test Case #:1334

Test Case Name: Refactor Requisition code to check if facility supports program

System: OpenLMIS

Subsystem: blue

Test case designed by: Anna Czyrko

Design Date:04.01.2017

Short description

  • Create helper code that calls the reference data endpoint with the correct parameters
  • Have all of the requisition endpoints use this new helper code to do the extra check
  • Update tests if necessary


                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       



Step

Action

Expected system response

Comment

1

                  GO to swagger:  http://test.openlmis.org/referencedata/docs/                                            

GET /api/users/{userId}/supervisedFacilities

                                                                                                                          

                                                 

2

PUT /api/facilities/{id}

Supported program - essential meds
I update facility - now it has only one supported program: Essential Meds, now I try to initiate requisition - I should be able to initiate or submit that requisition because Essential Meds is supported Program.


3

facility - now it has only one supported program: Essential Meds, now I try to initiate requisition, which Family Planning program - I should not be able to initiate or submit that requisition because Family Planning is not supported Program.


OpenLMIS: the global initiative for powerful LMIS software