Added test suite for GUI Server Led page
Signed-off-by: Anusha Dathatri <adathatr@in.ibm.com>
Change-Id: I0f0f1250a0730be9367e9b8f9035401277fa8ada
diff --git a/gui/data/resource_variables.py b/gui/data/resource_variables.py
index 5d0efbd..5eee995 100644
--- a/gui/data/resource_variables.py
+++ b/gui/data/resource_variables.py
@@ -80,6 +80,7 @@
xpath_select_reboot_bmc = "//a[@href='#/server-control/bmc-reboot']"
xpath_select_ldap = "//a[@href='#/access-control/ldap']"
xpath_select_server_health = "//a[@href='#/server-health/event-log']"
+ xpath_select_server_led = "//a[@href='#/server-control/server-led']"
# Power operation elements needed for power on.
header_wrapper = "3"
diff --git a/gui/test/server_control/test_obmc_gui_server_led.robot b/gui/test/server_control/test_obmc_gui_server_led.robot
new file mode 100644
index 0000000..ac0677f
--- /dev/null
+++ b/gui/test/server_control/test_obmc_gui_server_led.robot
@@ -0,0 +1,43 @@
+*** Settings ***
+
+Documentation Test OpenBMC GUI "Server LED" sub-menu of "Server control".
+
+Resource ../../lib/resource.robot
+
+Suite Setup Launch Browser And Login OpenBMC GUI
+Suite Teardown Close Browser
+Test Setup Test Setup Execution
+
+
+*** Variables ***
+
+${xpath_led_light_control} //*[@for="toggle__switch-round"]
+
+
+*** Test Cases ***
+
+Verify Existence Of All Sections In Server LED Page
+ [Documentation] Verify existence of all sections in Server LED page.
+ [Tags] Verify_Existence_Of_All_Sections_In_Server_LED_Page
+
+ Page Should Contain LED light control
+ Page Should Contain Server LED light
+
+
+Verify Existence Of All Buttons In Server LED Page
+ [Documentation] Verify existence of all buttons in Server LED page.
+ [Tags] Verify_Existence_Of_All_Buttons_In_Server_LED_Page
+
+ Page Should Contain Element ${xpath_led_light_control}
+
+
+*** Keywords ***
+
+Test Setup Execution
+ [Documentation] Do test case setup tasks.
+
+ Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
+ Click Element ${xpath_select_server_control}
+ Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
+ Click Element ${xpath_select_server_led}
+ Wait Until Page Contains Server LED