1315: Create a requisition for one of "my supervised facilities"

Test Case #: 1315


Test Case Name: Create a requisition for one of "my supervised facilities"

System: openLMIS

Subsystem: blue

Test case designed by: Lucyna Laska

Design Date:28.12.2016

Short description

  • If a user does not have any supervisory permissions, the option stays greyed out/disabled like it is currently disabled in the 3.0 Beta release (e.g. http://uat.openlmis.org/public/#/requisitions/initialize).
  • If a user does have supervisory permissions for a program and facility, then the "My Supervised Facilities" radio is active/selectable.
  • Once that radio button is selected, the Program and Facility dropdowns will switch positions (for "My Supervised Facilities" Program comes before Facility field) and they will re-load with relevant choices. The Program field gets a list of all the programs where this user has supervisory permissions. The facility field gets no choices until a Program is selected.
  • Once a Program is selected, the Facility field gets a set of relevant choices (all the facilities with that program where the current user has supervisory permissions).
  • After a Program and Facility are selected, the rest of this screen works just like 3.0 beta. It shows a grid of periods and requisitions and allows authorized users to proceed into a Requisition form.
  • After the supervisory initiates a requisition, the staff who normally create requisitions for that program and facility—such as the Storeroom Manager user—can still view the requisition and can still edit it prior to it being authorized. These permissions are the same as a requisition that is created using the "My facilities" choice.

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       



Step

Action

Expected system response

Comment

1

When user does not have any supervisory permissions, the option "My supervised facility" stays disabled                                                                                                          

             The "My supervised facilities" option is inactive.       

               


                                                 

2

 When permisions are assigned to user, radiobutton "My supervised facility" is active

The program and facility are switch positions (for "My Supervised Facilities" Program comes before Facility field) and they will re-load with relevant choices.


My facility view:

My supervised facilities view:


3If the programs select element doesn't have an option selected, the facilities select element be disabled.



4When user has assigned permission for program with wrong facility ID, the proper message should be displayed.


The message: "There is not facilities for program. Please contact the Admin" is displayed when user assigned supervisory role with proper program but wrong facility.




5

User has assigned one supervisory role. Move to Requisitions → Create/Authorize and click "My supervised facility" radiobutton.


The name of program is loaded automatically (when only one option can be selected).


6

 User has assigned two supervisory role. Move to Requisitions → Create/Authorize and click "My supervised facility" radiobutton. Select one of the program from drop-down list.

After selecting one program: Family Planning, the name of Facility is loaded.


After selecting second program: Essential Meds, the name of Facility is loaded.


7When a user changes between "my facility" and "my supervised facilities" both the programs select element and facilities element are reset to their default values

When moved from My supervised facilities to My facility, the default values are displayed.

When moved from My facility to My supervised facilities, the default values are displayed.


8

Try to search the periods for proper program and facility.


After clicking the SEARCH button, the list of period for initiating the requisition is displayed.


9Try to search the periods for proper program and facility to initiate emergency requisition.


After selecting Emergency radiobutton and clicking the SEARCH button, the list of period for initiating the emergency requisition is displayed.


10

API: Check a list of all the programs where the current user has supervisory permissions.

URL:  http://test.openlmis.org/api/users/a337ec45-31a0-4f2b-9b2e-a105c4b669bb/programs?access_token=4b4bdb12-27ef-474e-97c5-cfcd28ca4e0d

Method: GET


The list of all programs is displayed.


The roles for two programs has been assigned to user.

11

API: Check a list of facilities where that program is active and where the current user has supervisory permissions.

URL:  http://test.openlmis.org/api/users/a337ec45-31a0-4f2b-9b2e-a105c4b669bb/supervisedFacilities?rightId=9ade922b-3523-4582-bef4-a47701f7df14&programId=10845cb9-d365-4aaa-badd-b4fa39c6a26a&access_token=4b4bdb12-27ef-474e-97c5-cfcd28ca4e0d

Method: GET


The list of supervised facility is displayed.


The roles for supervising facility has been assigned to User.

12

API: No roles/proper roles are assigned to user. Try to display all programs where current user has supervisory permissions.

URL:  http://192.168.1.14/api/users/56a50e9a-9668-437d-a09c-7e709ce22222/programs?access_token=6f5f31de-d226-4229-9368-81737deb6cab

Method: GET


When roles are not assigned to user or only roles for supervising the facility has been assigned, the server should return empty array (in that case, roles for supervising programs are not assigned).


Case when user has not assigned roles at all.

OR

Case when User has assigned role for supervising the facility.

13

API: No roles are assigned to user. Try to display all facilities where the current user has supervisory permissions.

URL:  http://192.168.1.14/api/users/56a50e9a-9668-437d-a09c-7e709ce22222/supervisedFacilities?rightId=9ade922b-3523-4582-bef4-a47701f7df14&programId=10845cb9-d365-4aaa-badd-b4fa39c6a26a&access_token=6f5f31de-d226-4229-9368-81737deb6cab

When roles are not assigned to user or only roles for supervising the program has been assigned, the server should return empty array (in that case, roles for supervising facility are not assigned).


Case when User has assigned role for supervising the programs.

OR

Case when user has not assigned roles at all.




OpenLMIS: the global initiative for powerful LMIS software