Added tests for hardware status tab on GUI.
Added following test cases:
- Verify select "Health status" sub-menu from "Server Health".
- Verify inventory export From "Health status" clickable.
- Verify search text enterable.
Resolves openbmc/openbmc-test-automation#1349
Change-Id: I2cd626bab608e08098127544ef897c1831a8bde1
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
new file mode 100644
index 0000000..842bce4
--- /dev/null
+++ b/gui/obmc_gui/test/server_health/test_obmc_gui_hardware_status.robot
@@ -0,0 +1,55 @@
+*** Settings ***
+
+Documentation Test OpenBMC GUI "Hardware status" sub-menu of "Server health".
+
+Resource ../../lib/resource.robot
+
+Suite Setup Launch Browser And Login OpenBMC GUI
+Suite Teardown Logout And Close Browser
+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"]
+
+*** Test Cases ***
+Verify Select Health Status From Server Health
+ [Documentation] Verify ability to select "Hardware status" sub-menu option
+ ... of "Server health".
+ [Tags] Verify_Select_Health_Status_From_Server_Health
+
+ Wait Until Page Contains Hardware status
+ Page should contain All hardware in the system
+
+
+Verify Inventory Export From Server Health Clickable
+ [Documentation] Verify ability to export inventory from "Hardware status"
+ ... sub-menu.
+ [Tags] Verify_Inventory_Export_From_Server_Health_Clickable
+
+ 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.
+ [Tags] Verify_Search_Text_Enterable
+
+ 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_button}
+ Click Element ${xpath_inventory_search_button}
+
+*** Keywords ***
+
+Test Setup Execution
+ [Documentation] Do test case setup tasks.
+
+ Click Element ${xpath_select_server_health}
+ Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
+ Click Element ${xpath_select_hardware_status}
+