Test Case #805 | Test Case Name: Submit requisition only if quantity entered. |
System: OpenLMIS | Subsystem:Requisition |
Test case designed by: Piotr Żurawski | Design Date:25.07.2016 |
Short description: Check possibility to Submit requisition when quantity is/is not entered. |
|
Pre – conditions: |
|
Step | Action | Expected system response | Comment |
1 | Submit should not accept json without given quantityRequested value. URL: http://localhost:8080/api/requisitions/submit Method: POST Body: { "id":"154f448d-a18c-44b6-8ac9-930ad9f72503", "createdDate":"2016-07-14T12:13:09.214", "requisitionLines":[ { "id":"24ae0f56-0a83-4743-bd4f-647e5d3db6b6", "quantityRequested":null, "product":{ "id":"8b47ab9b-44cf-46a6-85cd-67805d5e888a", "code":"proCode", "primaryName":"primCode", "dispensingUnit":"asdfsaf", "dosesPerDispensingUnit":131312, "packSize":123131, "packRoundingThreshold":1231, "roundToZero":false, "active":false, "fullSupply":false, "tracer":false }, "requisition":{ "id":"154f448d-a18c-44b6-8ac9-930ad9f72503" } } ], "facility":{ "id":"f4a567a3-ec0f-4f4e-b13f-75fb1e9a0154", "code":"facilityCode", "name":null, "description":null, "active":false, "goLiveDate":null, "goDownDate":null, "comment":null, "enabled":false, "type":{ "id":"35987c94-f8a5-48e3-af5f-b9276749a7a2", "code":"facilityTypeCode" }, "geographicZone":{ "id":"a8d6807b-87ac-4166-a53e-eaef5d8a5acc", "code":"geoZonesLeve;", "level":{ "id":"4cbbf1be-8806-4361-b821-b1019f50d959", "code":"geoLevelCode", "name":null, "levelNumber":200 } } }, "program":{ "id":"4b81fa87-5df9-4001-86c5-c3d5ccb9897e", "code":"programsCode", "name":null, "description":null, "active":null, "skippable":false, "showNonFullSupplyTab":null }, "processingPeriod":{ "id":"7fc68a7e-0b6e-41fc-b759-120c46098b66", "name":"periodName", "description":"periodDescription", "startDate":"2016-07-11", "endDate":"2016-07-12", "processingSchedule":{ "id":"95bdb8da-89c6-4e06-85aa-94d668ecceab", "code":"schedulesCode", "description":null, "modifiedDate":"2016-07-14T12:10:44.575", "name":"schedulesName" } } } | ||
2 | Possibility to Submit requsistion with given quantityRequested. URL: http://localhost:8080/api/requisitions/submit Method: POST Body: { "id":"154f448d-a18c-44b6-8ac9-930ad9f72503", "createdDate":"2016-07-14T12:13:09.214", "requisitionLines":[ { "id":"24ae0f56-0a83-4743-bd4f-647e5d3db6b6", "quantityRequested":12, "product":{ "id":"8b47ab9b-44cf-46a6-85cd-67805d5e888a", "code":"proCode", "primaryName":"primCode", "dispensingUnit":"asdfsaf", "dosesPerDispensingUnit":131312, "packSize":123131, "packRoundingThreshold":1231, "roundToZero":false, "active":false, "fullSupply":false, "tracer":false }, "requisition":{ "id":"154f448d-a18c-44b6-8ac9-930ad9f72503" } } ], "facility":{ "id":"f4a567a3-ec0f-4f4e-b13f-75fb1e9a0154", "code":"facilityCode", "name":null, "description":null, "active":false, "goLiveDate":null, "goDownDate":null, "comment":null, "enabled":false, "type":{ "id":"35987c94-f8a5-48e3-af5f-b9276749a7a2", "code":"facilityTypeCode" }, "geographicZone":{ "id":"a8d6807b-87ac-4166-a53e-eaef5d8a5acc", "code":"geoZonesLeve;", "level":{ "id":"4cbbf1be-8806-4361-b821-b1019f50d959", "code":"geoLevelCode", "name":null, "levelNumber":200 } } }, "program":{ "id":"4b81fa87-5df9-4001-86c5-c3d5ccb9897e", "code":"programsCode", "name":null, "description":null, "active":null, "skippable":false, "showNonFullSupplyTab":null }, "processingPeriod":{ "id":"7fc68a7e-0b6e-41fc-b759-120c46098b66", "name":"periodName", "description":"periodDescription", "startDate":"2016-07-11", "endDate":"2016-07-12", "processingSchedule":{ "id":"95bdb8da-89c6-4e06-85aa-94d668ecceab", "code":"schedulesCode", "description":null, "modifiedDate":"2016-07-14T12:10:44.575", "name":"schedulesName" } } } |
Post – conditions: |