Test Case #:1156 | Test Case Name: RequisitionLineCalculationService initiate beginning balance gets wrong previous period |
System: OpenLMIS | Subsystem: blue |
Test case designed by: Anna Czyrko | Design Date: 09.11.2016 |
Short description: The initateBeginningBalance method in this service gets a list of periods earlier than the requisition's period start date (previous periods), takes the first one in the list, and assumes it is the most recent previous period. This assumption seems to be incorrect, as the external call orders the previous periods by start date ascending. So the first one in the list would be least recent previous period. Acceptance criteria:
Test
|
|
Pre – conditions: |
Demo data should be updated to have two previous periods with line items for same products with different amounts of stock on hand. |
Step
Action | Expected system response | Comment | ||||||||||||
1 | Log into application. Click Requisition > Create/Authorize. |
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11|||
2 | From Initiate Report and Requisition screen select: | |||||||||||||
3 | Click Proceed button. | |||||||||||||
4 | Enter all required data in Report and Requisition for Family Planing (Health Center). Click Submit button. | |||||||||||||
5 | Click Authorize button. | |||||||||||||
6 | Enter data in Approved Quantity column and Remarks column. Click Approve button. | After clicking Approve button appears: | ||||||||||||
7 | Click Requisition > Create/Authorize. From Initiate Report and Requisition screen select: Facility type: My facility, Facility name: HC01-Comfort Health Clinic Program: Family planing Type: Regular | |||||||||||||
8 | Click Proceed button. | |||||||||||||
9 | Check if begining balance has proper value. | Begining balance is calculated from this formula: Beginning Balance = previous period's Stock On Hand + previous period's Approved Quantity |