Test Case #:813
Test Case Name:Configure Total Received Quantity attribute | ||
System: openLMIS | Subsystem: requisitionblue | |
Test case designed by: Lucyna Kwidzińska | Design Date:0203.0811.2016 | |
Short description: I want the option to include and configure the "total received quantity" attribute (Total quantity received in last period. This is quantified in dispensing units) so that storeroom managers can use the information when determining the requested quantities and supervisors understand the amount of inventory received in the last period at the facilities when approving/reviewing requisitions.
|
|
Pre – conditions: |
...
Step | Action | Expected system response | Comment | ||||||||||||
1 | Request a Generate token from authentication service with some rest client:
for authentication. |
| Copy the token from response (e.g. {"access_token":"121d02ed4425beb8-b6b4a9ea-42334590-9566bbc3-cac2b8a3aec9bffed45a59b6"...) | ||||||||||||
2 | Create productCategoryVerify, if field "total Received Quantity" is available in requisition template.
URL: http:/ | /localhost:8080productCategories/ | d694b63b | 4022 | 4b52 | af1f | f397247fa433 | Method: | POSTproductCategory id: "http://localhost:8080/api/productCategories/7a6bd7ee-e84a-42fd-a2e9-3d34d97b2d6c" |
| 3 | Create program.GET | Total Received Quantity is available in requisition template (the source is USER INPUT). | ||
3 | The field "totalReceivedQuantity" is mandatory when submit. d694b63b40224b52af1ff397247fa433Method: POST Example body: { "code": "programcode", "name": "programname", "periodsSkippable": "true" } |
| 4 | Create product. URL: http://localhost:8080/api/products/ | |||||||||||
4 | Edit the requisition → enter the positive value into "totalReceivedQuantity" in requisition. URL: http://10.222.17.134/requisition/api/requisitions/fd575c05-c469-4bb4-b5d3-4e8937a8c1ff?access_token= d694b63b40224b52af1ff397247fa433Method: POSTExample body: { "code": "productcode", "primaryName": "productname01", "dispensingUnit": "unittest", "dosesPerDispensingUnit": "2", "packSize": "2", "packRoundingThreshold": "2", "roundToZero": "true", "active": "true", "fullSupply": "true", "tracer": "true", "productCategory": "http://localhost:8080/api/productCategories/7a6bd7ee-e84a-42fd-a2e9-3d34d97b2d6c" } |
| |||||||||||||
5 | Create RequisitionLine. URL: http://localhost:8080/api/requisitionLines/?access_token=d694b63b-4022-4b52-af1f-f397247fa433 Method: POST Example body: { "product": "http://localhost:8080/api/products/147f2ee3-dc9b-46ab-82c8-a545d79c9e32", "stockInHand": "12", "beginningBalance": "10", "totalReceivedQuantity": "8", "totalLossesAndAdjustments": "2", "stockOnHand": "2", "requestedQuantity": "2", "totalConsumedQuantity": "2", "requestedQuantityExplenation": "2" } | requisitionLine id: "http://localhost:8080/api/requisitionLines/b2ec434a-9215-4b7f-a538-bd6e654dd739"
| |||||||||||||
6 | Displaying the attribute in defined order. URL: http://localhost:8080/api/requisitionTemplates/?access_token=d694b63b-4022-4b52-af1f-f397247fa433 Method: POST Example body: { "program": "http://localhost:8080/api/programs/416cff8a-ec2c-44da-bef9-9d8117d6e3ed", "columnsMap": { "columnKey": { "name": "nametest", "label": "labeltest", "displayOrder": "5", "isDisplayed": "true", "isDisplayedRequired": "true", "canChangeOrder": "true" } } } |
|
| ||||||||||||
7 |
| ||||||||||||||
8 |
|
...
PUT | The requisition has been submitted. Value in TotalReceivedQuantity has been saved, the "total" value has been recalculated. | ||
5 | Edit the requisition → enter negative value into "totalReceivedQuantity". Method: PUT | ||
6 | Try to submit the requisition. Method: POST | ||
7 | Try to submit the requisition when totalReceivedQuantity is negative. Method: POST | ||
8 |
Post – conditions: |