Added test suite for GUI power usage testing

Change-Id: I4371a02230e72c9da3a0c26074078a5c68076643
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/gui/test/server_control/test_obmc_gui_manage_power_usage.robot b/gui/test/server_control/test_obmc_gui_manage_power_usage.robot
new file mode 100644
index 0000000..2302879
--- /dev/null
+++ b/gui/test/server_control/test_obmc_gui_manage_power_usage.robot
@@ -0,0 +1,45 @@
+*** Settings ***
+
+Documentation  Test OpenBMC GUI "Manage power usage" 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_power_cap_toggle_button}    //*[@class="toggle-container"]
+
+
+*** Test Cases ***
+
+Verify Existence Of All Sections In Manage Power Usage Page
+    [Documentation]  Verify existence of all sections in manage power usage page.
+    [Tags]  Verify_Existence_Of_All_Sections_In_Manage_Power_Usage_Page
+
+    Page Should Contain  Power information
+    Page Should Contain  Server power cap setting
+
+
+Verify Existence Of All Buttons In Manage Power Usage Page
+    [Documentation]  Verify existence of all buttons in manage power usage page.
+    [Tags]  Verify_Existence_Of_All_Buttons_In_Manage_Power_Usage_Page
+
+    Page Should Contain Element  ${xpath_power_cap_toggle_button}
+    Page Should Contain Element  ${xpath_save_setting_button}
+    Page Should Contain Element  ${xpath_cancel_button}
+
+
+*** 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_manage_power_usage}
+    Wait Until Page Contains  Manage Power Usage