Add GUI automation test case to verify reboot
Added test cases:
- Verify Host Immediate Reboot
- Verify Host Orderly Reboot
Change-Id: I9ec8167e933b98927663a8dd6a8c0583c535df31
Signed-off-by: manashsarma <manashsarma@in.ibm.com>
diff --git a/gui/gui_test/control_menu/test_server_power_operations_sub_menu.robot b/gui/gui_test/control_menu/test_server_power_operations_sub_menu.robot
index ff2afe5..272678b 100644
--- a/gui/gui_test/control_menu/test_server_power_operations_sub_menu.robot
+++ b/gui/gui_test/control_menu/test_server_power_operations_sub_menu.robot
@@ -24,6 +24,8 @@
${xpath_shutdown_immediate_radio} //*[@data-test-id='serverPowerOperations-radio-shutdownImmediate']
${xpath_confirm_button} //button[contains(text(),'Confirm')]
${xpath_current_power_state} //*[contains(@class,'row mb-4')]
+${xpath_reboot_orderly_radio} //*[@data-test-id='serverPowerOperations-radio-rebootOrderly']
+${xpath_reboot_immediate_radio} //*[@data-test-id='serverPowerOperations-radio-rebootImmediate']
*** Test Cases ***
@@ -128,6 +130,34 @@
Page Should Contain Element ${xpath_save_button}
+Verify Host Immediate Reboot
+ [Documentation] Verify host reboot after triggering immediate reboot.
+ [Tags] Verify_Host_Immediate_Reboot
+
+ Redfish Power On stack_mode=skip
+ Click Element At Coordinates ${xpath_reboot_immediate_radio} 0 0
+ Click Element ${xpath_reboot_button}
+ Wait Until Page Contains Element ${xpath_confirm_button} timeout=10
+ Click Element ${xpath_confirm_button}
+ Wait Until Keyword Succeeds 3 min 0 sec Element Should Contain ${xpath_current_power_state} Off
+ Click Element ${xpath_refresh_button}
+ Wait Until Keyword Succeeds 3 min 0 sec Element Should Contain ${xpath_current_power_state} On
+
+
+Verify Host Orderly Reboot
+ [Documentation] Verify host reboot after triggering orderly reboot.
+ [Tags] Verify_Host_Orderly_Reboot
+
+ Redfish Power On stack_mode=skip
+ Click Element At Coordinates ${xpath_reboot_orderly_radio} 0 0
+ Click Element ${xpath_reboot_button}
+ Wait Until Page Contains Element ${xpath_confirm_button} timeout=10
+ Click Element ${xpath_confirm_button}
+ Wait Until Keyword Succeeds 10 min 0 sec Element Should Contain ${xpath_current_power_state} Off
+ Click Element ${xpath_refresh_button}
+ Wait Until Keyword Succeeds 10 min 0 sec Element Should Contain ${xpath_current_power_state} On
+
+
*** Keywords ***
Test Setup Execution