blob: dad03321546f914d642fa0b811138dbb2be49634 [file] [log] [blame]
Sathyajith M Sf52d6fc2018-01-24 10:11:18 -06001*** Settings ***
Sathyajith M Sf52d6fc2018-01-24 10:11:18 -06002
Rahul Maheshwari57a41552019-10-22 01:02:23 -05003Documentation Test OpenBMC GUI "Server power operation" sub-menu of
4... "Server control".
Sathyajith M Sf52d6fc2018-01-24 10:11:18 -06005
Rahul Maheshwari57a41552019-10-22 01:02:23 -05006Resource ../../lib/resource.robot
7
Rahul Maheshwari9a4161c2019-11-03 09:04:08 -06008Test Teardown Close Browser
Rahul Maheshwari57a41552019-10-22 01:02:23 -05009
Anusha Dathatri883ff7c2019-10-01 01:56:30 -050010
Sathyajith M Sf52d6fc2018-01-24 10:11:18 -060011*** Variables ***
Sathyajith M Sf52d6fc2018-01-24 10:11:18 -060012
Rahul Maheshwari57a41552019-10-22 01:02:23 -050013${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 Maheshwarid6b00e72019-11-12 01:12:57 -060016${xpath_power_on_button} //button[contains(text(), "Power on")]
Anusha Dathatribb20cb02019-11-13 10:32:27 -060017${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 Durgaprasadf3c2d7f2019-02-20 02:28:45 -060020
Rahul Maheshwari57a41552019-10-22 01:02:23 -050021*** Test Cases ***
Arpana Durgaprasadf3c2d7f2019-02-20 02:28:45 -060022
Rahul Maheshwari57a41552019-10-22 01:02:23 -050023Verify System State At Power Off
24 [Documentation] Verify system state at power off.
25 [Tags] Verify_System_State_At_Power_Off
Rahul Maheshwari9a4161c2019-11-03 09:04:08 -060026 [Setup] Setup For Test Execution ${OBMC_PowerOff_state}
Rahul Maheshwari57a41552019-10-22 01:02:23 -050027
Rahul Maheshwari57a41552019-10-22 01:02:23 -050028 Element Should Contain ${xpath_power_indicator_bar} Off
Arpana Durgaprasadf3c2d7f2019-02-20 02:28:45 -060029
30
Rahul Maheshwari57a41552019-10-22 01:02:23 -050031Verify 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 Maheshwari9a4161c2019-11-03 09:04:08 -060034 [Setup] Setup For Test Execution ${OBMC_PowerOff_state}
Arpana Durgaprasad0f5aee72019-02-19 03:47:24 -060035
Rahul Maheshwari57a41552019-10-22 01:02:23 -050036 Element Should Contain ${xpath_power_indicator_bar} ${OPENBMC_HOST}
Sathyajith M Sf52d6fc2018-01-24 10:11:18 -060037
38
Rahul Maheshwari57a41552019-10-22 01:02:23 -050039Verify 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 Maheshwari9a4161c2019-11-03 09:04:08 -060042 [Setup] Setup For Test Execution ${OBMC_PowerOff_state}
Sathyajith M Sf52d6fc2018-01-24 10:11:18 -060043
Rahul Maheshwari57a41552019-10-22 01:02:23 -050044 Element Should Not Be Visible ${xpath_shutdown_button}
Sathyajith M Sf52d6fc2018-01-24 10:11:18 -060045
Sathyajith M Sf52d6fc2018-01-24 10:11:18 -060046
Rahul Maheshwari57a41552019-10-22 01:02:23 -050047Verify 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 Maheshwari9a4161c2019-11-03 09:04:08 -060050 [Setup] Setup For Test Execution ${OBMC_PowerOff_state}
Sathyajith M Sf52d6fc2018-01-24 10:11:18 -060051
Rahul Maheshwari57a41552019-10-22 01:02:23 -050052 Element Should Not Be Visible ${xpath_reboot_button}
Sathyajith M Sf52d6fc2018-01-24 10:11:18 -060053
Sathyajith M Sf52d6fc2018-01-24 10:11:18 -060054
Rahul Maheshwari9a4161c2019-11-03 09:04:08 -060055Verify 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
63Verify 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
71Verify 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
79Verify 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 Dathatribb20cb02019-11-13 10:32:27 -060087Verify 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
97Verify 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
108Verify 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 Sf52d6fc2018-01-24 10:11:18 -0600118*** Keywords ***
Sathyajith M Sf52d6fc2018-01-24 10:11:18 -0600119
Rahul Maheshwari9a4161c2019-11-03 09:04:08 -0600120Setup For Test Execution
121 [Documentation] Do setup tasks for test case.
122 [Arguments] ${obmc_required_state}
Rahul Maheshwari57a41552019-10-22 01:02:23 -0500123
Rahul Maheshwari9a4161c2019-11-03 09:04:08 -0600124 # 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 Dathatribb20cb02019-11-13 10:32:27 -0600128 Navigate To Server Power Operations
129
130Navigate To Server Power Operations
131 [Documentation] Navigate to server power operations.
132
Rahul Maheshwari57a41552019-10-22 01:02:23 -0500133 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 Dathatrif93a5c42019-07-24 05:29:44 -0500136 Click Element ${xpath_select_server_power_operations}
Rahul Maheshwari57a41552019-10-22 01:02:23 -0500137 Wait Until Page Contains Server power operations