224: Reject an R&R

Test Case #:284

 

Test Case Name: Reject an R&R

System: OpenLMIS

Subsystem: requisition

Test case designed by: Paulina Borowa

Design Date:14.07.2016

Short description: Allows an approver to reject an r&r, sending it back to initiatilized status and allowing the original requisitioner to modify and re-submit data.

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

                                                       

Create geographicZones

In URL: http://localhost:8080/api/geographicZones

Method: Post:

 

Example Body:

{

"code":"GeoZon",

"level":"http://localhost:8080/api/geographicLevels/5a4d0206-2400-4b9c-ad76-e640d565239f"

 

}

                                                                                                                

           status: 201 created,             

        

geographicZone id: "http://localhost:8080/api/geographicZones/95cd872c-d84a-42ce-b505-8a1eef25d45b"

                                                                     
                                                 

2

Create facilityTypes

In URL: http://localhost:8080/api/facilityTypes

Method: Post:

Example Body:

{

"code":"facilityT"

}

 status: 201 created,

facilityType id: "http://localhost:8080/api/facilityTypes/671658fa-b8f2-45b2-b9df-186dd145fb56"

 

3

Create facility

In URL: http://localhost:8080/api/facilities

Method: Post:

Example Body:

{

"code":"facilities",

"geographicZone":"http://localhost:8080/api/geographicZones/95cd872c-d84a-42ce-b505-8a1eef25d45b",

"type":"http://localhost:8080/api/facilityTypes/671658fa-b8f2-45b2-b9df-186dd145fb56",

"active":true,

"enabled":false

}

status: 201 created,

facility id: "http://localhost:8080/api/facilities/6be6f852-f2d9-4c15-a831-df45fcdbe725"

 

4

Create program

In URL: http://localhost:8080/api/programs

Method: Post:

Body:

{

"code":"programs",

"skipable":true

}

status: 201 created,

program id: "http://localhost:8080/api/programs/bb7ec3b8-aabf-4314-ab3a-bfad4f26eff2"

 

5

Create scheldues

In URL: http://localhost:8080/api/schedules

Method: Post:

Example Body:

{

"code":"scheld",

"name":"Scheldues"

}

status: 201 created,

schedule id: "071579ee-3455-47ba-a3e3-2a25f7512db2"

 

6

Create period

In URL: http://localhost:8080/api/periods

Method: Post:

Body:

{

"processingSchedule":

{

"id":"071579ee-3455-47ba-a3e3-2a25f7512db2",

"code" : "scheld",

"modifiedDate" :"2016-07-14T08:06:49.134",

"name" : "Scheldues"

},

"name" : "periodNamee",

"description" : "periiodDescription",

"startDate" : "2016-07-13",

"endDate" : "2016-07-14"

}

 

status: 201 created,

period id: "4acb1273-1b04-4af5-bb5b-3d1438783cfb",

 

7

Requisition object is created with status authorizade

In URL: http://localhost:8080/api/requisitions

Method: Post:

Example Body:

{

"facility":"http://localhost:8080/api/facilities/6be6f852-f2d9-4c15-a831-df45fcdbe725",

"program":"http://localhost:8080/api/programs/bb7ec3b8-aabf-4314-ab3a-bfad4f26eff2",

"processingPeriod":"http://localhost:8080/api/periods/4acb1273-1b04-4af5-bb5b-3d1438783cfb",

"status":"AUTHORIZED"

}

status: 201 created,

requisition id: "6e3cdc00-d106-4772-b522-853d5a879763"

 

8

                      

Reject an r&r, sending it back to initiatilized.

In URL: http://localhost:8080/api/requisitions/6e3cdc00-d106-4772-b522-853d5a879763/reject

Method: PUT

                          

 

 

 

Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software