Added test for overview menu
Changes:
- Added suite to test overview page
- Added test to verify existence of all sections of overview page
Change-Id: Ifb9b45cc213a22fcf74f125119630305f1aceae5
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/gui/data/resource_variables.py b/gui/data/resource_variables.py
index c4e4c52..b31fa9c 100644
--- a/gui/data/resource_variables.py
+++ b/gui/data/resource_variables.py
@@ -125,6 +125,9 @@
xpath_login_button = "//button[@type='submit']"
xpath_logout_button = "//button[@id='app-header-logout']"
+ # xpath for overview menu
+ xpath_overview_menu = "//a[@href='#/']"
+
# xpath for control menu
xpath_control_menu = "//button[@aria-controls='control-menu']"
xpath_manage_power_usage_sub_menu = "//a[@href='#/control/manage-power-usage']"
diff --git a/gui/gui_test/overview_menu/test_overview_menu.robot b/gui/gui_test/overview_menu/test_overview_menu.robot
new file mode 100644
index 0000000..1257578
--- /dev/null
+++ b/gui/gui_test/overview_menu/test_overview_menu.robot
@@ -0,0 +1,37 @@
+*** Settings ***
+
+Documentation Test OpenBMC GUI "Overview" menu.
+
+Resource ../../lib/resource.robot
+
+Suite Setup Launch Browser And Login GUI
+Suite Teardown Close Browser
+Test Setup Test Setup Execution
+
+
+*** Variables ***
+
+${xpath_overview_page_header} //h1[contains(text(), "Overview")]
+
+
+*** Test Cases ***
+
+Verify Existence Of All Sections In Overview Page
+ [Documentation] Verify existence of all sections in Overview page.
+ [Tags] Verify_Existence_Of_All_Sections_In_Overview_Page
+
+ Page Should Contain BMC information
+ Page Should Contain Server information
+ Page Should Contain Network information
+ Page Should Contain Power consumption
+ Page Should Contain High priority events
+
+
+*** Keywords ***
+
+Test Setup Execution
+ [Documentation] Do test case setup tasks.
+
+ Click Element ${xpath_overview_menu}
+ Wait Until Page Contains Element ${xpath_overview_page_header}
+