blob: 2e4476dbaccee99f3f3215014ecc2e83e75352ea [file] [log] [blame]
Rahul Maheshwari1e18bb62020-07-07 00:45:50 -05001*** Settings ***
2
3Documentation Test OpenBMC GUI "Server power operations" sub-menu of "Server control".
4
5Resource ../../lib/resource.robot
6
7Suite Setup Launch Browser And Login GUI
8Suite Teardown Close Browser
9Test Setup Test Setup Execution
10
11
12*** Variables ***
13
manashsarma61649752020-08-19 07:01:19 -050014${xpath_enable_onetime_boot_checkbox} //*[contains(@class,'custom-checkbox')]
15${xpath_boot_option_select} //*[@id='boot-option']
manashsarma66f9a622020-08-23 06:39:53 -050016${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')]
manashsarma7cbe1c02020-08-20 05:36:30 -050021
Rahul Maheshwari1e18bb62020-07-07 00:45:50 -050022*** Test Cases ***
23
manashsarma66f9a622020-08-23 06:39:53 -050024Verify 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
manashsarma61649752020-08-19 07:01:19 -050033Verify 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
41Verify 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
manashsarma7cbe1c02020-08-20 05:36:30 -050049Verify 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
58Verify 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
manashsarma66f9a622020-08-23 06:39:53 -050068Verify 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 Maheshwari1e18bb62020-07-07 00:45:50 -050076*** Keywords ***
77
78Test 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