Rahul Maheshwari | 1e18bb6 | 2020-07-07 00:45:50 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 3 | Documentation Test OpenBMC GUI "Server power operations" sub-menu of "Operations". |
Rahul Maheshwari | 1e18bb6 | 2020-07-07 00:45:50 -0500 | [diff] [blame] | 4 | |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 5 | Resource ../../lib/gui_resource.robot |
manashsarma | 73d24f1 | 2020-08-25 07:42:53 -0500 | [diff] [blame] | 6 | Resource ../../../lib/state_manager.robot |
Rahul Maheshwari | 1e18bb6 | 2020-07-07 00:45:50 -0500 | [diff] [blame] | 7 | |
Rahul Maheshwari | 0f75f1f | 2021-02-04 02:21:39 -0600 | [diff] [blame] | 8 | Test Setup Run Keywords Launch Browser And Login GUI AND Navigate to Server Power Operation Page |
| 9 | Test Teardown Close Browser |
Rahul Maheshwari | 1e18bb6 | 2020-07-07 00:45:50 -0500 | [diff] [blame] | 10 | |
| 11 | |
| 12 | *** Variables *** |
| 13 | |
Rahul Maheshwari | 317c710 | 2020-08-30 21:10:22 -0500 | [diff] [blame] | 14 | ${xpath_server_power_heading} //h1[text()="Server power operations"] |
manashsarma | 6164975 | 2020-08-19 07:01:19 -0500 | [diff] [blame] | 15 | ${xpath_enable_onetime_boot_checkbox} //*[contains(@class,'custom-checkbox')] |
| 16 | ${xpath_boot_option_select} //*[@id='boot-option'] |
manashsarma | 66f9a62 | 2020-08-23 06:39:53 -0500 | [diff] [blame] | 17 | ${xpath_shutdown_button} //*[@data-test-id='serverPowerOperations-button-shutDown'] |
| 18 | ${xpath_reboot_button} //*[@data-test-id='serverPowerOperations-button-reboot'] |
| 19 | ${xpath_poweron_button} //*[@data-test-id='serverPowerOperations-button-powerOn'] |
manashsarma | 66f9a62 | 2020-08-23 06:39:53 -0500 | [diff] [blame] | 20 | ${xpath_save_button} //button[contains(text(),'Save')] |
manashsarma | 73d24f1 | 2020-08-25 07:42:53 -0500 | [diff] [blame] | 21 | ${xpath_shutdown_orderly_radio} //*[@data-test-id='serverPowerOperations-radio-shutdownOrderly'] |
| 22 | ${xpath_shutdown_immediate_radio} //*[@data-test-id='serverPowerOperations-radio-shutdownImmediate'] |
| 23 | ${xpath_confirm_button} //button[contains(text(),'Confirm')] |
Rahul Maheshwari | 0f75f1f | 2021-02-04 02:21:39 -0600 | [diff] [blame] | 24 | ${xpath_current_power_state} //*[@data-test-id='powerServerOps-text-hostStatus'] |
manashsarma | 348585c | 2020-08-27 06:52:39 -0500 | [diff] [blame] | 25 | ${xpath_reboot_immediate_radio} //*[@data-test-id='serverPowerOperations-radio-rebootImmediate'] |
Rahul Maheshwari | 317c710 | 2020-08-30 21:10:22 -0500 | [diff] [blame] | 26 | |
Rahul Maheshwari | 0f75f1f | 2021-02-04 02:21:39 -0600 | [diff] [blame] | 27 | |
Rahul Maheshwari | 1e18bb6 | 2020-07-07 00:45:50 -0500 | [diff] [blame] | 28 | *** Test Cases *** |
| 29 | |
Rahul Maheshwari | 317c710 | 2020-08-30 21:10:22 -0500 | [diff] [blame] | 30 | Verify Navigation To Server Power Operations Page |
| 31 | [Documentation] Verify navigation to server power operations page. |
| 32 | [Tags] Verify_Navigation_To_Server_Power_Operations_Page |
manashsarma | 484fefc | 2020-08-23 12:38:49 -0500 | [diff] [blame] | 33 | |
Rahul Maheshwari | 317c710 | 2020-08-30 21:10:22 -0500 | [diff] [blame] | 34 | Page Should Contain Element ${xpath_server_power_heading} |
manashsarma | 484fefc | 2020-08-23 12:38:49 -0500 | [diff] [blame] | 35 | |
| 36 | |
manashsarma | 73d24f1 | 2020-08-25 07:42:53 -0500 | [diff] [blame] | 37 | Verify Immediate Shutdown |
| 38 | [Documentation] Verify shutdown after clicking immediate shutdown button. |
| 39 | [Tags] Verify_Immediate_Shutdown |
Rahul Maheshwari | 0f75f1f | 2021-02-04 02:21:39 -0600 | [diff] [blame] | 40 | [Setup] Run Keywords Redfish Power On stack_mode=skip AND Launch Browser And Login GUI |
| 41 | ... AND Navigate to Server Power Operation Page |
manashsarma | 73d24f1 | 2020-08-25 07:42:53 -0500 | [diff] [blame] | 42 | |
manashsarma | 73d24f1 | 2020-08-25 07:42:53 -0500 | [diff] [blame] | 43 | Click Element At Coordinates ${xpath_shutdown_immediate_radio} 0 0 |
| 44 | Click Element ${xpath_shutdown_button} |
| 45 | Wait Until Page Contains Element ${xpath_confirm_button} timeout=10 |
| 46 | Click Element ${xpath_confirm_button} |
Rahul Maheshwari | 0f75f1f | 2021-02-04 02:21:39 -0600 | [diff] [blame] | 47 | Wait Until Keyword Succeeds 3 min 15 sec Element Should Contain ${xpath_current_power_state} Off |
manashsarma | 73d24f1 | 2020-08-25 07:42:53 -0500 | [diff] [blame] | 48 | |
| 49 | |
| 50 | Verify Orderly Shutdown |
| 51 | [Documentation] Verify shutdown after clicking orderly shutdown button. |
| 52 | [Tags] Verify_Orderly_Shutdown |
Rahul Maheshwari | 0f75f1f | 2021-02-04 02:21:39 -0600 | [diff] [blame] | 53 | [Setup] Run Keywords Redfish Power On stack_mode=skip AND Launch Browser And Login GUI |
| 54 | ... AND Navigate to Server Power Operation Page |
manashsarma | 73d24f1 | 2020-08-25 07:42:53 -0500 | [diff] [blame] | 55 | |
manashsarma | 73d24f1 | 2020-08-25 07:42:53 -0500 | [diff] [blame] | 56 | Click Element At Coordinates ${xpath_shutdown_orderly_radio} 0 0 |
| 57 | Click Element ${xpath_shutdown_button} |
| 58 | Wait Until Page Contains Element ${xpath_confirm_button} timeout=10 |
| 59 | Click Element ${xpath_confirm_button} |
Rahul Maheshwari | 0f75f1f | 2021-02-04 02:21:39 -0600 | [diff] [blame] | 60 | Wait Until Keyword Succeeds 10 min 15 sec Element Should Contain ${xpath_current_power_state} Off |
manashsarma | 73d24f1 | 2020-08-25 07:42:53 -0500 | [diff] [blame] | 61 | |
| 62 | |
manashsarma | 66f9a62 | 2020-08-23 06:39:53 -0500 | [diff] [blame] | 63 | Verify Existence Of All Sections In Server Power Operations Page |
| 64 | [Documentation] Verify existence of all sections in Server Power Operations page. |
| 65 | [Tags] Verify_Existence_Of_All_Sections_In_Server_Power_Operations_Page |
| 66 | |
Ashwini Chandrappa | ad2443d | 2021-07-07 08:20:54 -0500 | [diff] [blame] | 67 | # Added a delay for the page to load boot settings section. |
rramyasr-in | 84c1ad7 | 2022-06-29 09:55:34 -0500 | [diff] [blame] | 68 | Wait Until Page Contains Server power operations timeout=5 |
manashsarma | 66f9a62 | 2020-08-23 06:39:53 -0500 | [diff] [blame] | 69 | Page Should Contain Current status |
manashsarma | 66f9a62 | 2020-08-23 06:39:53 -0500 | [diff] [blame] | 70 | Page Should Contain Operations |
rramyasr-in | 84c1ad7 | 2022-06-29 09:55:34 -0500 | [diff] [blame] | 71 | Page Should Contain Settings |
manashsarma | 66f9a62 | 2020-08-23 06:39:53 -0500 | [diff] [blame] | 72 | |
| 73 | |
manashsarma | 6164975 | 2020-08-19 07:01:19 -0500 | [diff] [blame] | 74 | Verify Existence Of All Input Boxes In Host Os Boot Settings |
| 75 | [Documentation] Verify existence of all input boxes in host os boot settings. |
George Keishing | d6a7797 | 2022-01-31 12:50:29 -0600 | [diff] [blame] | 76 | [Tags] Verify_Existence_Of_All_Input_Boxes_In_Host_Os_Boot_Settings |
manashsarma | 6164975 | 2020-08-19 07:01:19 -0500 | [diff] [blame] | 77 | |
Ashwini Chandrappa | ad2443d | 2021-07-07 08:20:54 -0500 | [diff] [blame] | 78 | # Added a delay for the page to load boot settings section. |
| 79 | Wait Until Page Contains Boot settings timeout=5 |
manashsarma | 6164975 | 2020-08-19 07:01:19 -0500 | [diff] [blame] | 80 | Page Should Contain Element ${xpath_enable_onetime_boot_checkbox} |
| 81 | Page Should Contain Element ${xpath_boot_option_select} |
| 82 | |
| 83 | |
Rahul Maheshwari | 317c710 | 2020-08-30 21:10:22 -0500 | [diff] [blame] | 84 | Verify System State At Power Off |
| 85 | [Documentation] Verify state of the system in power off state. |
| 86 | [Tags] Verify_System_State_At_Power_Off |
| 87 | |
| 88 | Redfish Power Off stack_mode=skip |
manashsarma | 73d24f1 | 2020-08-25 07:42:53 -0500 | [diff] [blame] | 89 | Page Should Contain Element ${xpath_current_power_state} |
| 90 | Element Should Contain ${xpath_current_power_state} Off |
Rahul Maheshwari | 317c710 | 2020-08-30 21:10:22 -0500 | [diff] [blame] | 91 | |
| 92 | |
| 93 | Verify System State At Power On |
| 94 | [Documentation] Verify state of the system in power on state. |
| 95 | [Tags] Verify_System_State_At_Power_On |
Rahul Maheshwari | 0f75f1f | 2021-02-04 02:21:39 -0600 | [diff] [blame] | 96 | [Setup] Run Keywords Redfish Power On stack_mode=skip AND Launch Browser And Login GUI |
| 97 | ... AND Navigate to Server Power Operation Page |
Rahul Maheshwari | 317c710 | 2020-08-30 21:10:22 -0500 | [diff] [blame] | 98 | |
rramyasr-in | 96ba220 | 2022-01-13 06:29:40 -0600 | [diff] [blame] | 99 | Wait Until Keyword Succeeds 15 sec 5 sec Element Should Contain ${xpath_current_power_state} On |
George Keishing | d6a7797 | 2022-01-31 12:50:29 -0600 | [diff] [blame] | 100 | |
rramyasr-in | 1ae2a89 | 2023-01-06 03:59:47 -0600 | [diff] [blame] | 101 | |
manashsarma | 7cbe1c0 | 2020-08-20 05:36:30 -0500 | [diff] [blame] | 102 | Verify PowerOn Button Should Present At Power Off |
| 103 | [Documentation] Verify existence of poweron button at power off. |
| 104 | [Tags] Verify_PowerOn_Button_Should_Present_At_Power_Off |
| 105 | |
| 106 | Redfish Power Off stack_mode=skip |
| 107 | # TODO: Implement power off using GUI later. |
| 108 | Page Should Contain Element ${xpath_poweron_button} |
| 109 | |
| 110 | |
| 111 | Verify Shutdown And Reboot Buttons Presence At Power On |
| 112 | [Documentation] Verify existence of shutdown and reboot buttons at power on. |
| 113 | [Tags] Verify_Shutdown_And_Reboot_Buttons_Presence_At_Power_On |
Rahul Maheshwari | 0f75f1f | 2021-02-04 02:21:39 -0600 | [diff] [blame] | 114 | [Setup] Run Keywords Redfish Power On stack_mode=skip AND Launch Browser And Login GUI |
| 115 | ... AND Navigate to Server Power Operation Page |
manashsarma | 7cbe1c0 | 2020-08-20 05:36:30 -0500 | [diff] [blame] | 116 | |
manashsarma | 7cbe1c0 | 2020-08-20 05:36:30 -0500 | [diff] [blame] | 117 | # TODO: Implement power on using GUI later. |
| 118 | Page Should Contain Element ${xpath_shutdown_button} |
| 119 | Page Should Contain Element ${xpath_reboot_button} |
| 120 | |
| 121 | |
manashsarma | 348585c | 2020-08-27 06:52:39 -0500 | [diff] [blame] | 122 | Verify Host Immediate Reboot |
| 123 | [Documentation] Verify host reboot after triggering immediate reboot. |
| 124 | [Tags] Verify_Host_Immediate_Reboot |
Rahul Maheshwari | 0f75f1f | 2021-02-04 02:21:39 -0600 | [diff] [blame] | 125 | [Setup] Run Keywords Redfish Power On stack_mode=skip AND Launch Browser And Login GUI |
| 126 | ... AND Navigate to Server Power Operation Page |
manashsarma | 348585c | 2020-08-27 06:52:39 -0500 | [diff] [blame] | 127 | |
manashsarma | 348585c | 2020-08-27 06:52:39 -0500 | [diff] [blame] | 128 | Click Element At Coordinates ${xpath_reboot_immediate_radio} 0 0 |
| 129 | Click Element ${xpath_reboot_button} |
| 130 | Wait Until Page Contains Element ${xpath_confirm_button} timeout=10 |
| 131 | Click Element ${xpath_confirm_button} |
Rahul Maheshwari | 0f75f1f | 2021-02-04 02:21:39 -0600 | [diff] [blame] | 132 | Wait Until Keyword Succeeds 3 min 2 sec Element Should Contain ${xpath_current_power_state} Off |
manashsarma | 348585c | 2020-08-27 06:52:39 -0500 | [diff] [blame] | 133 | Click Element ${xpath_refresh_button} |
Rahul Maheshwari | 0f75f1f | 2021-02-04 02:21:39 -0600 | [diff] [blame] | 134 | Wait Until Keyword Succeeds 10 min 15 sec Element Should Contain ${xpath_current_power_state} On |
manashsarma | 348585c | 2020-08-27 06:52:39 -0500 | [diff] [blame] | 135 | |
| 136 | |
| 137 | Verify Host Orderly Reboot |
| 138 | [Documentation] Verify host reboot after triggering orderly reboot. |
| 139 | [Tags] Verify_Host_Orderly_Reboot |
Rahul Maheshwari | 0f75f1f | 2021-02-04 02:21:39 -0600 | [diff] [blame] | 140 | [Setup] Run Keywords Redfish Power On stack_mode=skip AND Launch Browser And Login GUI |
| 141 | ... AND Navigate to Server Power Operation Page |
manashsarma | 348585c | 2020-08-27 06:52:39 -0500 | [diff] [blame] | 142 | |
manashsarma | 348585c | 2020-08-27 06:52:39 -0500 | [diff] [blame] | 143 | Click Element ${xpath_reboot_button} |
Nandish-Matti | 759ea67 | 2023-04-13 07:33:01 -0500 | [diff] [blame] | 144 | # Delay for confirm button to appear. |
| 145 | Sleep 5s |
Nandish-Matti | 8565cff | 2023-03-16 00:51:28 -0500 | [diff] [blame] | 146 | Wait Until Element Is Visible ${xpath_confirm_button} timeout=10 |
manashsarma | 348585c | 2020-08-27 06:52:39 -0500 | [diff] [blame] | 147 | Click Element ${xpath_confirm_button} |
Nandish-Matti | 4e21f37 | 2023-03-08 07:02:22 -0600 | [diff] [blame] | 148 | Wait Until Keyword Succeeds 2 min 1 sec Is Server Status Off |
manashsarma | 348585c | 2020-08-27 06:52:39 -0500 | [diff] [blame] | 149 | Click Element ${xpath_refresh_button} |
Rahul Maheshwari | 0f75f1f | 2021-02-04 02:21:39 -0600 | [diff] [blame] | 150 | Wait Until Keyword Succeeds 10 min 15 sec Element Should Contain ${xpath_current_power_state} On |
manashsarma | 348585c | 2020-08-27 06:52:39 -0500 | [diff] [blame] | 151 | |
| 152 | |
Rahul Maheshwari | 1e18bb6 | 2020-07-07 00:45:50 -0500 | [diff] [blame] | 153 | *** Keywords *** |
| 154 | |
Rahul Maheshwari | 0f75f1f | 2021-02-04 02:21:39 -0600 | [diff] [blame] | 155 | Navigate to Server Power Operation Page |
| 156 | [Documentation] Go to server power operation page. |
Rahul Maheshwari | 1e18bb6 | 2020-07-07 00:45:50 -0500 | [diff] [blame] | 157 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 158 | Click Element ${xpath_operations_menu} |
Rahul Maheshwari | 1e18bb6 | 2020-07-07 00:45:50 -0500 | [diff] [blame] | 159 | Click Element ${xpath_server_power_operations_sub_menu} |
| 160 | Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain server-power-operations |
rramyasr-in | 9e2c96f | 2023-01-24 07:59:34 -0600 | [diff] [blame] | 161 | Wait Until Element Is Not Visible ${xpath_page_loading_progress_bar} timeout=30 |
Nandish-Matti | 4e21f37 | 2023-03-08 07:02:22 -0600 | [diff] [blame] | 162 | |
| 163 | Is Server Status Off |
| 164 | [Documentation] Perform GUI refresh and verify server status to Off. |
| 165 | |
| 166 | Refresh GUI |
| 167 | Element Should Contain ${xpath_current_power_state} Off |