805: Ability to download a CSV file of the order

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:

Pre – conditions:

1.

 

 Step

Action

Expected system response

Comment

1

                                                                            

Create User entity.

Method: Post:

Body:

{

"username":"Name1",

"firstName":"FName1",

"lastName":"Lname1",

"active":"true",

"verified":"false"

}

                                                                                          

                                                         Status 201 created, 

                                                                  User id: "http://localhost:8080/api/users/b9a5c8cd-eb01-4f4b-9cfe-c9c931a60c3b"

                                                 

2

Create Program entity.

Method: Post:

Body:

{

"code":"kod2",

"showNonFullSupplyTab":true,

"skippable":false

}

 

 Status 201 created, 

                                                                Program id: "http://localhost:8080/api/programs/79089792-2514-4715-9711-c246a8d1ab64"

 

3

Create ProductCategory entity.

Method: Post:

Body:

{

"code":"ProdCat",

"name":"Produkt",

"displayOrder":"2"

}

 

 Status 201 created,

 

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,

}

 

Status 201 created, 

 

5

Create Order entity.

Method: Post:

Body:

{

"orderCode":"2",

"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

 

 

OpenLMIS: the global initiative for powerful LMIS software