Added tests for KVM sub-menu
Changes:
- Added suite to test KVM page
- Added tests to verify existence of all sections
and buttons of KVM page
Change-Id: I847ca24e5671a552ea79b848b5c8fa044c509073
Signed-off-by: Sushma M M <sushmm99@in.ibm.com>
diff --git a/gui/data/resource_variables.py b/gui/data/resource_variables.py
index aec5a6a..1e60907 100644
--- a/gui/data/resource_variables.py
+++ b/gui/data/resource_variables.py
@@ -142,6 +142,7 @@
xpath_server_led_sub_menu = "//a[@href='#/control/server-led']"
xpath_server_power_operations_sub_menu = "//a[@href='#/control/server-power-operations']"
xpath_sol_sub_menu = "//a[@href='#/control/serial-over-lan']"
+ xpath_kvm_sub_menu = "//a[@href='#/control/kvm']"
# xpath for configuration menu
xpath_server_configuration = "//button[@aria-controls='configuration-menu']"
diff --git a/gui/gui_test/control_menu/test_obmc_gui_kvm_sub_menu.robot b/gui/gui_test/control_menu/test_obmc_gui_kvm_sub_menu.robot
new file mode 100644
index 0000000..224a2e9
--- /dev/null
+++ b/gui/gui_test/control_menu/test_obmc_gui_kvm_sub_menu.robot
@@ -0,0 +1,41 @@
+*** Settings ***
+
+Documentation Test OpenBMC GUI "KVM" sub-menu.
+
+Resource ../../lib/resource.robot
+
+Suite Setup Launch Browser And Login GUI
+Suite Teardown Close Browser
+Test Setup Test Setup Execution
+
+
+*** Variables ***
+${xpath_kvm_header} //h1[text()="KVM"]
+${xpath_new_tab_button} //button[contains(text(),'Open in new tab')]
+${xpath_send_button} //button[contains(text(),'Send Ctrl+Alt+Delete')]
+
+*** Test Cases ***
+
+Verify Existence Of All Sections In KVM Page
+ [Documentation] Verify existence of all sections in KVM page.
+ [Tags] Verify_Existence_Of_All_Sections_In_KVM_Page
+
+ Page Should Contain Element ${xpath_kvm_header}
+ Page Should Contain Access the KVM console
+
+
+Verify Existence Of All Buttons In KVM Page
+ [Documentation] Verify existence of all buttons in kvm page.
+ [Tags] Verify_Existence_Of_All_Buttons_In_Kvm_Page
+
+ Page Should Contain Element ${xpath_new_tab_button}
+
+
+*** Keywords ***
+
+Test Setup Execution
+ [Documentation] Do test case setup tasks.
+
+ Click Element ${xpath_control_menu}
+ Click Element ${xpath_kvm_sub_menu}
+ Wait Until Keyword Succeeds 30 sec 5 sec Location Should Contain kvm