Added test cases for GUI dump sub menu
Test cases added:
- Verify Navigation To Dumps Page
- Verify Existence Of All Sections In Dump Page
- Verify Existence Of All Buttons In Dump Page
Change-Id: I62957a122d3ded00f232d72193a3d938e1bf43fe
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/gui/data/gui_variables.py b/gui/data/gui_variables.py
index c00f740..0d3ac39 100644
--- a/gui/data/gui_variables.py
+++ b/gui/data/gui_variables.py
@@ -30,6 +30,7 @@
# Health menu
xpath_health_menu = "//*[@data-test-id='nav-button-health']"
+ xpath_dumps_sub_menu = "//*[@data-test-id='nav-item-dumps']"
xpath_event_logs_sub_menu = "//*[@data-test-id='nav-item-event-logs']"
xpath_sensor_sub_menu = "//*[@data-test-id='nav-item-sensors']"
xpath_hardware_status_sub_menu = "//*[@data-test-id='nav-item-hardware-status']"
diff --git a/gui/gui_test/health_menu/test_dump_sub_menu.robot b/gui/gui_test/health_menu/test_dump_sub_menu.robot
new file mode 100644
index 0000000..fe56026
--- /dev/null
+++ b/gui/gui_test/health_menu/test_dump_sub_menu.robot
@@ -0,0 +1,49 @@
+*** Settings ***
+
+Documentation Test OpenBMC GUI "Dumps" sub-menu of "Health" menu.
+
+Resource ../../lib/gui_resource.robot
+
+Suite Setup Suite Setup Execution
+Suite Teardown Close Browser
+
+
+*** Variables ***
+
+${xpath_dumps_heading} //h1[text()="Dumps"]
+${xpath_initiate_dump_button} //button[contains(text(),'Initiate dump')]
+
+
+*** Test Cases ***
+
+Verify Navigation To Dumps Page
+ [Documentation] Verify navigation to dumps page.
+ [Tags] Verify_Navigation_To_Dumps_Page
+
+ Page Should Contain Element ${xpath_dumps_heading}
+
+
+Verify Existence Of All Sections In Dump Page
+ [Documentation] Verify existence of all sections in dump page.
+ [Tags] Verify_Existence_Of_All_Sections_In_Dump_Page
+
+ Page Should Contain Initiate dump
+ Page Should Contain Dumps available on BMC
+
+
+Verify Existence Of All Buttons In Dump Page
+ [Documentation] Verify existence of all buttons in dump page.
+ [Tags] Verify_Existence_Of_All_Buttons_In_Dump_Page
+
+ Page Should Contain Element ${xpath_initiate_dump_button}
+
+
+*** Keywords ***
+
+Suite Setup Execution
+ [Documentation] Do test suite setup tasks.
+
+ Launch Browser And Login GUI
+ Click Element ${xpath_health_menu}
+ Click Element ${xpath_dumps_sub_menu}
+ Wait Until Keyword Succeeds 30 sec 5 sec Location Should Contain dumps