Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

 Test Case #:223

Test Case Name:  Review and approve submitted requisitions

System: OpenLMIS

Subsystem: requisition

Test case designed by: Paulina Borowa

Design Date:11.08.2016

Short description: Supervisor can access/view the submitted requisitions based on the supervisory hierarchy (which facilities the user is assigned to review/approve) -all requisition details are visable -the supervisor can see comments from the requisitioner (and authorizer when appropriate) -the supervisor can make changes to the "Approved Quantity" attribute -the supervisor can input text (string 250 characters) in the "Remarks" attribute -the supervisor can insert comments on the approved requistion -the supervisor can see comments made by the requisitioner and/or authorizer receive. Allows supervisor (or appropriate personnel) to review and approve submitted requisitions

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                      


Step

Action

Expected system response

Comment

1

                                                                              

Create geographicLevels

In URL:

http://localhost:8080/api/geographicLevels/?access_token=5a7d37fa-c57c-4c8e-8c3f-6d40021b01aa

Method: Post:

Example Body:

{

"code":"GL1",

"levelNumber":"11"

}

                                                                                       

 Status 201 created         

id: "http://localhost:8080/api/geographicLevels/4633301d-d89d-4479-aaea-dde3aa1423ad"

                                                 

2

Create geographicZone

In URL:

http://localhost:8080/api/geographicZones/?access_token=5a7d37fa-c57c-4c8e-8c3f-6d40021b01aa

Method: Post:

Example Body:

{

"code":"GeoZon",

"level":"http://localhost:8080/api/geographicLevels/4633301d-d89d-4479-aaea-dde3aa1423ad",

"name":"test"

}

Status 201 Created ,

id:"http://localhost:8080/api/geographicZones/279efe8a-dbd5-41ce-be9e-c300f0d29f49"

 

3

Create facilityType

In URL:

http://localhost:8080/api/facilityTypes?access_token=5a7d37fa-c57c-4c8e-8c3f-6d40021b01aa34c4d28250c2

Method: Post

Example Body:

{

"code":"facilityT1",

"name":"test"

}

Status 201 Created ,

id: "http://localhost:8080/api/facilityTypes/c3ee98b9-17cd-472e-b3cd-0752c052497f"

 

4

Create facilities

In URL: http://localhost:8080/api/facilities?access_token=5a7d37fa-c57c-4c8e-8c3f-6d40021b01aa

Method Post

Example body:

{

"code":"facilities1",

"geographicZone":"http://localhost:8080/api/geographicZones/279efe8a-dbd5-41ce-be9e-c300f0d29f49",

"type":"http://localhost:8080/api/facilityTypes/c3ee98b9-17cd-472e-b3cd-0752c052497f",

"active":true,

"enabled":true

}


Status 201 Created,

id: "http://localhost:8080/api/facilities/1a3118e6-3bcc-4fd4-8f21-000b697a4d5d"

 

5

Create program:

In URL: http://localhost:8080/api/programs/?access_token=5a7d37fa-c57c-4c8e-8c3f-6d40021b01aa

Method: Post

Example Body:

{

"code": "qwe",

"name": "aName"

}

 

Status 201 Created,

id: "http://localhost:8080/api/programs/c68cb44d-b088-4837-8aff-a15ab7490a72"

 

6

Create schedule

In URL: http://localhost:8080/api/schedules?access_token=5a7d37fa-c57c-4c8e-8c3f-6d40021b01aa

Method: Post

Example Body:

{

"code": "codecode12",

"description": null,

"modifiedDate": null,

"name": "scheduleNamee"

}

Status 201 Created,

id: http://localhost:8080/api/schedules/cfc72ad3-856f-4479-b2f6-a7c031cc5b39"

 

7

Create periods

In URL: http://localhost:8080/api/periods/?access_token=5a7d37fa-c57c-4c8e-8c3f-6d40021b01aa

Method: Post

Example Body:

{

"processingSchedule": {

"id": "cfc72ad3-856f-4479-b2f6-a7c031cc5b39",

"code": "codecode12",

"description": null,

"modifiedDate": null,

"name": "scheduleName"

},

"name": "name90",

"description": "descriptiontest",

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

"endDate": "2016-07-14"

}

Status 201 Created,

"id": "e7db9cad-d62b-4550-a5a8-af6e4b06f4b7"

 

8


Crate requisition:

In URL: http://localhost:8080/api/requisitions/?access_token=5a7d37fa-c57c-4c8e-8c3f-6d40021b01aa

Method: Post

Example Body

{

"facility":"http://localhost:8080/api/facilities/1a3118e6-3bcc-4fd4-8f21-000b697a4d5d",

"program":"http://localhost:8080/api/programs/c68cb44d-b088-4837-8aff-a15ab7490a72",

"processingPeriod":"http://localhost:8080/api/periods/e7db9cad-d62b-4550-a5a8-af6e4b06f4b7",

"status":"INITIATED"

}

                        

Status 201 Created,

id:"http://localhost:8080/api/requisitions/811f0934-ab87-4856-a8de-abe895127bb1"

 

9

Create user

In URL:http://localhost:8080/api/users?access_token=5a7d37fa-c57c-4c8e-8c3f-6d40021b01aa

Method: Post

Example Body:

{

"username":"Name",

"password":"Password",

"firstName":"Jan",

"lastName":"Kowal",

"verified":true,

"active":true

}

Status 201 Created,

id: "http://localhost:8080/api/users/b7654100-9efd-4583-81eb-0a9a6f547acd"

 
10

Create comments
In URL: http://localhost:8080/api/comments?access_token=5a7d37fa-c57c-4c8e-8c3f-6d40021b01aa

Method: Post

Example Body:

{

"requisition":"http://localhost:8080/api/requisitions/811f0934-ab87-4856-a8de-abe895127bb1",

"author":"http://localhost:8080/api/users/b7654100-9efd-4583-81eb-0a9a6f547acd",

"body":"BasicInformation"

}

Status 201 Created,

id: "http://localhost:8080/api/comments/14211a49-d6b3-4470-87e0-da2e0d063cb8"

 
11

Check endpoint:

Method: GET

URL: http://localhost:8080/api/requisitions/811f0934-ab87-4856-a8de-abe895127bb1/comments?access_token=b6af6e9d-9408-452b-81c5-fc5458d60363

Status 200 OK

 
12

Check endpoint:

Method: POST

URL: http://localhost:8080/api/requisitions/811f0934-ab87-4856-a8de-abe895127bb1/comments?access_token=b6af6e9d-9408-452b-81c5-fc5458d60363

Status 200 OK

 
13

Create supervisoryNode

In URL: http://localhost:8080/api/supervisoryNodes?access_token=0445814b-b97b-44f8-b4db-37ef148cbb50

Method: Post

Example Body:

{

"code":"SupNode",

"facility":"http://localhost:8080/api/facilities/7cc8db37-83b2-4c2d-8141-72fa47552996"

}

Status 201 Created,

id: "http://localhost:8080/api/supervisoryNodes/16037214-b3d7-45b0-b094-87574636d6f0"

 
14

Create requisition

In URL: http://localhost:8080/api/requisitions/?access_token=0445814b-b97b-44f8-b4db-37ef148cbb50

Method: Post

Example Body:

{

"facility":"http://localhost:8080/api/facilities/18a933e3-f851-4d2a-a386-5a0b7b22c376",

"program": "http://localhost:8080/api/programs/524c110c-54bb-4097-8241-fa4848e62a63",

"processingPeriod":"http://localhost:8080/api/periods/4a330cba-1955-4856-8af0-f89cf6db3556",

"status":"AUTHORIZED",

"supervisoryNode": "http://localhost:8080/api/supervisoryNodes/16037214-b3d7-45b0-b094-87574636d6f0"

}

Status 201 Created,

id: "http://localhost:8080/api/requisitions/b0423d67-5633-48bb-9f69-9b16feea9683"

status must be AUTHORIZED
15

Create requisition

In URL:

URL: http://localhost:8080/api/requisitions/?access_token=0445814b-b97b-44f8-b4db-37ef148cbb50

Method: Post

Example Body:

{

"facility":"http://localhost:8080/api/facilities/79130705-7c6f-410e-904f-b1d243bb44f2",

"program": "http://localhost:8080/api/programs/d4857768-05d4-4783-9e7f-019809e6859d",

"processingPeriod":"http://localhost:8080/api/periods/95c7720c-8e38-42fe-a20d-261de7b4cc07",

"status":"AUTHORIZED",

"supervisoryNode":"http://localhost:8080/api/supervisoryNodes/16037214-b3d7-45b0-b094-87574636d6f0"

}

Status 201 Created,

id: "http://localhost:8080/api/requisitions/0bc1e9e8-51fb-4e36-95f2-8e15dbfe8ebd"

With the same "supervisoryNode" as previously requisition:

"supervisoryNode":"http://localhost:8080/api/supervisoryNodes/16037214-b3d7-45b0-b094-87574636d6f0"

status must be AUTHORIZED

16

Create requisition

In URL:

URL: http://localhost:8080/api/requisitions/?access_token=0445814b-b97b-44f8-b4db-37ef148cbb50

Method: Post

Example Body:

{
"facility": "http://localhost:8080/api/facilities/61824d28-56ec-44eb-ab8c-955c1e970ae6",
"program":"http://localhost:8080/api/programs/3a6e042d-1ed1-4c37-aefe-0132313ff95e",
"processingPeriod":"http://localhost:8080/api/periods/1a9f8249-1496-480a-a21e-e667f7c7ecd7",
"status":"SUBMITTED"
}


Status 201 Created,

status must be SUBMITED
17

Create requisition

In URL:

URL: http://localhost:8080/api/requisitions/?access_token=0445814b-b97b-44f8-b4db-37ef148cbb50

Method: Post

Example Body:

{

"facility":"http://localhost:8080/api/facilities/79130705-7c6f-410e-904f-b1d243bb44f2",

"program": "http://localhost:8080/api/programs/d4857768-05d4-4783-9e7f-019809e6859d",

"processingPeriod":"http://localhost:8080/api/periods/95c7720c-8e38-42fe-a20d-261de7b4cc07",

"status":"AUTHORIZED",

"supervisoryNode":" "http://localhost:8080/api/supervisoryNodes/f81913c9-67d9-485d-916b-dae1f618e280"

Status 201 Created,

 

with different "supervisoryNode" than previously
18

Create admin user
In URL: http://localhost:8080/api/users?access_token=6116d810-b01e-46d3-b8bb-6b3a1a128af5

Method: Post

Example Body:

{
    "id": "35316636-6264-6331-2d34-3933322d3462",
    "username":"trusted-client",
    "password":"secret",
    "firstName":"name",
    "lastName":"LName",
    "supervisedNode":"http://localhost:8080/api/supervisoryNodes/4d448a74-29b6-49f1-aec6-5e217a7d8562",
    "active":true,
    "verified":true
}

Status 201 Created,

19

Check endpoint: http://localhost:8080/api/requisitions/requisitions-for-approval?access_token=6116d810-b01e-46d3-b8bb-6b3a1a128af5

Method: GET

Status 200 OK,

 
  • No labels