GUI automation changes with respect to new navigation menu
This commit has following changes:
- Modified GUI suites suite setup to use new navigation menus
structure
- Updated data-test-id xpaths related to navigation menu
with new ones
- Modified some test cases name to reflect new menu name
- Updated GUI suite documentation to reflect new menu structure
- Removed unsupported KVM suite file
- Removed LED suite file as it now comes under hardware inventory
Change-Id: Ia6500f3649fa32b60ac439b0c9b96b7e1a427425
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/gui/gui_test/settings_menu/test_date_and_time_sub_menu.robot b/gui/gui_test/settings_menu/test_date_and_time_sub_menu.robot
index eba2f9b..377f460 100644
--- a/gui/gui_test/settings_menu/test_date_and_time_sub_menu.robot
+++ b/gui/gui_test/settings_menu/test_date_and_time_sub_menu.robot
@@ -1,6 +1,6 @@
*** Settings ***
-Documentation Test OpenBMC GUI "Date and time settings" sub-menu of "Configuration".
+Documentation Test OpenBMC GUI "Date and time" sub-menu of "Settings".
Resource ../../lib/gui_resource.robot
@@ -10,45 +10,45 @@
*** Variables ***
-${xpath_date_time_heading} //h1[text()="Date and time settings"]
-${xpath_select_manual} //*[@data-test-id="dateTimeSettings-radio-configureManual"]
-${xpath_select_ntp} //*[@data-test-id="dateTimeSettings-radio-configureNTP"]
-${xpath_manual_date} //input[@data-test-id="dateTimeSettings-input-manualDate"]
-${xpath_manual_time} //input[@data-test-id="dateTimeSettings-input-manualTime"]
-${xpath_ntp_server1} //input[@data-test-id="dateTimeSettings-input-ntpServer1"]
-${xpath_ntp_server2} //input[@data-test-id="dateTimeSettings-input-ntpServer2"]
-${xpath_ntp_server3} //input[@data-test-id="dateTimeSettings-input-ntpServer3"]
-${xpath_select_save_settings} //button[@data-test-id="dateTimeSettings-button-saveSettings"]
+${xpath_date_time_heading} //h1[text()="Date and time"]
+${xpath_select_manual} //*[@data-test-id="dateTime-radio-configureManual"]
+${xpath_select_ntp} //*[@data-test-id="dateTime-radio-configureNTP"]
+${xpath_manual_date} //input[@data-test-id="dateTime-input-manualDate"]
+${xpath_manual_time} //input[@data-test-id="dateTime-input-manualTime"]
+${xpath_ntp_server1} //input[@data-test-id="dateTime-input-ntpServer1"]
+${xpath_ntp_server2} //input[@data-test-id="dateTime-input-ntpServer2"]
+${xpath_ntp_server3} //input[@data-test-id="dateTime-input-ntpServer3"]
+${xpath_select_save_settings} //button[@data-test-id="dateTime-button-saveSettings"]
*** Test Cases ***
-Verify Navigation To Date And Time Settings Page
- [Documentation] Verify navigation to date and time settings page.
- [Tags] Verify_Navigation_To_Date_And_Time_Settings_Page
+Verify Navigation To Date And Time Page
+ [Documentation] Verify navigation to date and time page.
+ [Tags] Verify_Navigation_To_Date_And_Time_Page
Page Should Contain Element ${xpath_date_time_heading}
-Verify Existence Of All Sections In Date And Time Settings Page
- [Documentation] Verify existence of all sections in date and time settings page.
- [Tags] Verify_Existence_Of_All_Sections_In_Date_And_Time_Settings_Page
+Verify Existence Of All Sections In Date And Time Page
+ [Documentation] Verify existence of all sections in date and time page.
+ [Tags] Verify_Existence_Of_All_Sections_In_Date_And_Time__Page
Page Should Contain Configure settings
-Verify Existence Of All Buttons In Date And Time Settings Page
+Verify Existence Of All Buttons In Date And Time Page
[Documentation] Verify existence of all buttons in date and time settings page.
- [Tags] Verify_Existence_Of_All_Buttons_In_Date_And_Time_Settings_Page
+ [Tags] Verify_Existence_Of_All_Buttons_In_Date_And_Time_Page
Page Should Contain Element ${xpath_select_manual}
Page Should Contain Element ${xpath_select_ntp}
Page Should Contain Element ${xpath_select_save_settings}
-Verify Existence Of All Input Boxes In Date And Time Settings Page
- [Documentation] Verify existence of all input boxes in date time settings page.
- [Tags] Verify_Existence_Of_All_Input_Boxes_In_Date_And_Time_Settings_Page
+Verify Existence Of All Input Boxes In Date And Time Page
+ [Documentation] Verify existence of all input boxes in date time page.
+ [Tags] Verify_Existence_Of_All_Input_Boxes_In_Date_And_Time_Page
Click Element At Coordinates ${xpath_select_manual} 0 0
Page Should Contain Element ${xpath_manual_date}
@@ -119,6 +119,6 @@
Navigate To Date and Time Page
[Documentation] Navigate to the date and time page from main menu.
- Click Element ${xpath_server_configuration}
- Click Element ${xpath_date_time_settings_sub_menu}
- Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain date-time-settings
+ Click Element ${xpath_settings_menu}
+ Click Element ${xpath_date_time_sub_menu}
+ Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain date-time
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 9dab942..acffb72 100644
--- a/gui/gui_test/settings_menu/test_network_sub_menu.robot
+++ b/gui/gui_test/settings_menu/test_network_sub_menu.robot
@@ -1,7 +1,6 @@
*** Settings ***
-Documentation Test OpenBMC GUI "Network settings" sub-menu of
-... "Server configuration".
+Documentation Test OpenBMC GUI "Network" sub-menu of "Settings".
Resource ../../lib/gui_resource.robot
Resource ../../../lib/bmc_network_utils.robot
@@ -11,25 +10,25 @@
*** Variables ***
-${xpath_network_setting_heading} //h1[text()="Network settings"]
+${xpath_network_heading} //h1[text()="Network"]
${xpath_interface} //h2[text()="Interface"]
${xpath_system} //h2[text()="System"]
${xpath_static_ipv4} //h2[text()="IPV4"]
${xpath_static_dns} //h2[text()="Static DNS"]
-${xpath_hostname_input} //*[@data-test-id="networkSettings-input-hostname"]
-${xpath_network_save_settings} //button[@data-test-id="networkSettings-button-saveNetworkSettings"]
-${xpath_default_gateway_input} //*[@data-test-id="networkSettings-input-gateway"]
-${xpath_mac_address_input} //*[@data-test-id="networkSettings-input-macAddress"]
-${xpath_static_input_ip0} //*[@data-test-id="networkSettings-input-staticIpv4-0"]
-${xpath_static_input_ip1} //*[@data-test-id="networkSettings-input-staticIpv4-1"]
+${xpath_hostname_input} //*[@data-test-id="network-input-hostname"]
+${xpath_network_save_settings} //button[@data-test-id="network-button-saveNetworkSettings"]
+${xpath_default_gateway_input} //*[@data-test-id="network-input-gateway"]
+${xpath_mac_address_input} //*[@data-test-id="network-input-macAddress"]
+${xpath_static_input_ip0} //*[@data-test-id="network-input-staticIpv4-0"]
+${xpath_static_input_ip1} //*[@data-test-id="network-input-staticIpv4-1"]
${xpath_add_static_ip} //button[contains(text(),"Add static IP")]
${xpath_setting_success} //*[contains(text(),"Successfully saved network settings.")]
${xpath_add_dns_server} //button[contains(text(),"Add DNS server")]
-${xpath_network_interface} //*[@data-test-id="networkSettings-select-interface"]
-${xpath_input_netmask_addr0} //*[@data-test-id="networkSettings-input-subnetMask-0"]
-${xpath_input_netmask_addr1} //*[@data-test-id="networkSettings-input-subnetMask-1"]
+${xpath_network_interface} //*[@data-test-id="network-select-interface"]
+${xpath_input_netmask_addr0} //*[@data-test-id="network-input-subnetMask-0"]
+${xpath_input_netmask_addr1} //*[@data-test-id="network-input-subnetMask-1"]
${xpath_delete_static_ip} //*[@title="Delete IPv4 row"]
-${xpath_input_dns_server} //*[@data-test-id="networkSettings-input-dnsAddress-0"]
+${xpath_input_dns_server} //*[@data-test-id="network-input-dnsAddress-0"]
${xpath_delete_dns_server} //*[@title="Delete DNS row"]
${xpath_delete_static_ip} //*[@title="Delete IPv4 row"]
@@ -54,16 +53,16 @@
*** Test Cases ***
-Verify Navigation To Network Settings Page
- [Documentation] Verify navigation to network settings page.
- [Tags] Verify_Navigation_To_Network_Settings_Page
+Verify Navigation To Network Page
+ [Documentation] Verify navigation to network page.
+ [Tags] Verify_Navigation_To_Network_Page
- Page Should Contain Element ${xpath_network_setting_heading}
+ Page Should Contain Element ${xpath_network_heading}
-Verify Existence Of All Sections In Network Settings Page
+Verify Existence Of All Sections In Network Page
[Documentation] Verify existence of all sections in network settings page.
- [Tags] Verify_Existence_Of_All_Sections_In_Network_Settings_Page
+ [Tags] Verify_Existence_Of_All_Sections_In_Network_Page
Page Should Contain Element ${xpath_interface}
Page Should Contain Element ${xpath_system}
@@ -72,18 +71,18 @@
Page Should Contain Button ${xpath_delete_static_ip}
-Verify Existence Of All Buttons In Network Settings Page
- [Documentation] Verify existence of all buttons in network settings page.
- [Tags] Verify_Existence_Of_All_Buttons_In_Network_Settings_Page
+Verify Existence Of All Buttons In Network Page
+ [Documentation] Verify existence of all buttons in network page.
+ [Tags] Verify_Existence_Of_All_Buttons_In_Network_Page
Page Should Contain Element ${xpath_add_static_ip}
Page Should Contain Element ${xpath_add_dns_server}
-Verify Network Settings From Server Configuration
- [Documentation] Verify ability to select "Network Settings" sub-menu option
- ... of "Server Configuration".
- [Tags] Verify_Network_Settings_From_Server_Configuration
+Verify Network From Server Configuration
+ [Documentation] Verify ability to select "Network" sub-menu option
+ ... of "Settings".
+ [Tags] Verify_Network_From_Server_Configuration
Page Should Contain IP address
@@ -274,9 +273,9 @@
[Documentation] Do test case setup tasks.
Launch Browser And Login GUI
- Click Element ${xpath_server_configuration}
- Click Element ${xpath_select_network_settings}
- Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain network-settings
+ Click Element ${xpath_settings_menu}
+ Click Element ${xpath_network_sub_menu}
+ Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain network
${host_name} ${BMC_IP}= Get Host Name IP host=${OPENBMC_HOST}
Set Suite Variable ${BMC_IP}
@@ -313,7 +312,7 @@
${length}= Get Length ${static_name_servers}
FOR ${i} IN RANGE ${length}
Click Button ${xpath_add_dns_server}
- Input Text //*[@data-test-id="networkSettings-input-dnsAddress-${i}"]
+ Input Text //*[@data-test-id="network-input-dnsAddress-${i}"]
... ${static_name_servers}[${i}]
END
@@ -382,8 +381,8 @@
${length}= Get Length ${static_name_servers}
FOR ${i} IN RANGE ${length}
- Page Should Contain Element //*[@data-test-id="networkSettings-input-dnsAddress-${i}"]
- Textfield Value Should Be //*[@data-test-id="networkSettings-input-dnsAddress-${i}"]
+ Page Should Contain Element //*[@data-test-id="network-input-dnsAddress-${i}"]
+ Textfield Value Should Be //*[@data-test-id="network-input-dnsAddress-${i}"]
... ${static_name_servers}[${i}]
END
@@ -407,9 +406,9 @@
Click Button ${xpath_add_static_ip}
Input Text
- ... //*[@data-test-id="networkSettings-input-staticIpv4-${location}"] ${ip_address}
+ ... //*[@data-test-id="network-input-staticIpv4-${location}"] ${ip_address}
Input Text
- ... //*[@data-test-id="networkSettings-input-subnetMask-${location}"] ${subnet_mask}
+ ... //*[@data-test-id="network-input-subnetMask-${location}"] ${subnet_mask}
Click Button ${xpath_network_save_settings}
Run keyword if '${expected_status}' != 'Valid format'
@@ -434,7 +433,7 @@
${delete_ip_buttons}= Get WebElements ${xpath_delete_static_ip}
FOR ${location} IN RANGE len(${ip_addresses})
- ${gui_ip}= Get Value //*[@data-test-id="networkSettings-input-staticIpv4-${location}"]
+ ${gui_ip}= Get Value //*[@data-test-id="networ-input-staticIpv4-${location}"]
Run Keyword If '${gui_ip}' == '${ip_address}' and '${gui_ip}' != '${BMC_IP}'
... Run Keywords Click Element ${delete_ip_buttons}[${location}]
... AND Exit For Loop
@@ -460,12 +459,12 @@
Should Contain ${ip_addresses} ${ip} msg=${ip} does not exist on BMC
FOR ${location} IN RANGE len(${ip_addresses})
- ${gui_ip}= Get Value //*[@data-test-id="networkSettings-input-staticIpv4-${location}"]
+ ${gui_ip}= Get Value //*[@data-test-id="network-input-staticIpv4-${location}"]
Run Keyword If '${gui_ip}' == '${ip}'
... Run Keywords
- ... Clear Element Text //*[@data-test-id="networkSettings-input-staticIpv4-${location}"]
+ ... Clear Element Text //*[@data-test-id="network-input-staticIpv4-${location}"]
... AND Input Text
- ... //*[@data-test-id="networkSettings-input-staticIpv4-${location}"] ${new_ip}
+ ... //*[@data-test-id="network-input-staticIpv4-${location}"] ${new_ip}
... AND Exit For Loop
END
Click Button ${xpath_network_save_settings}
@@ -484,7 +483,7 @@
${static_ipv4_addresses}= Create List
FOR ${locator} IN RANGE len(${availble_ip_addresses})
- ${ip_address}= Get value //*[@data-test-id="networkSettings-input-staticIpv4-${locator}"]
+ ${ip_address}= Get value //*[@data-test-id="network-input-staticIpv4-${locator}"]
Append To List ${static_ipv4_addresses} ${ip_address}
END
diff --git a/gui/gui_test/settings_menu/test_power_restore_policy_sub_menu.robot b/gui/gui_test/settings_menu/test_power_restore_policy_sub_menu.robot
index e076dbf..5260465 100644
--- a/gui/gui_test/settings_menu/test_power_restore_policy_sub_menu.robot
+++ b/gui/gui_test/settings_menu/test_power_restore_policy_sub_menu.robot
@@ -1,6 +1,6 @@
*** Settings ***
-Documentation Test OpenBMC GUI "Power restore policy" sub-menu of "Server control" menu.
+Documentation Test OpenBMC GUI "Power restore policy" sub-menu of "Settings" menu.
Resource ../../lib/gui_resource.robot
@@ -49,6 +49,6 @@
Test Setup Execution
[Documentation] Do test case setup tasks.
- Click Element ${xpath_control_menu}
+ Click Element ${xpath_settings_menu}
Click Element ${xpath_power_restore_policy_sub_menu}
Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain power-restore-policy