240: Confirm Fill Quantities (Finalize Order)

Test Case #:240

 

Test Case Name:Confirm Fill Quantities (Finalize Order)

System: OpenLMIS

Subsystem: requisition

Test case designed by: Lucyna Kwidzińska

Design Date:25.07.2016

Short description: Possibility to update my fill quantities, expiry date, and VVM status based on having physically located the stock to be shipped so that I can confirm I have the physical inventory to fill the order prior to shipping the commodities

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

 Note: Remember to generate token for authentication using some rest client. 

Copy the token from response (e.g. {"access_token":"121d02ed-b6b4-4233-9566-cac2b8a3aec9"...).

The token will expire after 1 hour. Then, it's necessary to generate the new one.

1

                                                        

Create User.

URL:

http://localhost:8080/api/users/?access_token=3637f66b-4374-4482-a79e-888da5970b97

Method: POST

 

Example Body:

{

"username": "userLucy01",

"firstName": "nameLucy",

"lastName": "lastNameLucy01",

"verified": "true",

"active": "true"

}

                                                                                                               
          status: 201 created,          

user id: "http://localhost:8080/api/users/b0bded5a-3540-45a6-bcce-275a0fff9a5b"

                                                 

2

Create Program.

URL:

http://localhost:8080/api/programs/?access_token=3637f66b-4374-4482-a79e-888da5970b97

Method: POST

 

Example Body:

{

"code": "programnew01",

"name": "namenew",

"periodsSkippable": "true"

}

 

 

3

Create geographicLevel.

URL:

http://localhost:8080/api/geographicLevels/?access_token=bc5fb077-e565-405e-853f-87534e6e4bd4

Method: POST

Example Body:

{

"code": "geolevelnew01",

"levelNumber": "10"

}

 
status: 201 created,

geographicLevel id:

"http://localhost:8080/api/geographicLevels/aecd7aa6-3323-4682-b5ef-adddec8e190b"

 

4

Create geographicZone.

URL: http://localhost:8080/api/geographicZones

Method: POST

 

Example Body:

{

"code": "testowyc01",

"level": "http://localhost:8080/api/geographicLevels/aecd7aa6-3323-4682-b5ef-adddec8e190b"


}

 
 status: 201 created,

geographicZone id:

"http://localhost:8080/api/geographicZones/e4726cf2-99ae-43fd-8511-43007c891f3c"

 

5

Create FacilityType.

URL:

http://localhost:8080/api/facilityTypes/?access_token=bc5fb077-e565-405e-853f-87534e6e4bd4

Method: POST

 

Example Body:

{

"code": "facilitytype01",

"name": "name011"

}

 
 

6

Create facility.

URL: http://localhost:8080/api/facilities

Method: Body

 

Example Body:

{

"code": "facilcodenew01",

"geographicZone":"http://localhost:8080/api/geographicZones/e4726cf2-99ae-43fd-8511-43007c891f3c",

"type": "http://localhost:8080/api/facilityTypes/35eca604-db5c-4337-af8f-35d29409efb5",

"active": "true",

"enabled": "true"

}


 

 

7

Create Order.

URL: http://localhost:8080/api/orders

Method: POST

 

Example Body:

{

"createdBy": "http://localhost:8080/api/users/b0bded5a-3540-45a6-bcce-275a0fff9a5b",

"program": "http://localhost:8080/api/programs/dc815cbd-765a-4081-b0df-66dfa43080e1",

"requestingFacility": "http://localhost:8080/api/facilities/9ce62c6d-2cfe-4bae-84ce-47581d0a878f",

"receivingFacility": "http://localhost:8080/api/facilities/9ce62c6d-2cfe-4bae-84ce-47581d0a878f",

"supplyingFacility": "http://localhost:8080/api/facilities/9ce62c6d-2cfe-4bae-84ce-47581d0a878f",

"orderCode": "ordertesty101",

"status": "ORDERED",

"quotedCost": "98.444"


}

 

8

Change the status of the order to SHIPPED (request will be executed successfully if the order was created properly).

Example body:

Method: PUT
Header: TXT/HTML
URL:  http://localhost:8080/api/orders/b8870cc6-3148-411b-ac4b-153da0f65fc5/finalize?access_token=bc5fb077-e565-405e-853f-87534e6e4bd4

 

status: 200 OK,

 

 
9

 

 

 

Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software