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 | |
| 13 | ${xpath_hostname_input} //*[@data-test-id="networkSettings-input-hostname"] |
| 14 | ${xpath_network_save_settings} //button[@data-test-id="networkSettings-button-saveNetworkSettings"] |
| 15 | ${xpath_default_gateway_input} //*[@data-test-id="networkSettings-input-gateway"] |
| 16 | ${xpath_mac_address_input} //*[@data-test-id="networkSettings-input-macAddress"] |
| 17 | ${xpath_static_input_ip0} //*[@data-test-id="networkSettings-input-staticIpv4-0"] |
| 18 | ${xpath_add_static_ip} //button[contains(text(),"Add static IP")] |
| 19 | ${xpath_setting_success} //*[contains(text(),"Successfully saved network settings.")] |
| 20 | |
| 21 | *** Test Cases *** |
| 22 | |
| 23 | Verify Network Settings From Server Configuration |
| 24 | [Documentation] Verify ability to select "Network Settings" sub-menu option |
| 25 | ... of "Server Configuration". |
| 26 | [Tags] Verify_Network_Settings_From_Server_Configuration |
| 27 | |
| 28 | Page Should Contain IP address |
| 29 | |
| 30 | |
| 31 | Verify Hostname Text Configuration |
| 32 | [Documentation] Verify hostname text is configurable from "network settings" |
| 33 | ... sub-menu. |
| 34 | [Tags] Verify_Hostname_Text_Configuration |
| 35 | |
| 36 | Input Text ${xpath_hostname_input} witherspoon1 |
| 37 | Click Button ${xpath_network_save_settings} |
| 38 | Wait Until Page Contains Element ${xpath_setting_success} timeout=10 |
| 39 | Element Should Be Disabled ${xpath_network_save_settings} |
| 40 | Click Element ${xpath_select_refresh_button} |
| 41 | Wait Until Keyword Succeeds 15 sec 5 sec Textfield Should Contain ${xpath_hostname_input} |
| 42 | ... witherspoon1 |
| 43 | |
| 44 | |
| 45 | Verify Default Gateway Editable |
| 46 | [Documentation] Verify default gateway text input allowed from "network |
| 47 | ... settings". |
| 48 | [Tags] Verify_Default_Gateway_Editable |
| 49 | |
| 50 | Wait Until Page Contains Element ${xpath_default_gateway_input} |
| 51 | Input Text ${xpath_default_gateway_input} 10.6.6.7 |
| 52 | |
| 53 | |
| 54 | Verify MAC Address Editable |
| 55 | [Documentation] Verify MAC address text input allowed from "network |
| 56 | ... settings". |
| 57 | [Tags] Verify_MAC_Address_Editable |
| 58 | |
| 59 | Wait Until Page Contains Element ${xpath_mac_address_input} |
| 60 | Input Text ${xpath_mac_address_input} AA:E2:84:14:28:79 |
| 61 | |
| 62 | |
| 63 | Verify Static IP Address Editable |
| 64 | [Documentation] Verify static IP address is editable. |
| 65 | [Tags] Verify_Static_IP_Address_Editable |
| 66 | |
| 67 | ${exists}= Run Keyword And Return Status Wait Until Page Contains Element ${xpath_static_input_ip0} |
| 68 | Run Keyword If '${exists}' == '${False}' |
| 69 | ... Click Element ${xpath_add_static_ip} |
| 70 | |
| 71 | Input Text ${xpath_static_input_ip0} ${OPENBMC_HOST} |
| 72 | |
| 73 | |
| 74 | *** Keywords *** |
| 75 | |
| 76 | Suite Setup Execution |
| 77 | [Documentation] Do test case setup tasks. |
| 78 | |
| 79 | Launch Browser And Login GUI |
| 80 | Click Element ${xpath_server_configuration} |
| 81 | Click Element ${xpath_select_network_settings} |
| 82 | Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain network-settings |
| 83 | |