429: Facility approved products

Test Case #:429

Test Case Name: Facility approved products

System: OpenLMIS

Subsystem:requisition

Test case designed by: Paulina Borowa

Design Date:12.07.2016

Short description: Allows addition of new and editing of existing products based on program and facility type

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       


Step 

Action

Expected system response

Comment

1

                                                                                        

Create Product entity.

In Url: http://localhost:8080/api/products

Method: Post

Body:

{

"code":"product1dd",

"primaryName":"text",

"dispensingUnit":"diss",

"dosesPerDispensingUnit":"12",

"packSize":"1",

"packRoundingThreshold":"3",

"roundToZero":true,

"active":true,

"fullSupply":false,

"tracer":false

}

                                                                              
       Status 201 Created,

Product id: http://localhost:8080/api/programProducts/f0f49fe1-ce22-4e73-bc64-21325a57c458

                                                                                                                     
                                                 

2

Create FacilityTypeApprovedProduct entity

URL: http://localhost:8080/api/facilityTypeApprovedProducts

Method: Post

Body:

{

"facilityType":"http://localhost:8080/api/facilityTypes/14b329d8-09ec-4826-9ed9-52551a19b1bb",

"programProduct":"http://localhost:8080/api/programProducts/f0f49fe1-ce22-4e73-bc64-21325a57c458",

"maxMonthsOfStock":"22"

}

 
 Status 201 Created, 

FacilityTypeApprovedProduct id: "6c015998-83c3-4e3f-84dc-fcdc9dbd5ac6"

 

3

Edite of existing products based on program and facility type

URL: http://localhost:8080/api/facilityTypeApprovedProducts

Method: Post

Body:

{

"id":"6c015998-83c3-4e3f-84dc-fcdc9dbd5ac6",

"facilityType":"http://localhost:8080/api/facilityTypes/8116779a-f21a-4052-ba21-43d22b472b89",

"programProduct":"http://localhost:8080/api/programProducts/776ea22f-3aee-4036-98fd-6fb68d9dffd9",

"maxMonthsOfStock":"2"

}

 

 

 

OpenLMIS: the global initiative for powerful LMIS software