Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This test suite will validate the "OpenBMC" GUI -> |
| 3 | ... "Server control" main menu -> "Server power |
| 4 | ... operations" submenu module. |
| 5 | |
| 6 | Resource ../../lib/resource.robot |
| 7 | Test Setup Test Setup Execution ${OBMC_PowerOff_state} |
| 8 | Test Teardown Test Teardown Execution |
| 9 | |
Anusha Dathatri | 883ff7c | 2019-10-01 01:56:30 -0500 | [diff] [blame] | 10 | Force Tags Power_Operations |
| 11 | |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 12 | *** Variables *** |
Anusha Dathatri | f93a5c4 | 2019-07-24 05:29:44 -0500 | [diff] [blame] | 13 | ${xpath_select_server_control} //*[contains(@class,"btn-control")] |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 14 | ${xpath_select_server_power_operations} //a[@href='#/server-control/power-operations'] |
| 15 | ${string_server_power_operations} Server power operations |
| 16 | ${string_current_status} Current status |
| 17 | ${string_select_power_operation} Select a power operation |
| 18 | ${string_warm_reboot} Attempts to perform an orderly shutdown before restarting the server |
| 19 | ${string_cold_reboot} Shuts down the server immediately, then restarts it |
| 20 | ${string_orderly_shutdown} Attempts to stop all software on the server before removing power |
| 21 | ${string_immediate_shutdown} Removes power from the server without waiting for software to stop |
| 22 | ${string_power_on} Attempts to power on the server |
| 23 | |
| 24 | *** Test Case *** |
| 25 | # OpenBMC @ Power Off state test cases. |
| 26 | |
Arpana Durgaprasad | f3c2d7f | 2019-02-20 02:28:45 -0600 | [diff] [blame] | 27 | Verify Orderly Shutdown Button At Power Off |
| 28 | [Documentation] Verify orderly shutdown button is not present at power Off. |
| 29 | [Tags] Verify_Orderly_Shutdown_Button_At_Power_Off |
| 30 | |
| 31 | Select Server Power Operations Sub Menu |
| 32 | Element Should Not Be Visible ${xpath_select_button_orderly_shutdown} |
| 33 | |
| 34 | |
| 35 | Verify Immediate Shutdown Button At Power Off |
Joy Onyerikwu | dbfe97d | 2019-03-11 19:44:56 -0500 | [diff] [blame] | 36 | [Documentation] Verify immediate shutdown button not present at power Off. |
Arpana Durgaprasad | f3c2d7f | 2019-02-20 02:28:45 -0600 | [diff] [blame] | 37 | [Tags] Verify_Immediate_Shutdown_Button_At_Power_Off |
| 38 | |
| 39 | Select Server Power Operations Sub Menu |
| 40 | Element Should Not Be Visible ${xpath_select_button_immediate_shutdown} |
| 41 | |
| 42 | |
Arpana Durgaprasad | 0f5aee7 | 2019-02-19 03:47:24 -0600 | [diff] [blame] | 43 | Verify Warm Reboot Button At Power Off |
| 44 | [Documentation] Verify warm reboot button is not present at power Off. |
| 45 | [Tags] Verify_Warm_Reboot_Button_At_Power_Off |
| 46 | |
| 47 | Select Server Power Operations Sub Menu |
| 48 | Element Should Not Be Visible ${xpath_select_button_warm_reboot} |
| 49 | |
| 50 | Verify Cold Reboot Button At Power Off |
| 51 | [Documentation] Verify cold reboot button is not present at power Off. |
| 52 | [Tags] Verify_Cold_Reboot_Button_At_Power_Off |
| 53 | |
| 54 | Select Server Power Operations Sub Menu |
| 55 | Element Should Not Be Visible ${xpath_select_button_cold_reboot} |
| 56 | |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 57 | Verify Title Text Should Be Server Power Operations At Power Off |
| 58 | [Documentation] Verify display of title text "Server Power Operations". |
| 59 | [Tags] Verify_Title_Text_Should_Be_Server_Power_Operations_At_Power_Off |
| 60 | ... OBMC_PowerOff_state |
| 61 | |
| 62 | Select Server Power Operations Sub Menu |
| 63 | Verify Display Content ${string_server_power_operations} |
| 64 | |
| 65 | Verify Sub Title Text Should Be Current Status At Power Off |
| 66 | [Documentation] Verify display of title text "Current Status". |
| 67 | [Tags] Verify_Sub_Title_Text_Should_Be_Current_Status_At_Power_Off |
| 68 | ... OBMC_PowerOff_state |
| 69 | |
| 70 | Select Server Power Operations Sub Menu |
| 71 | Verify Display Content ${string_current_status} |
| 72 | |
| 73 | Verify Sub Title Text Should Be Select Power Operation At Power Off |
| 74 | [Documentation] Verify display of title text "Select a power operation". |
| 75 | [Tags] Verify_Sub_Title_Text_Should_Be_Select_Power_Operation_At_Power_Off |
| 76 | ... OBMC_PowerOff_state |
| 77 | |
| 78 | Select Server Power Operations Sub Menu |
| 79 | Verify Display Content ${string_Select_power_operation} |
| 80 | |
George Keishing | cb3b9b6 | 2018-09-14 12:11:19 -0500 | [diff] [blame] | 81 | Verify Power On Button Should Present At Power Off |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 82 | [Documentation] Verify presence of "Warm reboot" button. |
| 83 | [Tags] Verify_Power_On_Button_Should_Present_At_Power_Off |
| 84 | ... OBMC_PowerOff_State |
| 85 | |
| 86 | Select Server Power Operations Sub Menu |
| 87 | Verify Presence of Power Button And Text Info |
| 88 | ... ${xpath_select_button_power_on} ${string_power_on} |
| 89 | |
| 90 | Verify Power On At Power Off |
| 91 | [Documentation] Verify presence of "Warm reboot" button. |
| 92 | [Tags] Verify_Power_On_At_Power_Off |
| 93 | ... OBMC_PowerOff_State |
| 94 | |
| 95 | Power On OpenBMC |
| 96 | |
| 97 | |
| 98 | # OpenBMC @ Power Running state test cases. |
| 99 | |
| 100 | Verify Warm Reboot Button Should Present At Power Running |
| 101 | [Documentation] Verify presence of "Warm reboot" button. |
| 102 | [Tags] Verify_Warm_Reboot_Button_Should_Present_At_Power_Running |
| 103 | ... OBMC_PowerRunning_State |
| 104 | [Setup] Test Setup Execution ${OBMC_PowerRunning_state} |
| 105 | |
| 106 | Select Server Power Operations Sub Menu |
| 107 | Verify Presence of Power Button And Text Info |
| 108 | ... ${xpath_select_button_warm_reboot} ${string_warm_reboot} |
| 109 | |
| 110 | Verify Cold Reboot Button Should Present At Power Running |
| 111 | [Documentation] Verify presence of "cold reboot" button. |
| 112 | [Tags] Verify_Cold_Reboot_Button_Should_Present_At_Power_Running |
| 113 | ... OBMC_PowerRunning_State |
| 114 | [Setup] Test Setup Execution ${OBMC_PowerRunning_state} |
| 115 | |
| 116 | Select Server Power Operations Sub Menu |
| 117 | Verify Presence of Power Button And Text Info |
| 118 | ... ${xpath_select_button_cold_reboot} ${string_cold_reboot} |
| 119 | |
| 120 | Verify Orderly Shutdown Button Should Present At Power Running |
| 121 | [Documentation] Verify presence of "Orderly shutdow " button. |
| 122 | [Tags] Verify_Orderly_Shutdown_Button_Should_Present_At_Power_Running |
| 123 | ... OBMC_PowerRunning_State |
| 124 | [Setup] Test Setup Execution ${OBMC_PowerRunning_state} |
| 125 | |
| 126 | Select Server Power Operations Sub Menu |
| 127 | Verify Presence of Power Button And Text Info |
| 128 | ... ${xpath_select_button_orderly_shutdown} ${string_orderly_shutdown} |
| 129 | |
| 130 | Verify Immediate Shutdown Button Should Present At Power Running |
| 131 | [Documentation] Verify presence of "Immediate shutdown" button. |
| 132 | [Tags] Verify_Immediate_Shutdown_Button_Should_Present_At_Power_Running |
| 133 | ... OBMC_PowerRunning_State |
| 134 | [Setup] Test Setup Execution ${OBMC_PowerRunning_state} |
| 135 | |
| 136 | Select Server Power Operations Sub Menu |
| 137 | Verify Presence of Power Button And Text Info |
| 138 | ... ${xpath_select_button_immediate_shutdown} ${string_immediate_shutdown} |
| 139 | |
| 140 | Verify Warm Reboot Should Not Happen By Clicking No Button |
| 141 | [Documentation] Verify functionality of warm reboot "No" button clicking. |
| 142 | [Tags] Verify_Warm_Reboot_Should_Not_Happen_By_Clicking_No_Button |
| 143 | [Setup] Test Setup Execution ${OBMC_PowerRunning_state} |
| 144 | |
| 145 | Select Server Power Operations Sub Menu |
| 146 | Click Element ${xpath_select_button_warm_reboot} |
Anusha Dathatri | f93a5c4 | 2019-07-24 05:29:44 -0500 | [diff] [blame] | 147 | Verify Warning Message Display Text ${xpath_operation_warning_message} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 148 | ... ${text_warm_reboot_warning_message} |
| 149 | Verify No Button Functionality |
| 150 | ... ${xpath_select_button_warm_reboot_no} |
| 151 | |
| 152 | Verify Cold Reboot Should Not Happen By Clicking No Button |
| 153 | [Documentation] Verify functionality of cold reboot "No" button clicking. |
| 154 | [Tags] Verify_Cold_Reboot_Should_Not_Happen_By_Clicking_No_Button |
| 155 | [Setup] Test Setup Execution ${OBMC_PowerRunning_state} |
| 156 | |
| 157 | Select Server Power Operations Sub Menu |
| 158 | Click Element ${xpath_select_button_cold_reboot} |
Anusha Dathatri | f93a5c4 | 2019-07-24 05:29:44 -0500 | [diff] [blame] | 159 | Verify Warning Message Display Text ${xpath_operation_warning_message} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 160 | ... ${text_cold_reboot_warning_message} |
| 161 | Verify No Button Functionality |
| 162 | ... ${xpath_select_button_cold_reboot_no} |
| 163 | |
| 164 | Verify Orderly Shutdown Should Not Happen By Clicking No Button |
| 165 | [Documentation] Verify functionality of orderly shutdown "No" button clicking. |
| 166 | [Tags] Verify_Orderly_Shutdown_Should_Not_Happen_By_Clicking_No_Button |
| 167 | [Setup] Test Setup Execution ${OBMC_PowerRunning_state} |
| 168 | |
| 169 | Select Server Power Operations Sub Menu |
| 170 | Click Element ${xpath_select_button_orderly_shutdown} |
Anusha Dathatri | f93a5c4 | 2019-07-24 05:29:44 -0500 | [diff] [blame] | 171 | Verify Warning Message Display Text ${xpath_operation_warning_message} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 172 | ... ${text_orderly_shutdown_warning_message} |
| 173 | Verify No Button Functionality |
| 174 | ... ${xpath_select_button_orderly_shutdown_button_no} |
| 175 | |
| 176 | Verify Immediate Shutdown Should Not Happen By Clicking No Button |
| 177 | [Documentation] Verify functionality of immediate shutdown "No" button clicking. |
| 178 | [Tags] Verify_Immediate_Shutdown_Should_Not_Happen_By_Clicking_No_Button |
| 179 | [Setup] Test Setup Execution ${OBMC_PowerRunning_state} |
| 180 | |
| 181 | Select Server Power Operations Sub Menu |
| 182 | Click Element ${xpath_select_button_immediate_shutdown} |
Anusha Dathatri | f93a5c4 | 2019-07-24 05:29:44 -0500 | [diff] [blame] | 183 | Verify Warning Message Display Text ${xpath_operation_warning_message} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 184 | ... ${text_immediate_shutdown_warning_message} |
| 185 | Verify No Button Functionality |
| 186 | ... ${xpath_select_button_immediate_shutdown_no} |
| 187 | |
| 188 | Verify Warm Reboot Should Happen By Clicking Yes Button |
| 189 | [Documentation] Verify functionality of warm reboot "Yes" button clicking. |
| 190 | [Tags] Verify_Warm_Reboot_Should_Happen_By_Clicking_Yes_Button |
| 191 | [Setup] Test Setup Execution ${OBMC_PowerRunning_state} |
| 192 | |
| 193 | Select Server Power Operations Sub Menu |
| 194 | Warm Reboot openBMC |
| 195 | |
| 196 | Verify Cold Reboot Should Happen By Clicking Yes Button |
| 197 | [Documentation] Verify functionality of cold reboot "Yes" button clicking. |
| 198 | [Tags] Verify_Cold_Reboot_Should_Happen_By_Clicking_Yes_Button |
| 199 | [Setup] Test Setup Execution ${OBMC_PowerRunning_state} |
| 200 | |
| 201 | Select Server Power Operations Sub Menu |
| 202 | Cold Reboot openBMC |
| 203 | |
| 204 | Verify Orderly Shutdown Should Happen By Clicking Yes Button |
| 205 | [Documentation] Verify functionality of orderly shutdown "Yes" button clicking. |
| 206 | [Tags] Verify_Orderly_Shutdown_Should_Happen_By_Clicking_Yes_Button |
| 207 | ... OBMC_PowerRunning_State |
| 208 | [Setup] Test Setup Execution ${OBMC_PowerRunning_state} |
| 209 | |
| 210 | Select Server Power Operations Sub Menu |
| 211 | Orderly Shutdown OpenBMC |
| 212 | |
| 213 | Verify Immediate Shutdown Should Happen By Clicking Yes Button |
| 214 | [Documentation] Verify functionality of immediate shutdown "Yes" button clicking. |
| 215 | [Tags] Verify_Immediate_Shutdown_Should_Happen_By_Clicking_Yes_Button |
| 216 | ... OBMC_PowerRunning_State |
| 217 | [Setup] Test Setup Execution ${OBMC_PowerRunning_state} |
| 218 | |
| 219 | Select Server Power Operations Sub Menu |
| 220 | Immediate Shutdown openBMC |
| 221 | |
| 222 | *** Keywords *** |
| 223 | Select Server Power Operations Sub Menu |
| 224 | [Documentation] Selecting of OpenBMC "Server Power Operations" Submenu. |
| 225 | |
| 226 | Click Button ${xpath_select_server_control} |
Anusha Dathatri | f93a5c4 | 2019-07-24 05:29:44 -0500 | [diff] [blame] | 227 | Click Element ${xpath_select_server_power_operations} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 228 | |
| 229 | Verify Presence of Power Button And Text Info |
Gunnar Mills | acc7c56 | 2019-08-20 13:12:46 -0500 | [diff] [blame] | 230 | [Documentation] Verify the presence of power button and text message info. |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 231 | [Arguments] ${power_button} ${power_button_text} |
| 232 | |
| 233 | # power_button Xpath of power button. |
| 234 | # power_button_text Text message info. |
| 235 | |
| 236 | Page Should Contain Button ${power_button} |
| 237 | Verify Display Content ${power_button_text} |
| 238 | |
| 239 | Verify No Button Functionality |
| 240 | [Documentation] Verify the functionality of "No" button click. |
| 241 | [Arguments] ${xpath_no_button} |
| 242 | |
| 243 | # xpath_no_button Xpath of "No" button. |
| 244 | |
| 245 | Click No Button ${xpath_no_button} |
Anusha Dathatri | f93a5c4 | 2019-07-24 05:29:44 -0500 | [diff] [blame] | 246 | ${obmc_current_state}= Get Text ${xpath_power_indicator} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 247 | Should Contain ${obmc_current_state} ${obmc_running_state} |