blob: 51a87738e2914099c03686809c8766333f157e82 [file] [log] [blame]
Rahul Maheshwarif7376af2018-06-11 00:46:36 -05001*** Settings ***
2
3Documentation Test OpenBMC GUI "Network settings" sub-menu of
4... "Server configuration".
5
6Resource ../../lib/resource.robot
7
8Suite Setup Launch Browser And Login OpenBMC GUI
Rahul Maheshwari43333ff2018-11-26 23:18:36 -06009Suite Teardown Close Browser
Rahul Maheshwarif7376af2018-06-11 00:46:36 -050010Test Setup Test Setup Execution
11
12*** Variables ***
13
14${xpath_select_server_configuration} //*[@id="nav__top-level"]/li[4]/button
15${xpath_select_network_settings} //a[@href='#/configuration/network']
16${xpath_hostname_input} //*[@id="net-config__mac"]
Anusha Dathatri2513ae52019-09-18 05:18:46 -050017${xpath_network_save_settings} //*[text()="Save settings"]
Rahul Maheshwarif7376af2018-06-11 00:46:36 -050018${xpath_continue} //*[@id=""]/main/section/div/div[4]/button[2]
Anusha Dathatriac71e3f2019-07-24 00:12:59 -050019${xpath_network_config_ipv4_address} //*[@id="ipv4-address-1"]
Rahul Maheshwari88f56ec2018-06-18 05:08:40 -050020${xpath_default_gateway_input} //*[@id="net-config__domain"]
21${xpath_mac_address_input} //*[@id="net-config__host"]
Anusha Dathatriac71e3f2019-07-24 00:12:59 -050022${xpath_ipv4-address-input} //*[@id="ipv4-address-1"]
Anusha Dathatri2513ae52019-09-18 05:18:46 -050023${xpath_network_DHCP_button} //*[contains(text(),"Obtain an IP address automatically")]
24${xpath_network_static_button} //*[contains(text(),"Assign a static IP address")]
Rahul Maheshwarif7376af2018-06-11 00:46:36 -050025
26*** Test Cases ***
27
28Verify Network Settings From Server Configuration
29 [Documentation] Verify ability to select "Network Settings" sub-menu option
30 ... of "Server Configuration".
31 [Tags] Verify_Network_Settings_From_Server_Configuration
32
33 Wait Until Page Contains BMC network settings
34 Page Should Contain IPV4 settings Common settings
35
36
37Verify Hostname Text Configuration
38 [Documentation] Verify hostname text is configurable from "network settings"
39 ... sub-menu.
Sivas SRR125724a2018-06-15 05:32:20 -050040 [Tags] Verify_Hostname_Text_Configuration
Rahul Maheshwarif7376af2018-06-11 00:46:36 -050041
42 Input Text ${xpath_hostname_input} witherspoon1
43 Click Element ${xpath_network_save_settings}
44 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
45 Click Element ${xpath_continue}
Anusha Dathatri2513ae52019-09-18 05:18:46 -050046 Click Element ${xpath_select_refresh_button}
Rahul Maheshwarif7376af2018-06-11 00:46:36 -050047 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
48 Page Should Contain witherspoon1
49
50
Rahul Maheshwari88f56ec2018-06-18 05:08:40 -050051Verify Default Gateway Editable
52 [Documentation] Verify default gateway text input allowed from "network
53 ... settings".
54 [Tags] Verify_Default_Gateway_Editable
55
56 Page Should Contain Element ${xpath_default_gateway_input}
57 Input Text ${xpath_default_gateway_input} 10.6.6.7
58
59
60Verify MAC Address Editable
61 [Documentation] Verify MAC address text input allowed from "network
62 ... settings".
63 [Tags] Verify_MAC_Address_Editable
64
65 Page Should Contain Element ${xpath_mac_address_input}
66 Input Text ${xpath_mac_address_input} 70:e2:84:14:16:6c
67
68
Rahul Maheshwari2d6cb192018-06-19 02:37:02 -050069Verify IP Address Editable With Static IP Selection
70 [Documentation] Verify IP address editable with static IP selection.
71 [Tags] Verify_IP_Address_Editable_With_Static_IP_Selection
72
73 Page Should Contain Element ${xpath_network_static_button}
74 Click Element ${xpath_network_static_button}
75 ${status}= Run Keyword And Return Status Input Text
76 ... ${xpath_ipv4-address-input} ${OPENBMC_HOST}
77 Should Be True '${status}' == '${True}'
78
79
80Verify IP Address Noneditable With DHCP IP Selection
81 [Documentation] Verify IP address noneditable with DHCP IP selection.
82 [Tags] Verify_IP_Address_Noneditable_With_DHCP_IP_Selection
83
84 Page Should Contain Element ${xpath_network_DHCP_button}
85 Click Element ${xpath_network_DHCP_button}
86 Element Should Be Disabled ${xpath_ipv4-address-input}
87
88
Rahul Maheshwarif7376af2018-06-11 00:46:36 -050089*** Keywords ***
90
91Test Setup Execution
92 [Documentation] Do test case setup tasks.
93
94 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
95 Click Element ${xpath_select_server_configuration}
96 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
97 Click Element ${xpath_select_network_settings}
98 Wait Until Page Contains Element ${xpath_network_config_ipv4_address}
99