641: Ability to View Past Filled Orders
Test Case #: 641
| Test Case Name: Ability to view past filled orders |
System: OpenLMIS | Subsystem: requisition |
Test case designed by: Lucyna Kwidzińska | Design Date:02.08.2016 |
Short description: Possiblity to view a list of all orders that have been filled by facility so that I have a record of how I have filled past orders. Acceptance Criteria: |
|
Pre – conditions: |
|
Step | Action | Expected system response | Comment |
1 | Create User. Method: POST Example Body: { "username": "testowy01", "password": "test1234", "firstName": "firsttest01", "lastName": "lasttest01", "verified": "true", "active": "true" }
| status: 201 created is returned, |
|
2 | Create program. Method: POST Example Body: { "code": "codeprogram01", "periodSkippable": "true" } | status: 201 created is returned,
|
|
3 | Create facilityType. Method: POST Example Body: { "code": "facilitypecode01" } | status: 201 created is returned, facilityType id: "http://localhost:8080/api/facilityTypes/240d312e-c872-46df-b591-0ad9103dad5e" |
|
4 | Create geographicLevel Method: POST Example Body: { "code": "geolevelcode01", "levelNumber": "21" } | status: 201 created is returned, geographicLevel id: "http://localhost:8080/api/geographicLevels/56a2bb98-06ae-4278-8b0e-ec1822697602" |
|
5 | Create geographicZone. Method: POST Example Body: { "code": "zonecode01", "name": "namezone01", } | status: 201 created is returned, geographicZone id: "http://localhost:8080/api/geographicZones/a7adb69e-8a82-4c4e-8ff5-7bb17e1ff193" |
|
6 | Create Facility. Method: POST Example Body: { "code": "facilitycode01", "geographicZone": "http://localhost:8080/api/geographicZones/a7adb69e-8a82-4c4e-8ff5-7bb17e1ff193", "active": "true", "enabled": "true" } | status: 201 created is returned, |
|
7 | Create Schedule. Method: Example body: { "code": "schedulecode01", "name": "schedulename01" } | status: 201 created is returned, |
|
8 |
Create Period. Method: POST Example body: { "processingSchedule": { "id": "ed2ced44-1501-4194-a3b3-216e7fa7510a", "code": "schedulecode01", "name": "schedulename01" }, "name": "periodname01", "description": "abcperiod01", "startDate": "2016-08-01", "endDate": "2016-08-05" }
| status: 201 created is returned, |
|
9 | Create ProductCategory Method: POST Example body: { "code": "codecategory", "name": "namecategory", "displayOrder": "18" } | status: 201 created is returned, productCategories id: "http://localhost:8080/api/productCategories/f293ab0f-3c86-413e-acb3-cf2b69d51088" |
|
10 | Create product. Method: POST Example body: { "code": "codetestcode", "primaryName": "producttestname", "dispensingUnit": "abc", "dosesPerDispensingUnit": "1", "packSize": "1", "packRoundingThreshold": "1", "roundToZero": "true", "active": "true", "fullSupply": "true", "tracer": "true", "productCategory": "http://localhost:8080/api/productCategories/f293ab0f-3c86-413e-acb3-cf2b69d51088" } | status: 201 created is returned, |
|
11 | Create requisition. Method: POST Example body: { "processingPeriod": "http://localhost:8080/api/periods/98145211-2703-4bff-aa77-83596c0f3b1d", "status": "SUBMITTED" } | status: 201 created is returned, |
|
12 | Create Order. Method: POST Example Body: { "requestingFacility": "http://localhost:8080/api/facilities/53994e07-61f3-48a2-9e7a-13b17db33eea", "receivingFacility": "http://localhost:8080/api/facilities/53994e07-61f3-48a2-9e7a-13b17db33eea", "supplyingFacility": "http://localhost:8080/api/facilities/53994e07-61f3-48a2-9e7a-13b17db33eea", "orderCode": "order0123", "status": "ORDERED", "quotedCost": "1234.123" } | status: 201 created is returned,
|
|
13 | Create OrderLine. Method: POST Example Body: { "orderedQuantity": "1", "filledQuantity": "1", "batch": "testbatch", "expiryDate": "2016-08-10", "vvm": "testvvm", "manufacturer": "testmanufacturer" } | status: 201 created is returned, |
|
14 | Ability to optionally filter by program, ordering facility, schedule, year, and period a) endpoint: http://localhost:8080/api/facilities/id/orders/ b) Method: GET c) Example URL:
|
status: 200 OK is returned,
| the {id} in the request is the id of facility |
15 | Ability to download a CSV of each completed order a) endpoint: http://localhost:8080/api/orders/id/print b) Method: GET c) Example URL: | status: 200 OK is returned, | the {id} in the request is the id of previously created order |
16 | Ability to download a PDF version of each completed order a) endpoint: http://localhost:8080/api/orders/id/print/ b) Method: GET c) Example URL:
| System should ask user where to save a .pdf file. When user opens the downloaded .pdf file, it should contains the details of completed order.
|
|
Post – conditions: |