Keeping only openbmc gui related files under gui folder
Change-Id: I16be748571e9842fe8293ad8137a51730eb21613
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/gui/test/gui_header/test_obmc_gui_power_operations.robot b/gui/test/gui_header/test_obmc_gui_power_operations.robot
new file mode 100644
index 0000000..56bd9c6
--- /dev/null
+++ b/gui/test/gui_header/test_obmc_gui_power_operations.robot
@@ -0,0 +1,145 @@
+*** Settings ***
+
+Documentation Test Open BMC GUI Power Operations under GUI Header.
+
+Resource ../../../lib/state_manager.robot
+Resource ../../lib/resource.robot
+
+Test Setup Test Setup Execution
+Test Teardown Close Browser
+
+*** Test Cases ***
+
+Power On The Host
+ [Documentation] Power on the host.
+ [Tags] Power_On_the_Host
+
+ Expected Initial Test State Off
+ GUI Power On
+ Wait Until Keyword Succeeds 10 min 10 sec Is Host Running
+ Wait Until Page Contains Running
+
+Click Immediate Shutdown Then No
+ [Documentation] Click the "Immediate shutdown" button and then click the
+ ... "No" button.
+ [Tags] Click_Immediate_Shutdown_Then_No
+
+ Expected Initial Test State Running
+ Controller Server Power Click Button power__hard-shutdown
+ Controller Power Operations Confirmation Click Button ${power_operations}
+ ... ${power_off} ${confirm_msg} ${no}
+
+ Is Host Running
+ Wait Until Page Contains Running
+
+Click Cold Reboot Then No
+ [Documentation] Click the "Cold reboot" button and then click the "No"
+ ... button.
+ [Tags] Click_Cold_Reboot_Then_No
+
+ Expected Initial Test State Running
+ Controller Server Power Click Button power__cold-boot
+ Controller Power Operations Confirmation Click Button ${power_operations}
+ ... ${cold_boot} ${confirm_msg} ${no}
+
+ Is Host Running
+ Page Should Contain Running
+
+Click Warm Reboot Then No
+ [Documentation] Click the "Warm reboot" button and then click the "No"
+ ... button.
+ [Tags] Click_Warm_Reboot_Then_No
+
+ Expected Initial Test State Running
+ Controller Server Power Click Button power__warm-boot
+ Controller Power Operations Confirmation Click Button ${power_operations}
+ ... ${warm_boot} ${confirm_msg} ${no}
+ Is Host Running
+ Page Should Contain Running
+
+Click Orderly Shutdown Then No
+ [Documentation] Click the "Orderly shutdown" button and then click the
+ ... "No" button.
+ [Tags] Click_Orderly_Shutdown_Then_No
+
+ Expected Initial Test State Running
+ Controller Server Power Click Button power__soft-shutdown
+ Controller Power Operations Confirmation Click Button ${power_operations}
+ ... ${shut_down} ${confirm_msg} ${no}
+ Wait Until Keyword Succeeds 10 min 10 sec Is Host Running
+ Page Should Contain Running
+
+Click Warm Reboot Then Yes
+ [Documentation] Click the "Warm reboot" button and then click the "Yes"
+ ... button.
+ [Tags] Click_Warm_Reboot_Then_Yes
+
+ Expected Initial Test State Running
+ Controller Server Power Click Button power__warm-boot
+ Controller Power Operations Confirmation Click Button ${power_operations}
+ ... ${warm_boot} ${confirm_msg} ${yes}
+ Wait Until Keyword Succeeds 10 min 10 sec Is Host Running
+ Page Should Contain Running
+
+Click Cold Reboot Then Yes
+ [Documentation] Click the "Cold reboot" button and then click the "Yes"
+ ... button.
+ [Tags] Click_Cold_Reboot_Then_Yes
+
+ Expected Initial Test State Running
+ Controller Server Power Click Button power__cold-boot
+ Controller Power Operations Confirmation Click Button ${power_operations}
+ ... ${cold_boot} ${confirm_msg} ${yes}
+ Page Should Contain Standby
+ Wait Until Keyword Succeeds 10 min 10 sec Is Host Running
+ Page Should Contain Running
+
+Click Orderly Shutdown Then Yes
+ [Documentation] Click the "Orderly shutdown" button and then click the
+ ... "Yes" button.
+ [Tags] Click_Orderly_Shutdown_Then_Yes
+
+ Expected Initial Test State Running
+ Controller Server Power Click Button power__soft-shutdown
+ Controller Power Operations Confirmation Click Button ${power_operations}
+ ... ${shut_down} ${confirm_msg} ${yes}
+ Page Should Contain Off
+ Wait Until Keyword Succeeds 6 min 10 sec Is Host Off
+
+Click Immediate Shutdown Then Yes
+ [Documentation] Click "Immediate shutdown" button and then click the "Yes"
+ ... button.
+ [Tags] Click_Immediate_Shutdown_Then_Yes
+
+ Expected Initial Test State Running
+
+ # By this time GUI logs out. So relaunching it.
+ Close Browser
+ Launch Browser And Login OpenBMC GUI
+
+ Controller Server Power Click Button power__hard-shutdown
+ Controller Power Operations Confirmation Click Button ${power_operations}
+ ... ${power_off} ${confirm_msg} ${yes}
+
+ Wait Until Page Contains Off
+ Wait Until Keyword Succeeds 6 min 10 sec Is Host Off
+
+OpenBMC GUI Logoff
+ [Documentation] Log out from openBMC GUI.
+ [Tags] OpenBMC_GUI_Logoff
+
+ Log ${xpath_openbmc_url}
+ Log To Console ${xpath_openbmc_url}
+ Click Element header
+
+
+*** Keywords ***
+
+Test Setup Execution
+ [Documentation] Do testcase setup tasks.
+
+ # Launch the GUI and navigate to server power page.
+ Launch Browser And Login OpenBMC GUI
+ Click Element ${xpath_select_server_power}
+ Wait Until Page Contains Server power operations
+