1301: Admin UI to Configure Requisition Templates

Test Case #: 1301


Test Case Name: Admin UI to Configure Requisition Templates

System: openLMIS

Subsystem: blue

Test case designed by: Lucyna Laska

Design Date:06.12.2016

Short description

As an implementor/admin, I want to configure the requisition template(s) for my program(s) with a user-friendly UI so that my RnRs will be set up right for each program.

This ticket has sub-tasks to implement two new pages within the Requisition Ref UI.
(1) List of requisition templates (located in the top navigation at "Administration" > "Configure" > "R & R Template"
(2) Edit requisition template page (accessible from the list of requisition templates only)

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       



Step

Action

Expected system response

Comment

1

  Assign User a role "MANAGE_REQUISITION_TEMPLATES". 

URL:  http://10.222.17.134/api/users?access_token=1bdf13b8-ab12-48f4-b836-f0478fa1f34d

Method: PUT

Body:

 {
         "id": "a337ec45-31a0-4f2b-9b2e-a105c4b669bb",
    "username": "administrator",
    "firstName": "Admin",
    "lastName": "Admin",
    "email": "administrator@openlmis.org",
    "timezone": "CET",
    "homeFacility": {
      "code": "HC01",
      "name": "Comfort Health Clinic",
      "geographicZone": {
        "code": "M-So-Bal-Bal",
        "name": "Balaka",
        "level": {
          "code": "City",
          "levelNumber": 4,
          "id": "90e35999-a64f-4312-ba8f-bc13a1311c75"
        },
        "latitude": -14.99,
        "longitude": 34.92,
        "id": "bf2b810b-cdbf-48b2-b569-149b3cf42387"
      },
      "type": {
        "code": "warehouse",
        "name": "Health Center",
        "displayOrder": 1,
        "active": true,
        "id": "ac1d268b-ce10-455f-bf87-9c667da8f060"
      },
      "operator": {
        "code": "moh",
        "name": "Ministry of Health",
        "displayOrder": 1,
        "id": "9456c3e9-c4a6-4a28-9e08-47ceb16a4121"
      },
      "active": true,
      "enabled": true,
      "openLmisAccessible": true,
      "supportedPrograms": [
        {
          "id": "dce17f2e-af3e-40ad-8e00-3496adef44c3",
          "code": "PRG001",
          "name": "Family Planing",
          "programActive": true,
          "periodsSkippable": true,
          "showNonFullSupplyTab": true,
          "supportActive": true
        },
        {
          "id": "10845cb9-d365-4aaa-badd-b4fa39c6a26a",
          "code": "PRG002",
          "name": "Essential Meds",
          "programActive": true,
          "periodsSkippable": false,
          "showNonFullSupplyTab": false,
          "supportActive": true
        }
      ],
      "id": "e6799d64-d10d-4011-b8c2-0e4d4a3f65ce"
    },
    "verified": true,
    "active": true,
    "loginRestricted": false,
    "roleAssignments": [
      {
        "roleId": "d30a2fbb-51d9-49ad-90fe-fb405470a439",
        "programCode": "PRG002",
        "supervisoryNodeCode": "N1"
      },
      {
        "roleId": "d30a2fbb-51d9-49ad-90fe-fb405470a439",
        "programCode": "PRG001"
      },
      {
        "roleId": "d30a2fbb-51d9-49ad-90fe-fb405470a439",
        "programCode": "PRG002"
      },
      {
        "roleId": "d30a2fbb-51d9-49ad-90fe-fb405470a439",
        "programCode": "PRG001",
        "supervisoryNodeCode": "N1"
      },
      {
        "roleId": "185db8f7-ee35-44d0-8b40-6de12489ae77",
        "warehouseCode": "HC01"
      },
      {
        "roleId": "a439c5de-b8aa-11e6-80f5-76304dec7eb7"
      }
    ]

  }

                                                                                

                                                                                                                            

   Add right:

               URL: http://10.222.17.134/api/rights?access_token=c276478e-a668-43d6-b4cd-b68a8e2ef378

     Method: PUT

Body:

  {

    "id": "8816edba-b8a9-11e6-80f5-76304dec7eb7",

    "name": "MANAGE_REQUISITION_TEMPLATES",

    "type": "GENERAL_ADMIN",

    "attachments": []

  },


Add role:

URL: http://10.222.17.134/api/roles?access_token=c276478e-a668-43d6-b4cd-b68a8e2ef378

Method: POST

Body:

  {

    "id": "a439c5de-b8aa-11e6-80f5-76304dec7eb7",

    "name": "Admin",

    "rights": [

      {

        "id": "8816edba-b8a9-11e6-80f5-76304dec7eb7",

        "name": "MANAGE_REQUISITION_TEMPLATES",

        "type": "GENERAL_ADMIN",

        "attachments": []

      }

    ]

  },

2

 Log into UI and check if configuring the requisition templates for programs is possible.

The Edit links should be visible.


3

Log in as user with no permissions for configuring the requisition templates.

The Administration menu is hidden.



4

 Log in as a user with proper permission for configuring the requisition templates.


The Administration option in menu is available.


5

Check If Display checkbox for Product can be unselected. 

The checkbox display for Product can't be unselected.


6

 Check If displaying order can be changed for Product and Product Code.


Unfortunately, the order display for those columns can't be changed


7

                Check if changing display order for other fields is possible.                               

At the beginning, Total Losses And Adjustments is placed above the Stock on Hand. I tried to drag and drop the column into a different order.

Now, Total Losses And Adjustments is places above the Total Consumed Quantity. Changes will be saved properly.


8Check if changing the label name is possible.

Yes, It's possible to rename the label.


9

Check if clicking the Change link navigate back to the previous screen listing all programs.


After clicking into Change link user is redirects to main requisition template view.






10 select the USER INPUT in source from drop-down list, unselect the display checkbox.

When user tries to unselect the checkbox display, the proper message will be shown: "Should be displayed if source is USER INPUT".


11Select the empty value in source from drop-down list. Try to save the requisition template.


The Saving is not possible. SAVE button is inactive and proper message is displayed.


12Try to uncheck the display order when source is USER INPUT (not selected in drop-down list). Try to save the ticket.


Saving is possible.


13Try to select CALCULATED source from drop-down list for Stock on Hand and TCQ.

That situation is not possible. Both fields can't be set to CALCULATED.




Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software