805: Ability to download a CSV file of the order
Test Case #:805 | Test Case Name: Ability to download a CSV file of the order |
System: OpenLMIS | Subsystem: requisition |
Test case designed by: Paulina Borowa | Design Date:22.07.2016 |
Short description: It should be possible to generate a CSV file from the Order instance. Since configuring order file is not yet possible, we should assume a default set of columns (we can look at v2 for the list of desired columns). Generic solution is out of scope for now. |
|
Pre – conditions: |
|---|
1. |
Step | Action | Expected system response | Comment |
1 |
Create User entity. In URL: http://localhost:8080/api/users Method: Post: Body: { "username":"Name1", "firstName":"FName1", "lastName":"Lname1", "active":"true", "verified":"false" }
| Status 201 created, |
|
2 | Create Program entity. Method: Post: Body: { "code":"kod2", "showNonFullSupplyTab":true, "skippable":false }
| Status 201 created, |
|
3 | Create ProductCategory entity. Method: Post: Body: { "code":"ProdCat", "name":"Produkt", "displayOrder":"2" }
| Status 201 created, ProductCategory id: "http://localhost:8080/api/productCategories/dcddca24-0180-4ff9-adcc-2156c27ffc73" |
|
4 | Create Product entity. Method: Post: Body: { "code":"code2", "primaryName":"Product", "dispensingUnit":"unit", "dosesPerDispensingUnit":"10", "packSize":"1", "packRoundingThreshold":"0", "roundToZero":false, "active":true, "fullSupply":true, "tracer":false, "productCategory":"http://localhost:8080/api/productCategories/dcddca24-0180-4ff9-adcc-2156c27ffc73" }
| Status 201 created, |
|
5 | Create Order entity. In URL: http://localhost:8080/api/orders Method: Post: Body: { "orderCode":"2", "requestingFacility":"http://localhost:8080/api/facilities/fdddb637-cf1d-4355-b839-ca2c2dba3977", "receivingFacility":"http://localhost:8080/api/facilities/b45aea73-d9ef-42d2-8caa-ba33e0aec724", "supplyingFacility":"http://localhost:8080/api/facilities/20175b9b-7dd2-427d-9ad0-d273807dfbc0", "status":"PICKING", "quotedCost":"3"
}
| Status 201 created,
|
|
6 | Create a few orderLines entity with different orderedQuantity values. Method: Post: Body: { "orderedQuantity":"2" } Method: Post: Body: { "orderedQuantity":"3" }
Method: Post: Body: { "orderedQuantity":"6" } | Status 201 Created, Status 201 Created, Status 201 Created, |
|
7 |
Check if the generated CSV file is suitable Method: Get | Status 200 OK |
|
8 |
Create another orderLine enity. Method: Post: Body: { "orderedQuantity":"12" }
|
Status 201 Created
|
|
9 | Check if it’s added to previously created CSV file Method: Get | Status 200 OK
|
|