blob: afdfd465cef293c24bbec0ed7cb4fbebe0849c65 [file] [log] [blame]
Ashwini Chandrappafdfd7e32021-08-02 07:59:11 -05001*** Settings ***
2
meghagn12345f942dae2021-08-27 02:53:00 -05003Documentation Test OpenBMC GUI "Policies" sub-menu of "Security and Access" menu.
Ashwini Chandrappafdfd7e32021-08-02 07:59:11 -05004
5Resource ../../lib/gui_resource.robot
Ashwini Chandrappafdfd7e32021-08-02 07:59:11 -05006Suite Setup Launch Browser And Login GUI
7Suite Teardown Close Browser
8Test Setup Test Setup Execution
9
10
11*** Variables ***
12
meghagn12345f942dae2021-08-27 02:53:00 -050013${xpath_policies_heading} //h1[text()="Policies"]
14${xpath_bmc_ssh_toggle} //*[@data-test-id='policies-toggle-bmcShell']/following-sibling::label
15${xpath_network_ipmi_toggle} //*[@data-test-id='polices-toggle-networkIpmi']
Ashwini Chandrappafdfd7e32021-08-02 07:59:11 -050016
17
18*** Test Cases ***
19
Rahul Maheshwari142642d2021-08-24 00:00:15 -050020Verify Navigation To Policies Page
meghagn12345f942dae2021-08-27 02:53:00 -050021 [Documentation] Verify navigation to policies page.
Rahul Maheshwari142642d2021-08-24 00:00:15 -050022 [Tags] Verify_Navigation_To_Policies_Page
Ashwini Chandrappafdfd7e32021-08-02 07:59:11 -050023
Rahul Maheshwari142642d2021-08-24 00:00:15 -050024 Page Should Contain Element ${xpath_policies_heading}
Ashwini Chandrappafdfd7e32021-08-02 07:59:11 -050025
26
Rahul Maheshwari142642d2021-08-24 00:00:15 -050027Verify Existence Of All Sections In Policies Page
28 [Documentation] Verify existence of all sections in policies page.
29 [Tags] Verify_Existence_Of_All_Sections_In_Policies_Page
Ashwini Chandrappafdfd7e32021-08-02 07:59:11 -050030
31 Page Should Contain Network services
32 Page Should Contain BMC shell (via SSH)
33 Page Should Contain Network IPMI (out-of-band IPMI)
34
35
Rahul Maheshwari142642d2021-08-24 00:00:15 -050036Verify Existence Of All Buttons In Policies Page
37 [Documentation] Verify existence of All Buttons in policies page.
38 [Tags] Verify_Existence_Of_All_Buttons_In_Policies_Page
Ashwini Chandrappafdfd7e32021-08-02 07:59:11 -050039
40 Page Should Contain Element ${xpath_bmc_ssh_toggle}
41 Page Should Contain Element ${xpath_network_ipmi_toggle}
42
43
meghagn12345f942dae2021-08-27 02:53:00 -050044Enable SSH Via GUI And Verify
45 [Documentation] Verify that SSH to BMC starts working after enabling SSH.
46 [Tags] Enable_SSH_Via_GUI_And_Verify
47 [Teardown] Run Keywords Redfish.Patch /redfish/v1/Managers/bmc/NetworkProtocol
48 ... body={"SSH":{"ProtocolEnabled":True}} valid_status_codes=[200, 204] AND
49 ... Wait Until Keyword Succeeds 30 sec 5 sec Open Connection And Login
50
51 # Disable ssh via Redfish.
52 Redfish.Patch /redfish/v1/Managers/bmc/NetworkProtocol body={"SSH":{"ProtocolEnabled":False}}
53 ... valid_status_codes=[200, 204]
54
55 # Wait for GUI to reflect disable SSH status.
56 Wait Until Keyword Succeeds 30 sec 10 sec
57 ... Refresh GUI And Verify Element Value ${xpath_bmc_ssh_toggle} Disabled
58
59 # Enable ssh via GUI.
60 Click Element ${xpath_bmc_ssh_toggle}
61
62 # Wait for GUI to reflect enable SSH status.
63 Wait Until Keyword Succeeds 30 sec 10 sec
64 ... Refresh GUI And Verify Element Value ${xpath_bmc_ssh_toggle} Enabled
65
66 Wait Until Keyword Succeeds 10 sec 5 sec Open Connection And Login
67
68
Ashwini Chandrappafdfd7e32021-08-02 07:59:11 -050069*** Keywords ***
70
71Test Setup Execution
72 [Documentation] Do test case setup tasks.
Rahul Maheshwari142642d2021-08-24 00:00:15 -050073 Click Element ${xpath_secuity_and_accesss_menu}
74 Click Element ${xpath_policies_sub_menu}
75 Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain policies
meghagn12345f942dae2021-08-27 02:53:00 -050076
77