Anusha Dathatri | 21ac59f | 2020-07-14 13:12:58 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Test OpenBMC GUI "Network settings" sub-menu of |
| 4 | ... "Server configuration". |
| 5 | |
| 6 | Resource ../../lib/resource.robot |
| 7 | |
| 8 | Suite Setup Suite Setup Execution |
| 9 | Suite Teardown Close Browser |
| 10 | |
| 11 | *** Variables *** |
| 12 | |
Anusha Dathatri | e11a54d | 2020-08-31 08:35:47 -0500 | [diff] [blame] | 13 | ${xpath_network_setting_heading} //h1[text()="Network settings"] |
| 14 | ${xpath_interface} //h2[text()="Interface"] |
| 15 | ${xpath_system} //h2[text()="System"] |
| 16 | ${xpath_static_ipv4} //h2[text()="Static IPv4"] |
| 17 | ${xpath_static_dns} //h2[text()="Static DNS"] |
| 18 | ${xpath_hostname_input} //*[@data-test-id="networkSettings-input-hostname"] |
| 19 | ${xpath_network_save_settings} //button[@data-test-id="networkSettings-button-saveNetworkSettings"] |
| 20 | ${xpath_default_gateway_input} //*[@data-test-id="networkSettings-input-gateway"] |
| 21 | ${xpath_mac_address_input} //*[@data-test-id="networkSettings-input-macAddress"] |
| 22 | ${xpath_static_input_ip0} //*[@data-test-id="networkSettings-input-staticIpv4-0"] |
| 23 | ${xpath_add_static_ip} //button[contains(text(),"Add static IP")] |
| 24 | ${xpath_setting_success} //*[contains(text(),"Successfully saved network settings.")] |
| 25 | ${xpath_add_dns_server} //button[contains(text(),"Add DNS server")] |
Anusha Dathatri | 21ac59f | 2020-07-14 13:12:58 -0500 | [diff] [blame] | 26 | |
| 27 | *** Test Cases *** |
| 28 | |
Anusha Dathatri | e11a54d | 2020-08-31 08:35:47 -0500 | [diff] [blame] | 29 | Verify Navigation To Network Settings Page |
| 30 | [Documentation] Verify navigation to network settings page. |
| 31 | [Tags] Verify_Navigation_To_Network_Settings_Page |
| 32 | |
| 33 | Page Should Contain Element ${xpath_network_setting_heading} |
| 34 | |
| 35 | |
| 36 | Verify Existence Of All Sections In Network Settings Page |
| 37 | [Documentation] Verify existence of all sections in network settings page. |
| 38 | [Tags] Verify_Existence_Of_All_Sections_In_Network_Settings_Page |
| 39 | |
| 40 | Page Should Contain Element ${xpath_interface} |
| 41 | Page Should Contain Element ${xpath_system} |
| 42 | Page Should Contain Element ${xpath_static_ipv4} |
| 43 | Page Should Contain Element ${xpath_static_dns} |
| 44 | |
| 45 | |
| 46 | Verify Existence Of All Buttons In Network Settings Page |
| 47 | [Documentation] Verify existence of all buttons in network settings page. |
| 48 | [Tags] Verify_Existence_Of_All_Buttons_In_Network_Settings_Page |
| 49 | |
| 50 | Page Should Contain Element ${xpath_add_static_ip} |
| 51 | Page Should Contain Element ${xpath_add_dns_server} |
| 52 | |
| 53 | |
Anusha Dathatri | 21ac59f | 2020-07-14 13:12:58 -0500 | [diff] [blame] | 54 | Verify Network Settings From Server Configuration |
| 55 | [Documentation] Verify ability to select "Network Settings" sub-menu option |
| 56 | ... of "Server Configuration". |
| 57 | [Tags] Verify_Network_Settings_From_Server_Configuration |
| 58 | |
| 59 | Page Should Contain IP address |
| 60 | |
| 61 | |
| 62 | Verify Hostname Text Configuration |
| 63 | [Documentation] Verify hostname text is configurable from "network settings" |
| 64 | ... sub-menu. |
| 65 | [Tags] Verify_Hostname_Text_Configuration |
| 66 | |
| 67 | Input Text ${xpath_hostname_input} witherspoon1 |
| 68 | Click Button ${xpath_network_save_settings} |
| 69 | Wait Until Page Contains Element ${xpath_setting_success} timeout=10 |
| 70 | Element Should Be Disabled ${xpath_network_save_settings} |
| 71 | Click Element ${xpath_select_refresh_button} |
| 72 | Wait Until Keyword Succeeds 15 sec 5 sec Textfield Should Contain ${xpath_hostname_input} |
| 73 | ... witherspoon1 |
| 74 | |
| 75 | |
| 76 | Verify Default Gateway Editable |
| 77 | [Documentation] Verify default gateway text input allowed from "network |
| 78 | ... settings". |
| 79 | [Tags] Verify_Default_Gateway_Editable |
| 80 | |
| 81 | Wait Until Page Contains Element ${xpath_default_gateway_input} |
| 82 | Input Text ${xpath_default_gateway_input} 10.6.6.7 |
| 83 | |
| 84 | |
| 85 | Verify MAC Address Editable |
| 86 | [Documentation] Verify MAC address text input allowed from "network |
| 87 | ... settings". |
| 88 | [Tags] Verify_MAC_Address_Editable |
| 89 | |
| 90 | Wait Until Page Contains Element ${xpath_mac_address_input} |
| 91 | Input Text ${xpath_mac_address_input} AA:E2:84:14:28:79 |
| 92 | |
| 93 | |
| 94 | Verify Static IP Address Editable |
| 95 | [Documentation] Verify static IP address is editable. |
| 96 | [Tags] Verify_Static_IP_Address_Editable |
| 97 | |
| 98 | ${exists}= Run Keyword And Return Status Wait Until Page Contains Element ${xpath_static_input_ip0} |
| 99 | Run Keyword If '${exists}' == '${False}' |
| 100 | ... Click Element ${xpath_add_static_ip} |
| 101 | |
| 102 | Input Text ${xpath_static_input_ip0} ${OPENBMC_HOST} |
| 103 | |
| 104 | |
Anves Kumar rayankula | 475811b | 2020-08-31 06:22:11 -0500 | [diff] [blame] | 105 | Verify System Section In Network Setting page |
| 106 | [Documentation] Verify hostname, MAC address and default gateway |
Anves Kumar rayankula | b172fbe | 2020-09-09 00:27:21 -0500 | [diff] [blame] | 107 | ... under system section of network setting page. |
Anves Kumar rayankula | 475811b | 2020-08-31 06:22:11 -0500 | [diff] [blame] | 108 | [Tags] Verify_System_Section |
| 109 | |
Anves Kumar rayankula | b172fbe | 2020-09-09 00:27:21 -0500 | [diff] [blame] | 110 | ${host_name}= Redfish_Utils.Get Attribute ${REDFISH_NW_PROTOCOL_URI} HostName |
| 111 | Textfield Value Should Be ${xpath_hostname_input} ${hos_name} |
Anves Kumar rayankula | 475811b | 2020-08-31 06:22:11 -0500 | [diff] [blame] | 112 | |
| 113 | ${mac_address}= Get BMC MAC Address |
| 114 | Textfield Value Should Be ${xpath_mac_address_input} ${mac_address} |
| 115 | |
| 116 | ${default_gateway}= Get BMC Default Gateway |
| 117 | Textfield Value Should Be ${xpath_default_gateway_input} ${default_gateway} |
| 118 | |
| 119 | |
Anusha Dathatri | 21ac59f | 2020-07-14 13:12:58 -0500 | [diff] [blame] | 120 | *** Keywords *** |
| 121 | |
| 122 | Suite Setup Execution |
| 123 | [Documentation] Do test case setup tasks. |
| 124 | |
| 125 | Launch Browser And Login GUI |
| 126 | Click Element ${xpath_server_configuration} |
| 127 | Click Element ${xpath_select_network_settings} |
| 128 | Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain network-settings |
| 129 | |