641: Ability to View Past Filled Orders

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:
1. All completed orders processed by my facility show up in the list
2. Both requested quantity and filled quantity
2. Ability to optionally filter by program, ordering facility, schedule, year, and period
3. Ability to download a CSV or PDF version of each completed order

                                                                                                                                                   

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,

 

4

Create geographicLevel

Method: POST

Example Body:

{

"code": "geolevelcode01",

"levelNumber": "21"

}

status: 201 created is returned,

 

5

Create geographicZone.

Method: POST

Example Body:

{

"code": "zonecode01",

"name": "namezone01",

}

status: 201 created is returned,

 

6

Create Facility.

Method: POST

Example Body:

{

"code": "facilitycode01",

"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,

 

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",

}

status: 201 created is returned,

 

11

Create requisition.

Method: POST

Example body:

{

"status": "SUBMITTED"

}

status: 201 created is returned,

 

12

Create Order.

Method: POST

Example Body:

{

"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

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

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

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:

OpenLMIS: the global initiative for powerful LMIS software