1006: PoD improvements: add ability to download, refactor behavior, add messages
Test Case #:1006
Test Case Name: PoD improvements: add ability to download, refactor behavior, add messages | |
System: OpenLMIS | Subsystem: requisition |
Test case designed by: Lucyna Kwidzinska | Design Date:16.09.2016 |
Short description:
|
|
Pre – conditions: |
Step
Action | Expected system response | Comment | |
1 | Generate the token for authentication. | 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. | |
2 | Create Proof of Delivery. URL: http://localhost:8080/api/proofOfDeliveries?access_token=932e6db5-e038-4c15-b1ee-80d60183d115 Method: POST Body: { "id": "00000000-0000-0000-0000-000000000001", "order": { "id": "a97dfcac-a813-4204-8b85-86b045be7a92" }, "totalShippedPacks": 200, "orderedQuantity": 200, "totalReturnedPacks": 0, "deliveredBy": "Delivery Guy", "receivedBy": "Receiver", "receivedDate": "2016-05-13" }
| status: 200 OK should be returned, id: 690b052f-22e6-4238-97ca-36aa808251b1 | The whole process of creation the POD has been described in test case: 637 - Print Proof of Delivery (POD) 637: Print Proof of Deliver (POD). Follow through points 1 to 16. |
3 | Create Proof Of Delivery Line. URL: http://localhost:8080/api/proofOfDeliveryLines?access_token=932e6db5-e038-4c15-b1ee-80d60183d115 Method: POST Body: { "id": "00000000-0000-0000-0000-000000000001", "proofOfDelivery": { "id": "690b052f-22e6-4238-97ca-36aa808251b1" }, "orderLine": { "id": "4c27be10-ddc9-4f39-abfa-efe365c9964f" }, "packToShip": 300, "quantityShipped": 100, "quantityReceived": 100, "quantityReturned": 0, "replacedProductCode": "P1" } | status: 200 OK should be returned,
| |
4 | Add Proof of Delivery report template to database. URL: http://localhost:8080/api/proofOfDeliveryTemplates?access_token=e844f442-37cf-4273-a3b5-c609fb6ba22d Method: POST The parameter of body:
| status: 200 OK should be returned, | |
5 | Download the report template by typing the URL in web browser. URL: http://localhost:8080/api/proofOfDeliveryTemplates?access_token=02cba1fc-6154-4335-8fb5-4ec2986b5d78 | The system should ask the user about localization of saving file. After that, the report template should be on hard drive. | Note: when URL will be typed in POSTMAN with GET request, the .xml will be displayed. |
6 | Print Proof of Delivery. URL: Method: GET | Save file on hard drive. | |
7 | Change the template report of Proof of Delivery. URL: http://localhost:8080/api/proofOfDeliveryTemplates?access_token=e844f442-37cf-4273-a3b5-c609fb6ba22d Method: POST The parameter of body:
| status: 200 OK should be returned, | |
8 | Try to download the previously uploaded template report by typing the request in web browser. URL: http://localhost:8080/api/proofOfDeliveryTemplates?access_token=02cba1fc-6154-4335-8fb5-4ec2986b5d78 | The system should ask the user about localization of saving file. After that, the report template should be on hard drive. | |
9 | Print the Proof of Delivery. Method: GET | Save file on hard drive. | The POD looks different then previously printed POD. |
OpenLMIS: the global initiative for powerful LMIS software