1505: Add missing validations to the template admin UI


Test Case #:1505

Test Case Name:Add missing validations to the template admin UI

System: OpenLMIS

Subsystem: blue

Test case designed by: Paulina Borowa

Design Date:24.01.2017

Short description

These validations are missing on the UI, but should be currently checked on the backend.

1) Requisition quantity and requisition quantity explanation have to be enabled/disabled together
2) Stock on hand and total consumed quantity cannot be hidden if their source is user input

Acceptance criteria:

  • Verify that the back-end APIs do validate this and return a proper error message
  • Verify that the above conditions properly validate on the UI side

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

Verify on the UI side if:

Requested quantity and requisition quantity explanation have to be enabled/disabled together

                                                                                                                 


                                                 

2

Verify on the UI side if: Stock on hand and total consumed quantity cannot be hidden if their source is user input 

Stock on hand:

When Stock on hand source is Calculated It may be hidden:


Total consumed quantity:

When Total consumed quantity source is Calculated It may be hidden:



 

3

Verify on the API side if:

Requested quantity and requisition quantity explanation have to be enabled/disabled together

 

When

for "requestedQuantityExplanation"

 "isDisplayed": false,

and for requestedQuantity

 "isDisplayed": true,

{

  "columnsMap": "requisition.error.validation.displayedWhenRequestedQuantityDisplayed: requestedQuantityExplanation must be displayed when requested quantity is displayed."

}

 

When

for "requestedQuantityExplanation"

 "isDisplayed": true,

and for requestedQuantity

 "isDisplayed": false,


 

4

Verify on the API side if: Stock on hand and total consumed quantity cannot be hidden if their source is user input

set in stockOnHand/totalConsumedQuantity

"isDisplayed": false,

      "source": "USER_INPUT"

 

stockOnHand 400 bad request:

totalConsumedQuantity


 

5

   

OpenLMIS: the global initiative for powerful LMIS software