Added new testcase for GUI network
Changes:
- Added testcase "Verify Able To Click On Eth1 Interface"
- Added Keyword "Get Network Interface Details"
Tested:
- Ran successfully test_network_sub_menu.robot
Change-Id: I3b70e1f40993d11598374378ca794ecf252088ef
Signed-off-by: Anvesh-Kumar_Rayankula <anvesh.kumar.rayankula@ibm.com>
diff --git a/gui/gui_test/settings_menu/test_network_sub_menu.robot b/gui/gui_test/settings_menu/test_network_sub_menu.robot
index 16639d9..0f228c0 100644
--- a/gui/gui_test/settings_menu/test_network_sub_menu.robot
+++ b/gui/gui_test/settings_menu/test_network_sub_menu.robot
@@ -35,6 +35,7 @@
${xpath_delete_ipv4_addres} //*[text()='${test_ipv4_addr}']/following::td[4]
... //*[@title="Delete IPv4 address"]
${xpath_delete_button} //*[text()="Delete"]
+${xpath_eth1_interface} //*[text()="eth1"]
${dns_server} 10.10.10.10
${test_ipv4_addr} 10.7.7.7
@@ -223,12 +224,24 @@
[Setup] Redfish.Login
[Teardown] Redfish.Logout
- ${active_channel_config}= Get Active Channel Config
- ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
- ${resp}= redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
+ ${network_details}= Get Network Interface Details ${CHANNEL_NUMBER}
# Verify the MAC address on GUI.
- Page Should Contain ${resp.dict['MACAddress']}
+ Page Should Contain ${network_details['MACAddress']}
+
+
+Verify MAC Address On Eth1 Interface
+ [Documentation] Verify MAC address on eth1 interface.
+ [Tags] Verify_MAC_Address_On_Eth1_Interface
+ [Setup] Redfish.Login
+ [Teardown] Redfish.Logout
+
+ Click Element ${xpath_eth1_interface}
+
+ ${network_details}= Get Network Interface Details ${SECONDARY_CHANNEL_NUMBER}
+
+ # Verify eth1 interface MAC address on GUI.
+ Page Should Contain ${network_details['MACAddress']}
Configure Hostname Via GUI And Verify
@@ -415,3 +428,16 @@
Should Be Equal ${delete_status} ${False}
Wait Until Page Does Not Contain ${ip_addr}
+
+
+Get Network Interface Details
+ [Documentation] Get network interface details.
+ [Arguments] ${channel_number}
+
+ # Description of argument(s):
+ # channel_number Interface Channel Number(eg.eth0 or eth1).
+
+ ${active_channel_config}= Get Active Channel Config
+ ${ethernet_interface}= Set Variable ${active_channel_config['${channel_number}']['name']}
+ ${resp}= redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
+ RETURN ${resp.dict}