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