1118: Redesign and refactor requisition group program schedule endpoints

Test Case #:1118


Test Case Name: Redesign and refactor requisition group program schedule endpoints

System: openLMIS

Subsystem: blue

Test case designed by: Lucyna Laska

Design Date:14.11.2016

Short description

It doesn't make sense that requisition group program schedules should have its own set of CRUD endpoints, since it is simply an association between requisition groups and processing schedules by program. Instead, these associations should be managed through the requisition group endpoints.

See users and role assignments for an example. Role assignments are managed in the PUT /users endpoint.

This impacts POST, GET for /requisitionGroupProgramSchedules and GET, PUT, DELETE /requisitionGroupProgramSchedules/id and /requistionGroupProgramSchedules/search endpoints.

This will also impact code in the Requisition Service and UI that calls any of these endpoints.

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

Step

Action

Expected system response

Comment

1

 Check if endpoints: /requsitionGroupProgramSchedules/*) are no longer available in code.                                                                                                         Endpoints are no longer presented in code, e.g I looked through api-definition.yaml file and everything is cleaner properly.                                                                                                             

2

Check if new endpoint is added: /processingSchedules/search



3

Check if new endpoint is working properly.

URL:  http://192.168.1.14/referencedata/api/processingSchedules/search?programId=dce17f2e-af3e-40ad-8e00-3496adef44c3&facilityId=e6799d64-d10d-4011-b8c2-0e4d4a3f65ce&access_token=24bee6f8-15ea-4ea4-9c4d-9fe320b3d860

Method: GET



4

Check if it's possible to use endpoint without programId in request.

URL:  http://192.168.1.14/referencedata/api/processingSchedules/search?facilityId=e6799d64-d10d-4011-b8c2-0e4d4a3f65ce&access_token=24bee6f8-15ea-4ea4-9c4d-9fe320b3d860

Method: GET



5

Check if it's possible to use endpoint without facilityId in request.

URL:  http://192.168.1.14/referencedata/api/processingSchedules/search?programId=dce17f2e-af3e-40ad-8e00-3496adef44c3&access_token=24bee6f8-15ea-4ea4-9c4d-9fe320b3d860

Method: GET


6

Check if endpoint is added to api-definition.yaml



7

Initiate a new requisition.


7

Check if period in requisition is associated with proper schedule (if it's the same as the schedule in point 3)



9

             Check If UI is still working properly.                                  



Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software