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:
|
|
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: | |
3 | If the programs select element doesn't have an option selected, the facilities select element be disabled. | ||
4 | When 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. | |
7 | When 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. | |
9 | Try 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. 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. 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. 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. | 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). | OR Case when user has not assigned roles at all. |