Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 1 | *** Settings *** |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 2 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 3 | Documentation Test OpenBMC GUI "Server power operation" sub-menu of |
| 4 | ... "Server control". |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 5 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 6 | Resource ../../lib/resource.robot |
| 7 | |
Rahul Maheshwari | 9a4161c | 2019-11-03 09:04:08 -0600 | [diff] [blame] | 8 | Test Teardown Close Browser |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 9 | |
Anusha Dathatri | 883ff7c | 2019-10-01 01:56:30 -0500 | [diff] [blame] | 10 | |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 11 | *** Variables *** |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 12 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 13 | ${xpath_power_indicator_bar} //*[@id='power-indicator-bar'] |
| 14 | ${xpath_shutdown_button} //button[contains(text(), "Shut down")] |
| 15 | ${xpath_reboot_button} //button[contains(text(), "Reboot")] |
Rahul Maheshwari | d6b00e7 | 2019-11-12 01:12:57 -0600 | [diff] [blame] | 16 | ${xpath_power_on_button} //button[contains(text(), "Power on")] |
Anusha Dathatri | bb20cb0 | 2019-11-13 10:32:27 -0600 | [diff] [blame] | 17 | ${xpath_tpm_toggle_switch} //label[@for="toggle__switch-round"] |
| 18 | ${xpath_select_boot_override} //select[@id="boot-selected"] |
| 19 | ${xpath_select_one_time_boot} //label[@id="one-time-label"] |
Arpana Durgaprasad | f3c2d7f | 2019-02-20 02:28:45 -0600 | [diff] [blame] | 20 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 21 | *** Test Cases *** |
Arpana Durgaprasad | f3c2d7f | 2019-02-20 02:28:45 -0600 | [diff] [blame] | 22 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 23 | Verify System State At Power Off |
| 24 | [Documentation] Verify system state at power off. |
| 25 | [Tags] Verify_System_State_At_Power_Off |
Rahul Maheshwari | 9a4161c | 2019-11-03 09:04:08 -0600 | [diff] [blame] | 26 | [Setup] Setup For Test Execution ${OBMC_PowerOff_state} |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 27 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 28 | Element Should Contain ${xpath_power_indicator_bar} Off |
Arpana Durgaprasad | f3c2d7f | 2019-02-20 02:28:45 -0600 | [diff] [blame] | 29 | |
| 30 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 31 | Verify BMC IP In Server Power Operation Page |
| 32 | [Documentation] Verify BMC IP in server power operation page. |
| 33 | [Tags] Verify_BMC_IP_In_Server_Power_Operation_Page |
Rahul Maheshwari | 9a4161c | 2019-11-03 09:04:08 -0600 | [diff] [blame] | 34 | [Setup] Setup For Test Execution ${OBMC_PowerOff_state} |
Arpana Durgaprasad | 0f5aee7 | 2019-02-19 03:47:24 -0600 | [diff] [blame] | 35 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 36 | Element Should Contain ${xpath_power_indicator_bar} ${OPENBMC_HOST} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 37 | |
| 38 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 39 | Verify Shutdown Button At Power Off |
| 40 | [Documentation] Verify that shutdown button is not present at power Off. |
| 41 | [Tags] Verify_Shutdown_Button_At_Power_Off |
Rahul Maheshwari | 9a4161c | 2019-11-03 09:04:08 -0600 | [diff] [blame] | 42 | [Setup] Setup For Test Execution ${OBMC_PowerOff_state} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 43 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 44 | Element Should Not Be Visible ${xpath_shutdown_button} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 45 | |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 46 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 47 | Verify Reboot Button At Power Off |
| 48 | [Documentation] Verify that reboot button is not present at power Off. |
| 49 | [Tags] Verify_Reboot_Button_At_Power_Off |
Rahul Maheshwari | 9a4161c | 2019-11-03 09:04:08 -0600 | [diff] [blame] | 50 | [Setup] Setup For Test Execution ${OBMC_PowerOff_state} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 51 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 52 | Element Should Not Be Visible ${xpath_reboot_button} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 53 | |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 54 | |
Rahul Maheshwari | 9a4161c | 2019-11-03 09:04:08 -0600 | [diff] [blame] | 55 | Verify Power On Button At Power Off |
| 56 | [Documentation] Verify presence of "Power On" button at power off. |
| 57 | [Tags] Verify_Power_On_Button_At_Power_Off |
| 58 | [Setup] Setup For Test Execution ${OBMC_PowerOff_state} |
| 59 | |
| 60 | Element Should Be Visible ${xpath_power_on_button} |
| 61 | |
| 62 | |
| 63 | Verify System State At Power On |
| 64 | [Documentation] Verify system state at power on. |
| 65 | [Tags] Verify_System_State_At_Power_On |
| 66 | [Setup] Setup For Test Execution ${obmc_PowerRunning_state} |
| 67 | |
| 68 | Element Should Contain ${xpath_power_indicator_bar} Running |
| 69 | |
| 70 | |
| 71 | Verify Shutdown Button At Power On |
| 72 | [Documentation] Verify that shutdown button is present at power on. |
| 73 | [Tags] Verify_Shutdown_Button_At_Power_On |
| 74 | [Setup] Setup For Test Execution ${obmc_PowerRunning_state} |
| 75 | |
| 76 | Element Should Be Visible ${xpath_shutdown_button} |
| 77 | |
| 78 | |
| 79 | Verify Reboot Button At Power On |
| 80 | [Documentation] Verify that reboot button is present at power on. |
| 81 | [Tags] Verify_Reboot_Button_At_Power_On |
| 82 | [Setup] Setup For Test Execution ${obmc_PowerRunning_state} |
| 83 | |
| 84 | Element Should Be Visible ${xpath_reboot_button} |
| 85 | |
| 86 | |
Anusha Dathatri | bb20cb0 | 2019-11-13 10:32:27 -0600 | [diff] [blame] | 87 | Verify Existence Of All Sections In Host Os Boot Settings |
| 88 | [Documentation] Verify existence of all sections in host os boot settings. |
| 89 | [Tags] Verify_Existence_Of_All_Sections_In_Host_Os_Boot_Settings |
| 90 | [Setup] Run Keywords Launch Browser And Login OpenBMC GUI AND |
| 91 | ... Navigate To Server Power Operations |
| 92 | |
| 93 | Page Should Contain Boot setting override |
| 94 | Page Should Contain TPM required policy |
| 95 | |
| 96 | |
| 97 | Verify Existence Of All Buttons In Host Os Boot Settings |
| 98 | [Documentation] Verify existence of all buttons in host os boot settings. |
| 99 | [Tags] Verify_Existence_Of_All_Buttons_In_Host_Os_Boot_Settings |
| 100 | [Setup] Run Keywords Launch Browser And Login OpenBMC GUI AND |
| 101 | ... Navigate To Server Power Operations |
| 102 | |
| 103 | Page Should Contain Element ${xpath_tpm_toggle_switch} |
| 104 | Page Should Contain Element ${xpath_save_button} |
| 105 | Page Should Contain Element ${xpath_cancel_button} |
| 106 | |
| 107 | |
| 108 | Verify Existence Of All Input Boxes In Host Os Boot Settings |
| 109 | [Documentation] Verify existence of all input boxes in host os boot settings. |
| 110 | [Tags] Verify_Existence_Of_All_Input_Boxes_In_Host_Os_Boot_Settings |
| 111 | [Setup] Run Keywords Launch Browser And Login OpenBMC GUI AND |
| 112 | ... Navigate To Server Power Operations |
| 113 | |
| 114 | Page Should Contain Element ${xpath_select_boot_override} |
| 115 | Page Should Contain Element ${xpath_select_one_time_boot} |
| 116 | |
| 117 | |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 118 | *** Keywords *** |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 119 | |
Rahul Maheshwari | 9a4161c | 2019-11-03 09:04:08 -0600 | [diff] [blame] | 120 | Setup For Test Execution |
| 121 | [Documentation] Do setup tasks for test case. |
| 122 | [Arguments] ${obmc_required_state} |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 123 | |
Rahul Maheshwari | 9a4161c | 2019-11-03 09:04:08 -0600 | [diff] [blame] | 124 | # Description of argument(s): |
| 125 | # obmc_required_state The OpenBMC state which is required for the test. |
| 126 | |
| 127 | Test Setup Execution ${obmc_required_state} |
Anusha Dathatri | bb20cb0 | 2019-11-13 10:32:27 -0600 | [diff] [blame] | 128 | Navigate To Server Power Operations |
| 129 | |
| 130 | Navigate To Server Power Operations |
| 131 | [Documentation] Navigate to server power operations. |
| 132 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 133 | Wait Until Page Does Not Contain Element ${xpath_refresh_circle} |
| 134 | Click Element ${xpath_select_server_control} |
| 135 | Wait Until Page Does Not Contain Element ${xpath_refresh_circle} |
Anusha Dathatri | f93a5c4 | 2019-07-24 05:29:44 -0500 | [diff] [blame] | 136 | Click Element ${xpath_select_server_power_operations} |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 137 | Wait Until Page Contains Server power operations |