427: Supervisory groups

Test Case #:427

 

Test Case Name: Supervisory groups

System: OpenLMIS

Subsystem: requisition

Test case designed by: Lucyna Kwidzińska

Design Date:26.07.2016

Short description: Allows addition of new and editing of existing requisition groups

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

                                                        

Create FacilityType

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

Method: POST

 

Example Body:

 

{

"code": "facilitytype"

}

                                                                                                               
   status: 201 created,

facilityType d: "http://localhost:8080/api/facilityTypes/d1855d01-6e62-4e5d-bfda-aa1cefb29ff3"

         
                                                 

2

Create GeographicLevel.

URL: http://localhost:8080/api/geographicLevels

Method: POST

 

Example Body:

{

"code": "codelevel",

"levelNumber": "11"

}

status: 201 created,

geographicLevel id: "http://localhost:8080/api/geographicLevels/6d677f34-91d4-4ae1-a389-f4cf3c52acd2"

 

3

Create GeographicZone

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

Method: POST

 

Example Body:

{

"code": "codezone01",

"level": "http://localhost:8080/api/geographicLevels/6d677f34-91d4-4ae1-a389-f4cf3c52acd2"

 

}

status: 201 created,

geographicZone id: "http://localhost:8080/api/geographicZones/b95942dd-51a8-4b32-8e1e-3a8803b1c52a"

 

4

Create Facility.

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

Method: POST


Example Body:

{

"code": "facilitynew01",

"geographicZone": "http://localhost:8080/api/geographicZones/b95942dd-51a8-4b32-8e1e-3a8803b1c52a",

"type": "http://localhost:8080/api/facilityTypes/d1855d01-6e62-4e5d-bfda-aa1cefb29ff3",

"active": "true",

"enabled": "true"

}

 

5

Create SupervisoryNode

URL: http://localhost:8080/api/supervisoryNodes

Method: POST

 

Example Body:

{

"code": "codenode012",

"supervisorCount": "12",

"facility": "http://localhost:8080/api/facilities/c26200a4-7489-4cde-a990-fd8f9ff80e44"

}

 

6

Create requisitionGroup entity.

URL: http://localhost:8080/api/requisitionGroups

Method: POST

 

Example Body:

{

"code": "newgorup01",

"name": "groupname",

"supervisoryNode": "http://localhost:8080/api/supervisoryNodes/951325bd-15a8-4186-b610-93e68ff15b8c"

}

 

 

7

Verify the possibility of Editing the requisitionGroup entity

(modify the parameter 'code')

URL: http://localhost:8080/api/requisitionGroups

Method: POST

 

Example Body:

{

"id": "ab8c31a8-2374-469d-948f-e4095c88c2af",

"code": "reqgroupcode01",

"name": "groupname",

"supervisoryNode": "http://localhost:8080/api/supervisoryNodes/951325bd-15a8-4186-b610-93e68ff15b8c"

}

requisitionGroup has been edited successfully.

 

 

 

 

 

Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software