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 |
| 6 | |
| 7 | Suite Setup Launch Browser And Login GUI |
| 8 | Suite Teardown Close Browser |
| 9 | Test Setup Test Setup Execution |
| 10 | |
| 11 | |
| 12 | *** Variables *** |
| 13 | |
manashsarma | 6164975 | 2020-08-19 07:01:19 -0500 | [diff] [blame] | 14 | ${xpath_enable_onetime_boot_checkbox} //*[contains(@class,'custom-checkbox')] |
| 15 | ${xpath_boot_option_select} //*[@id='boot-option'] |
manashsarma | 66f9a62 | 2020-08-23 06:39:53 -0500 | [diff] [blame] | 16 | ${xpath_shutdown_button} //*[@data-test-id='serverPowerOperations-button-shutDown'] |
| 17 | ${xpath_reboot_button} //*[@data-test-id='serverPowerOperations-button-reboot'] |
| 18 | ${xpath_poweron_button} //*[@data-test-id='serverPowerOperations-button-powerOn'] |
| 19 | ${xpath_tpm_policy_button} //input[@id='tpm-required-policy'] |
| 20 | ${xpath_save_button} //button[contains(text(),'Save')] |
manashsarma | 7cbe1c0 | 2020-08-20 05:36:30 -0500 | [diff] [blame] | 21 | |
Rahul Maheshwari | 1e18bb6 | 2020-07-07 00:45:50 -0500 | [diff] [blame] | 22 | *** Test Cases *** |
| 23 | |
manashsarma | 66f9a62 | 2020-08-23 06:39:53 -0500 | [diff] [blame] | 24 | Verify Existence Of All Sections In Server Power Operations Page |
| 25 | [Documentation] Verify existence of all sections in Server Power Operations page. |
| 26 | [Tags] Verify_Existence_Of_All_Sections_In_Server_Power_Operations_Page |
| 27 | |
| 28 | Page Should Contain Current status |
| 29 | Page Should Contain Host OS boot settings |
| 30 | Page Should Contain Operations |
| 31 | |
| 32 | |
manashsarma | 6164975 | 2020-08-19 07:01:19 -0500 | [diff] [blame] | 33 | Verify Existence Of All Input Boxes In Host Os Boot Settings |
| 34 | [Documentation] Verify existence of all input boxes in host os boot settings. |
| 35 | [Tags] Verify_Existence_Of_Input_Boxes_In_Host_Os_Boot_Settings |
| 36 | |
| 37 | Page Should Contain Element ${xpath_enable_onetime_boot_checkbox} |
| 38 | Page Should Contain Element ${xpath_boot_option_select} |
| 39 | |
| 40 | |
| 41 | Verify Existence Of All Sections In Host Os Boot Settings |
| 42 | [Documentation] Verify existence of all sections in host os boot settings. |
| 43 | [Tags] Verify_Existence_Of_All_Sections_In_Host_Os_Boot_Settings |
| 44 | |
| 45 | Page Should Contain Boot settings override |
| 46 | Page Should Contain TPM required policy |
| 47 | |
| 48 | |
manashsarma | 7cbe1c0 | 2020-08-20 05:36:30 -0500 | [diff] [blame] | 49 | Verify PowerOn Button Should Present At Power Off |
| 50 | [Documentation] Verify existence of poweron button at power off. |
| 51 | [Tags] Verify_PowerOn_Button_Should_Present_At_Power_Off |
| 52 | |
| 53 | Redfish Power Off stack_mode=skip |
| 54 | # TODO: Implement power off using GUI later. |
| 55 | Page Should Contain Element ${xpath_poweron_button} |
| 56 | |
| 57 | |
| 58 | Verify Shutdown And Reboot Buttons Presence At Power On |
| 59 | [Documentation] Verify existence of shutdown and reboot buttons at power on. |
| 60 | [Tags] Verify_Shutdown_And_Reboot_Buttons_Presence_At_Power_On |
| 61 | |
| 62 | Redfish Power On stack_mode=skip |
| 63 | # TODO: Implement power on using GUI later. |
| 64 | Page Should Contain Element ${xpath_shutdown_button} |
| 65 | Page Should Contain Element ${xpath_reboot_button} |
| 66 | |
| 67 | |
manashsarma | 66f9a62 | 2020-08-23 06:39:53 -0500 | [diff] [blame] | 68 | Verify Existence Of Buttons In Host Os Boot Settings |
| 69 | [Documentation] Verify existence of buttons in Host OS boot settings. |
| 70 | [Tags] Verify_Existence_Of_Buttons_In_Host_Os_Boot_Settings |
| 71 | |
| 72 | Page Should Contain Element ${xpath_tpm_policy_button} |
| 73 | Page Should Contain Element ${xpath_save_button} |
| 74 | |
| 75 | |
Rahul Maheshwari | 1e18bb6 | 2020-07-07 00:45:50 -0500 | [diff] [blame] | 76 | *** Keywords *** |
| 77 | |
| 78 | Test Setup Execution |
| 79 | [Documentation] Do test case setup tasks. |
| 80 | |
| 81 | Click Element ${xpath_control_menu} |
| 82 | Click Element ${xpath_server_power_operations_sub_menu} |
| 83 | Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain server-power-operations |