Rahul Maheshwari | 1e18bb6 | 2020-07-07 00:45:50 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Test OpenBMC GUI "Server power operations" sub-menu of "Server control". |
| 4 | |
| 5 | Resource ../../lib/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 | |
| 8 | Suite Setup Launch Browser And Login GUI |
| 9 | Suite Teardown Close Browser |
| 10 | Test Setup Test Setup Execution |
| 11 | |
| 12 | |
| 13 | *** Variables *** |
| 14 | |
Rahul Maheshwari | 317c710 | 2020-08-30 21:10:22 -0500 | [diff] [blame] | 15 | ${xpath_server_power_heading} //h1[text()="Server power operations"] |
manashsarma | 6164975 | 2020-08-19 07:01:19 -0500 | [diff] [blame] | 16 | ${xpath_enable_onetime_boot_checkbox} //*[contains(@class,'custom-checkbox')] |
| 17 | ${xpath_boot_option_select} //*[@id='boot-option'] |
manashsarma | 66f9a62 | 2020-08-23 06:39:53 -0500 | [diff] [blame] | 18 | ${xpath_shutdown_button} //*[@data-test-id='serverPowerOperations-button-shutDown'] |
| 19 | ${xpath_reboot_button} //*[@data-test-id='serverPowerOperations-button-reboot'] |
| 20 | ${xpath_poweron_button} //*[@data-test-id='serverPowerOperations-button-powerOn'] |
| 21 | ${xpath_tpm_policy_button} //input[@id='tpm-required-policy'] |
| 22 | ${xpath_save_button} //button[contains(text(),'Save')] |
manashsarma | 73d24f1 | 2020-08-25 07:42:53 -0500 | [diff] [blame] | 23 | ${xpath_shutdown_orderly_radio} //*[@data-test-id='serverPowerOperations-radio-shutdownOrderly'] |
| 24 | ${xpath_shutdown_immediate_radio} //*[@data-test-id='serverPowerOperations-radio-shutdownImmediate'] |
| 25 | ${xpath_confirm_button} //button[contains(text(),'Confirm')] |
| 26 | ${xpath_current_power_state} //*[contains(@class,'row mb-4')] |
Rahul Maheshwari | 317c710 | 2020-08-30 21:10:22 -0500 | [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 |
| 40 | |
| 41 | Redfish Power On stack_mode=skip |
| 42 | Click Element At Coordinates ${xpath_shutdown_immediate_radio} 0 0 |
| 43 | Click Element ${xpath_shutdown_button} |
| 44 | Wait Until Page Contains Element ${xpath_confirm_button} timeout=10 |
| 45 | Click Element ${xpath_confirm_button} |
| 46 | Wait Until Keyword Succeeds 3 min 0 sec Element Should Contain ${xpath_current_power_state} Off |
| 47 | |
| 48 | |
| 49 | Verify Orderly Shutdown |
| 50 | [Documentation] Verify shutdown after clicking orderly shutdown button. |
| 51 | [Tags] Verify_Orderly_Shutdown |
| 52 | |
| 53 | Redfish Power On stack_mode=skip |
| 54 | Click Element At Coordinates ${xpath_shutdown_orderly_radio} 0 0 |
| 55 | Click Element ${xpath_shutdown_button} |
| 56 | Wait Until Page Contains Element ${xpath_confirm_button} timeout=10 |
| 57 | Click Element ${xpath_confirm_button} |
| 58 | Wait Until Keyword Succeeds 10 min 0 sec Element Should Contain ${xpath_current_power_state} Off |
| 59 | |
| 60 | |
manashsarma | 66f9a62 | 2020-08-23 06:39:53 -0500 | [diff] [blame] | 61 | Verify Existence Of All Sections In Server Power Operations Page |
| 62 | [Documentation] Verify existence of all sections in Server Power Operations page. |
| 63 | [Tags] Verify_Existence_Of_All_Sections_In_Server_Power_Operations_Page |
| 64 | |
| 65 | Page Should Contain Current status |
| 66 | Page Should Contain Host OS boot settings |
| 67 | Page Should Contain Operations |
| 68 | |
| 69 | |
manashsarma | 6164975 | 2020-08-19 07:01:19 -0500 | [diff] [blame] | 70 | Verify Existence Of All Input Boxes In Host Os Boot Settings |
| 71 | [Documentation] Verify existence of all input boxes in host os boot settings. |
| 72 | [Tags] Verify_Existence_Of_Input_Boxes_In_Host_Os_Boot_Settings |
| 73 | |
| 74 | Page Should Contain Element ${xpath_enable_onetime_boot_checkbox} |
| 75 | Page Should Contain Element ${xpath_boot_option_select} |
| 76 | |
| 77 | |
| 78 | Verify Existence Of All Sections In Host Os Boot Settings |
| 79 | [Documentation] Verify existence of all sections in host os boot settings. |
| 80 | [Tags] Verify_Existence_Of_All_Sections_In_Host_Os_Boot_Settings |
| 81 | |
| 82 | Page Should Contain Boot settings override |
| 83 | Page Should Contain TPM required policy |
| 84 | |
| 85 | |
Rahul Maheshwari | 317c710 | 2020-08-30 21:10:22 -0500 | [diff] [blame] | 86 | Verify System State At Power Off |
| 87 | [Documentation] Verify state of the system in power off state. |
| 88 | [Tags] Verify_System_State_At_Power_Off |
| 89 | |
| 90 | Redfish Power Off stack_mode=skip |
manashsarma | 73d24f1 | 2020-08-25 07:42:53 -0500 | [diff] [blame] | 91 | Page Should Contain Element ${xpath_current_power_state} |
| 92 | Element Should Contain ${xpath_current_power_state} Off |
Rahul Maheshwari | 317c710 | 2020-08-30 21:10:22 -0500 | [diff] [blame] | 93 | |
| 94 | |
| 95 | Verify System State At Power On |
| 96 | [Documentation] Verify state of the system in power on state. |
| 97 | [Tags] Verify_System_State_At_Power_On |
| 98 | |
| 99 | Redfish Power On stack_mode=skip |
manashsarma | 73d24f1 | 2020-08-25 07:42:53 -0500 | [diff] [blame] | 100 | Page Should Contain Element ${xpath_current_power_state} |
| 101 | Element Should Contain ${xpath_current_power_state} On |
Rahul Maheshwari | 317c710 | 2020-08-30 21:10:22 -0500 | [diff] [blame] | 102 | |
| 103 | |
manashsarma | 7cbe1c0 | 2020-08-20 05:36:30 -0500 | [diff] [blame] | 104 | Verify PowerOn Button Should Present At Power Off |
| 105 | [Documentation] Verify existence of poweron button at power off. |
| 106 | [Tags] Verify_PowerOn_Button_Should_Present_At_Power_Off |
| 107 | |
| 108 | Redfish Power Off stack_mode=skip |
| 109 | # TODO: Implement power off using GUI later. |
| 110 | Page Should Contain Element ${xpath_poweron_button} |
| 111 | |
| 112 | |
| 113 | Verify Shutdown And Reboot Buttons Presence At Power On |
| 114 | [Documentation] Verify existence of shutdown and reboot buttons at power on. |
| 115 | [Tags] Verify_Shutdown_And_Reboot_Buttons_Presence_At_Power_On |
| 116 | |
| 117 | Redfish Power On stack_mode=skip |
| 118 | # TODO: Implement power on using GUI later. |
| 119 | Page Should Contain Element ${xpath_shutdown_button} |
| 120 | Page Should Contain Element ${xpath_reboot_button} |
| 121 | |
| 122 | |
manashsarma | 66f9a62 | 2020-08-23 06:39:53 -0500 | [diff] [blame] | 123 | Verify Existence Of Buttons In Host Os Boot Settings |
| 124 | [Documentation] Verify existence of buttons in Host OS boot settings. |
| 125 | [Tags] Verify_Existence_Of_Buttons_In_Host_Os_Boot_Settings |
| 126 | |
| 127 | Page Should Contain Element ${xpath_tpm_policy_button} |
| 128 | Page Should Contain Element ${xpath_save_button} |
| 129 | |
| 130 | |
Rahul Maheshwari | 1e18bb6 | 2020-07-07 00:45:50 -0500 | [diff] [blame] | 131 | *** Keywords *** |
| 132 | |
| 133 | Test Setup Execution |
| 134 | [Documentation] Do test case setup tasks. |
| 135 | |
| 136 | Click Element ${xpath_control_menu} |
| 137 | Click Element ${xpath_server_power_operations_sub_menu} |
| 138 | Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain server-power-operations |