blob: e7fcc3717801e7edc43d60e8ad016f46ce87a55b [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
Rahul Maheshwari317c7102020-08-30 21:10:22 -050014${xpath_server_power_heading} //h1[text()="Server power operations"]
manashsarma61649752020-08-19 07:01:19 -050015${xpath_enable_onetime_boot_checkbox} //*[contains(@class,'custom-checkbox')]
16${xpath_boot_option_select} //*[@id='boot-option']
manashsarma66f9a622020-08-23 06:39:53 -050017${xpath_shutdown_button} //*[@data-test-id='serverPowerOperations-button-shutDown']
18${xpath_reboot_button} //*[@data-test-id='serverPowerOperations-button-reboot']
19${xpath_poweron_button} //*[@data-test-id='serverPowerOperations-button-powerOn']
20${xpath_tpm_policy_button} //input[@id='tpm-required-policy']
21${xpath_save_button} //button[contains(text(),'Save')]
manashsarma484fefc2020-08-23 12:38:49 -050022${Current_status} //*[contains(@class,'row mb-4')]
manashsarma7cbe1c02020-08-20 05:36:30 -050023
Rahul Maheshwari317c7102020-08-30 21:10:22 -050024
Rahul Maheshwari1e18bb62020-07-07 00:45:50 -050025*** Test Cases ***
26
Rahul Maheshwari317c7102020-08-30 21:10:22 -050027Verify Navigation To Server Power Operations Page
28 [Documentation] Verify navigation to server power operations page.
29 [Tags] Verify_Navigation_To_Server_Power_Operations_Page
manashsarma484fefc2020-08-23 12:38:49 -050030
Rahul Maheshwari317c7102020-08-30 21:10:22 -050031 Page Should Contain Element ${xpath_server_power_heading}
manashsarma484fefc2020-08-23 12:38:49 -050032
33
manashsarma66f9a622020-08-23 06:39:53 -050034Verify Existence Of All Sections In Server Power Operations Page
35 [Documentation] Verify existence of all sections in Server Power Operations page.
36 [Tags] Verify_Existence_Of_All_Sections_In_Server_Power_Operations_Page
37
38 Page Should Contain Current status
39 Page Should Contain Host OS boot settings
40 Page Should Contain Operations
41
42
manashsarma61649752020-08-19 07:01:19 -050043Verify Existence Of All Input Boxes In Host Os Boot Settings
44 [Documentation] Verify existence of all input boxes in host os boot settings.
45 [Tags] Verify_Existence_Of_Input_Boxes_In_Host_Os_Boot_Settings
46
47 Page Should Contain Element ${xpath_enable_onetime_boot_checkbox}
48 Page Should Contain Element ${xpath_boot_option_select}
49
50
51Verify Existence Of All Sections In Host Os Boot Settings
52 [Documentation] Verify existence of all sections in host os boot settings.
53 [Tags] Verify_Existence_Of_All_Sections_In_Host_Os_Boot_Settings
54
55 Page Should Contain Boot settings override
56 Page Should Contain TPM required policy
57
58
Rahul Maheshwari317c7102020-08-30 21:10:22 -050059Verify System State At Power Off
60 [Documentation] Verify state of the system in power off state.
61 [Tags] Verify_System_State_At_Power_Off
62
63 Redfish Power Off stack_mode=skip
64 Page Should Contain Element ${Current_status}
65 Element Should Contain ${Current_status} Off
66
67
68Verify System State At Power On
69 [Documentation] Verify state of the system in power on state.
70 [Tags] Verify_System_State_At_Power_On
71
72 Redfish Power On stack_mode=skip
73 Page Should Contain Element ${Current_status}
74 Element Should Contain ${Current_status} On
75
76
manashsarma7cbe1c02020-08-20 05:36:30 -050077Verify PowerOn Button Should Present At Power Off
78 [Documentation] Verify existence of poweron button at power off.
79 [Tags] Verify_PowerOn_Button_Should_Present_At_Power_Off
80
81 Redfish Power Off stack_mode=skip
82 # TODO: Implement power off using GUI later.
83 Page Should Contain Element ${xpath_poweron_button}
84
85
86Verify Shutdown And Reboot Buttons Presence At Power On
87 [Documentation] Verify existence of shutdown and reboot buttons at power on.
88 [Tags] Verify_Shutdown_And_Reboot_Buttons_Presence_At_Power_On
89
90 Redfish Power On stack_mode=skip
91 # TODO: Implement power on using GUI later.
92 Page Should Contain Element ${xpath_shutdown_button}
93 Page Should Contain Element ${xpath_reboot_button}
94
95
manashsarma66f9a622020-08-23 06:39:53 -050096Verify Existence Of Buttons In Host Os Boot Settings
97 [Documentation] Verify existence of buttons in Host OS boot settings.
98 [Tags] Verify_Existence_Of_Buttons_In_Host_Os_Boot_Settings
99
100 Page Should Contain Element ${xpath_tpm_policy_button}
101 Page Should Contain Element ${xpath_save_button}
102
103
Rahul Maheshwari1e18bb62020-07-07 00:45:50 -0500104*** Keywords ***
105
106Test Setup Execution
107 [Documentation] Do test case setup tasks.
108
109 Click Element ${xpath_control_menu}
110 Click Element ${xpath_server_power_operations_sub_menu}
111 Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain server-power-operations