Added tests for hardware status tab on GUI.

Added following test cases:
  - Verify Search Text Clearable
  - Verify System Inventory Expand

Resolves openbmc/openbmc-test-automation#1361

Change-Id: I8bf5ba7eb39d06341e5f9a5a04ecd290ff54d904
Signed-off-by: Sivas SRR <sivas.srr@in.ibm.com>
diff --git a/gui/obmc_gui/test/server_health/test_obmc_gui_hardware_status.robot b/gui/obmc_gui/test/server_health/test_obmc_gui_hardware_status.robot
index 842bce4..25c1aa0 100644
--- a/gui/obmc_gui/test/server_health/test_obmc_gui_hardware_status.robot
+++ b/gui/obmc_gui/test/server_health/test_obmc_gui_hardware_status.robot
@@ -9,13 +9,20 @@
 Test Setup      Test Setup Execution
 
 *** Variables ***
+
 ${xpath_select_server_health}  //*[@id="nav__top-level"]/li[2]/button
 ${xpath_select_hardware_status}  //a[@href='#/server-health/inventory-overview']
 ${xpath_inventory_export}  css:a.inline
 ${xpath_inventory_search}  //*[@id="content__search-input"]
 ${xpath_inventory_search_button}  //*[@id="content__search-submit"]
+${xpath_inventory_search_text_clear}  class:clear-input
+${xpath_bmc_expand}  //*[@id="inventory-categories"]/div[5]/button
+${xpath_system_expand}  //*[@id="inventory-categories"]/div[2]/button
+${xpath_motherboard_expand}  //*[@id="inventory-categories"]/div[4]/button
+${xpath_chassis_expand}  //*[@id="inventory-categories"]/div[3]/button
 
 *** Test Cases ***
+
 Verify Select Health Status From Server Health
     [Documentation]  Verify ability to select "Hardware status" sub-menu option
     ...  of "Server health".
@@ -33,6 +40,7 @@
     Page Should Contain Element  ${xpath_inventory_export}
     Click Element  ${xpath_inventory_export}
 
+
 Verify Search Text Enterable
     [Documentation]  Verify search text input allowed from "Hardware status"
     ...  sub-menu.
@@ -44,6 +52,31 @@
     Page Should Contain Element  ${xpath_inventory_search_button}
     Click Element  ${xpath_inventory_search_button}
 
+
+Verify Search Text Clearable
+    [Documentation]  Verify search text allowed to clear from "Hardware status"
+    ...  sub-menu.
+    [Tags]  Verify_Search_Text_Clearable
+
+    Page Should Contain Element  ${xpath_inventory_search}
+    Input Text  ${xpath_inventory_search}  fan
+    Wait Until Page Does Not Contain Element  ${xpath_refresh_circle}
+    Page Should Contain Element  ${xpath_inventory_search_text_clear}
+    Click Element  ${xpath_inventory_search_text_clear}
+
+
+Verify System Inventory Expand
+    [Documentation]  Verify system inventory icon expandable from
+    ...  "Hardware status" sub-menu.
+    [Tags]  Verify_System_Inventory_Expand
+    [Template]  Verify Hardware Inventory Expand
+
+    # xpath_hardware_item
+    ${xpath_system_expand}
+    ${xpath_chassis_expand}
+    ${xpath_bmc_expand}
+    ${xpath_motherboard_expand}
+
 *** Keywords ***
 
 Test Setup Execution
@@ -53,3 +86,13 @@
     Wait Until Page Does Not Contain Element  ${xpath_refresh_circle}
     Click Element  ${xpath_select_hardware_status}
 
+
+Verify Hardware Inventory Expand
+   [Documentation]  Verify expand individual hardware inventory item.
+   [Arguments]  ${xpath_hardware_item}
+
+   # Description of argument(s):
+   # xpath_hardware_item    Hardware inventory item to be expand. e.g. fan.
+
+   Page Should Contain Element  ${xpath_hardware_item}
+   Click Element  ${xpath_hardware_item}