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")] |
Arpana Durgaprasad | f3c2d7f | 2019-02-20 02:28:45 -0600 | [diff] [blame] | 17 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 18 | *** Test Cases *** |
Arpana Durgaprasad | f3c2d7f | 2019-02-20 02:28:45 -0600 | [diff] [blame] | 19 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 20 | Verify System State At Power Off |
| 21 | [Documentation] Verify system state at power off. |
| 22 | [Tags] Verify_System_State_At_Power_Off |
Rahul Maheshwari | 9a4161c | 2019-11-03 09:04:08 -0600 | [diff] [blame] | 23 | [Setup] Setup For Test Execution ${OBMC_PowerOff_state} |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 24 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 25 | Element Should Contain ${xpath_power_indicator_bar} Off |
Arpana Durgaprasad | f3c2d7f | 2019-02-20 02:28:45 -0600 | [diff] [blame] | 26 | |
| 27 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 28 | Verify BMC IP In Server Power Operation Page |
| 29 | [Documentation] Verify BMC IP in server power operation page. |
| 30 | [Tags] Verify_BMC_IP_In_Server_Power_Operation_Page |
Rahul Maheshwari | 9a4161c | 2019-11-03 09:04:08 -0600 | [diff] [blame] | 31 | [Setup] Setup For Test Execution ${OBMC_PowerOff_state} |
Arpana Durgaprasad | 0f5aee7 | 2019-02-19 03:47:24 -0600 | [diff] [blame] | 32 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 33 | Element Should Contain ${xpath_power_indicator_bar} ${OPENBMC_HOST} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 34 | |
| 35 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 36 | Verify Shutdown Button At Power Off |
| 37 | [Documentation] Verify that shutdown button is not present at power Off. |
| 38 | [Tags] Verify_Shutdown_Button_At_Power_Off |
Rahul Maheshwari | 9a4161c | 2019-11-03 09:04:08 -0600 | [diff] [blame] | 39 | [Setup] Setup For Test Execution ${OBMC_PowerOff_state} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 40 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 41 | Element Should Not Be Visible ${xpath_shutdown_button} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 42 | |
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 | Verify Reboot Button At Power Off |
| 45 | [Documentation] Verify that reboot button is not present at power Off. |
| 46 | [Tags] Verify_Reboot_Button_At_Power_Off |
Rahul Maheshwari | 9a4161c | 2019-11-03 09:04:08 -0600 | [diff] [blame] | 47 | [Setup] Setup For Test Execution ${OBMC_PowerOff_state} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 48 | |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 49 | Element Should Not Be Visible ${xpath_reboot_button} |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 50 | |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 51 | |
Rahul Maheshwari | 9a4161c | 2019-11-03 09:04:08 -0600 | [diff] [blame] | 52 | Verify Power On Button At Power Off |
| 53 | [Documentation] Verify presence of "Power On" button at power off. |
| 54 | [Tags] Verify_Power_On_Button_At_Power_Off |
| 55 | [Setup] Setup For Test Execution ${OBMC_PowerOff_state} |
| 56 | |
| 57 | Element Should Be Visible ${xpath_power_on_button} |
| 58 | |
| 59 | |
| 60 | Verify System State At Power On |
| 61 | [Documentation] Verify system state at power on. |
| 62 | [Tags] Verify_System_State_At_Power_On |
| 63 | [Setup] Setup For Test Execution ${obmc_PowerRunning_state} |
| 64 | |
| 65 | Element Should Contain ${xpath_power_indicator_bar} Running |
| 66 | |
| 67 | |
| 68 | Verify Shutdown Button At Power On |
| 69 | [Documentation] Verify that shutdown button is present at power on. |
| 70 | [Tags] Verify_Shutdown_Button_At_Power_On |
| 71 | [Setup] Setup For Test Execution ${obmc_PowerRunning_state} |
| 72 | |
| 73 | Element Should Be Visible ${xpath_shutdown_button} |
| 74 | |
| 75 | |
| 76 | Verify Reboot Button At Power On |
| 77 | [Documentation] Verify that reboot button is present at power on. |
| 78 | [Tags] Verify_Reboot_Button_At_Power_On |
| 79 | [Setup] Setup For Test Execution ${obmc_PowerRunning_state} |
| 80 | |
| 81 | Element Should Be Visible ${xpath_reboot_button} |
| 82 | |
| 83 | |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 84 | *** Keywords *** |
Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 85 | |
Rahul Maheshwari | 9a4161c | 2019-11-03 09:04:08 -0600 | [diff] [blame] | 86 | Setup For Test Execution |
| 87 | [Documentation] Do setup tasks for test case. |
| 88 | [Arguments] ${obmc_required_state} |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 89 | |
Rahul Maheshwari | 9a4161c | 2019-11-03 09:04:08 -0600 | [diff] [blame] | 90 | # Description of argument(s): |
| 91 | # obmc_required_state The OpenBMC state which is required for the test. |
| 92 | |
| 93 | Test Setup Execution ${obmc_required_state} |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 94 | Wait Until Page Does Not Contain Element ${xpath_refresh_circle} |
| 95 | Click Element ${xpath_select_server_control} |
| 96 | Wait Until Page Does Not Contain Element ${xpath_refresh_circle} |
Anusha Dathatri | f93a5c4 | 2019-07-24 05:29:44 -0500 | [diff] [blame] | 97 | Click Element ${xpath_select_server_power_operations} |
Rahul Maheshwari | 57a4155 | 2019-10-22 01:02:23 -0500 | [diff] [blame] | 98 | Wait Until Page Contains Server power operations |