Add GUI automation test case for disable user

- Added test case 'Verify Disable User'

Change-Id: I8a2abcea091738ca12f0b7233c2f2c22ac5a10b7
Signed-off-by: manashsarma <manashsarma@in.ibm.com>
diff --git a/gui/gui_test/access_control/test_obmc_gui_local_users.robot b/gui/gui_test/access_control/test_obmc_gui_local_users.robot
index c830407..790ba85 100644
--- a/gui/gui_test/access_control/test_obmc_gui_local_users.robot
+++ b/gui/gui_test/access_control/test_obmc_gui_local_users.robot
@@ -100,27 +100,35 @@
     [Tags]  Verify_User_Access_Privilege
     [Template]  Create User And Verify
 
-    # username      privilege_level
-    admin_user      Administrator
-    operator_user   Operator
-    readonly_user   ReadOnly
-    noaccess_user   NoAccess
+    # username      privilege_level  enabled
+    admin_user      Administrator    ${True}
+    operator_user   Operator         ${True}
+    readonly_user   ReadOnly         ${True}
+    noaccess_user   NoAccess         ${True}
+    disabled_user   Administrator    ${False}
+
 
 *** Keywords ***
 
 Create User And Verify
     [Documentation]  Create a user with given user name and privilege and verify that the
     ...  user is created successfully via GUI and Redfish.
-    [Teardown]  Redfish.Delete  /redfish/v1/AccountService/Accounts/${user_name}
-    [Arguments]  ${user_name}  ${user_privilege}
+    [Teardown]  Run Keywords  Redfish.Logout  AND  Redfish.Login  AND
+    ...  Redfish.Delete  /redfish/v1/AccountService/Accounts/${user_name}
+    [Arguments]  ${user_name}  ${user_privilege}  ${enabled}
 
     # Description of argument(s):
     # user_name           The name of the user to be created (e.g. "test", "robert", etc.).
     # user_privilege      Privilege of the user.
+    # enabled             If the user is enabled (e.g True if enabled, False if disabled).
 
     Click Element  ${xpath_add_user}
     Wait Until Page Contains Element  ${xpath_add_user_heading}
 
+    # Select disabled radio button if user needs to be disabled
+    Run Keyword If  ${enabled} == ${False}
+    ...  Click Element At Coordinates  ${xpath_radio_account_status_disabled}  0  0
+
     # Input username, password and privilege.
     Input Text  ${xpath_username_input_button}  ${user_name}
     Select From List by Value  ${xpath_privilege_list_button}  ${user_privilege}
@@ -142,6 +150,14 @@
     ...  /redfish/v1/AccountService/Accounts/${user_name}  RoleId
     Should Be Equal  ${user_privilege}  ${user_priv_redfish}
 
+    # Check enable/disable status for user.
+    Redfish.Logout
+    ${status}=  Run Keyword And Return Status  Redfish.Login  ${user_name}  ${test_user_password}
+    Run Keyword If  ${enabled} == ${False}
+    ...  Should Be Equal  ${status}  ${False}
+    ...  ELSE  Should Be Equal  ${status}  ${True}
+
+
 Test Setup Execution
     [Documentation]  Do test case setup tasks.