blob: ae8e124a9935ccafa994d086cb416f203fb3bcf6 [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')]
manashsarma484fefc2020-08-23 12:38:49 -050021${Current_status} //*[contains(@class,'row mb-4')]
manashsarma7cbe1c02020-08-20 05:36:30 -050022
Rahul Maheshwari1e18bb62020-07-07 00:45:50 -050023*** Test Cases ***
24
manashsarma484fefc2020-08-23 12:38:49 -050025Verify System State At Power Off
26 [Documentation] Verify state of the system in power off state.
27 [Tags] Verify_System_State_At_Power_Off
28
29 Redfish Power Off stack_mode=skip
30 Page Should Contain Element ${Current_status}
31 Element Should Contain ${Current_status} Off
32
33
34Verify System State At Power On
35 [Documentation] Verify state of the system in power on state.
36 [Tags] Verify_System_State_At_Power_On
37
38 Redfish Power On stack_mode=skip
39 Page Should Contain Element ${Current_status}
40 Element Should Contain ${Current_status} On
41
42
manashsarma66f9a622020-08-23 06:39:53 -050043Verify Existence Of All Sections In Server Power Operations Page
44 [Documentation] Verify existence of all sections in Server Power Operations page.
45 [Tags] Verify_Existence_Of_All_Sections_In_Server_Power_Operations_Page
46
47 Page Should Contain Current status
48 Page Should Contain Host OS boot settings
49 Page Should Contain Operations
50
51
manashsarma61649752020-08-19 07:01:19 -050052Verify Existence Of All Input Boxes In Host Os Boot Settings
53 [Documentation] Verify existence of all input boxes in host os boot settings.
54 [Tags] Verify_Existence_Of_Input_Boxes_In_Host_Os_Boot_Settings
55
56 Page Should Contain Element ${xpath_enable_onetime_boot_checkbox}
57 Page Should Contain Element ${xpath_boot_option_select}
58
59
60Verify Existence Of All Sections In Host Os Boot Settings
61 [Documentation] Verify existence of all sections in host os boot settings.
62 [Tags] Verify_Existence_Of_All_Sections_In_Host_Os_Boot_Settings
63
64 Page Should Contain Boot settings override
65 Page Should Contain TPM required policy
66
67
manashsarma7cbe1c02020-08-20 05:36:30 -050068Verify PowerOn Button Should Present At Power Off
69 [Documentation] Verify existence of poweron button at power off.
70 [Tags] Verify_PowerOn_Button_Should_Present_At_Power_Off
71
72 Redfish Power Off stack_mode=skip
73 # TODO: Implement power off using GUI later.
74 Page Should Contain Element ${xpath_poweron_button}
75
76
77Verify Shutdown And Reboot Buttons Presence At Power On
78 [Documentation] Verify existence of shutdown and reboot buttons at power on.
79 [Tags] Verify_Shutdown_And_Reboot_Buttons_Presence_At_Power_On
80
81 Redfish Power On stack_mode=skip
82 # TODO: Implement power on using GUI later.
83 Page Should Contain Element ${xpath_shutdown_button}
84 Page Should Contain Element ${xpath_reboot_button}
85
86
manashsarma66f9a622020-08-23 06:39:53 -050087Verify Existence Of Buttons In Host Os Boot Settings
88 [Documentation] Verify existence of buttons in Host OS boot settings.
89 [Tags] Verify_Existence_Of_Buttons_In_Host_Os_Boot_Settings
90
91 Page Should Contain Element ${xpath_tpm_policy_button}
92 Page Should Contain Element ${xpath_save_button}
93
94
Rahul Maheshwari1e18bb62020-07-07 00:45:50 -050095*** Keywords ***
96
97Test Setup Execution
98 [Documentation] Do test case setup tasks.
99
100 Click Element ${xpath_control_menu}
101 Click Element ${xpath_server_power_operations_sub_menu}
102 Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain server-power-operations