Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
meghagn12345 | f942dae | 2021-08-27 02:53:00 -0500 | [diff] [blame] | 3 | Documentation Test OpenBMC GUI "Policies" sub-menu of "Security and Access" menu. |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 4 | |
| 5 | Resource ../../lib/gui_resource.robot |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 6 | Suite Setup Launch Browser And Login GUI |
| 7 | Suite Teardown Close Browser |
| 8 | Test Setup Test Setup Execution |
| 9 | |
| 10 | |
| 11 | *** Variables *** |
| 12 | |
meghagn12345 | f942dae | 2021-08-27 02:53:00 -0500 | [diff] [blame] | 13 | ${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 Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 16 | |
| 17 | |
| 18 | *** Test Cases *** |
| 19 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 20 | Verify Navigation To Policies Page |
meghagn12345 | f942dae | 2021-08-27 02:53:00 -0500 | [diff] [blame] | 21 | [Documentation] Verify navigation to policies page. |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 22 | [Tags] Verify_Navigation_To_Policies_Page |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 23 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 24 | Page Should Contain Element ${xpath_policies_heading} |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 25 | |
| 26 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 27 | Verify 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 Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 30 | |
| 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 Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 36 | Verify 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 Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 39 | |
| 40 | Page Should Contain Element ${xpath_bmc_ssh_toggle} |
| 41 | Page Should Contain Element ${xpath_network_ipmi_toggle} |
| 42 | |
| 43 | |
meghagn12345 | f942dae | 2021-08-27 02:53:00 -0500 | [diff] [blame] | 44 | Enable 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 Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 69 | *** Keywords *** |
| 70 | |
| 71 | Test Setup Execution |
| 72 | [Documentation] Do test case setup tasks. |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 73 | 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 |
meghagn12345 | f942dae | 2021-08-27 02:53:00 -0500 | [diff] [blame] | 76 | |
| 77 | |