Added test use case for server configuration menu pages
Testcases added:
- Verify_Navigation_To_Date_And_Time_Settings_Page
- Verify_Navigation_To_Network_Settings_Page
- Verify_Existence_Of_All_Sections_In_Network_Settings_Page
- Verify_Existence_Of_All_Buttons_In_Network_Settings_Page
- Verify_Navigation_To_Firmware_Page
- Verify_Existence_Of_All_Sections_In_Firmware_Page
- Verify_Existence_Of_All_Buttons_In_Firmware_Page
Change-Id: Ib46179440e6fbb1ef5f725c8418fa4b28bea651b
Signed-off-by: Anusha Dathatri <adathatr@in.ibm.com>
diff --git a/gui/data/resource_variables.py b/gui/data/resource_variables.py
index bf60e3d..f85dc9e 100644
--- a/gui/data/resource_variables.py
+++ b/gui/data/resource_variables.py
@@ -154,6 +154,7 @@
xpath_server_configuration = "//button[@aria-controls='configuration-menu']"
xpath_select_network_settings = "//a[@href='#/configuration/network-settings']"
xpath_date_time_settings_sub_menu = "//a[@href='#/configuration/date-time-settings']"
+ xpath_firmware_update_sub_menu = "//a[@href='#/configuration/firmware']"
# xpath for access control menu
xpath_access_control_menu = "//*[@data-test-id='nav-button-accessControl']"
diff --git a/gui/gui_test/server_config/test_date_time_settings_sub_menu.robot b/gui/gui_test/server_config/test_date_time_settings_sub_menu.robot
index 0980bef..9be1424 100644
--- a/gui/gui_test/server_config/test_date_time_settings_sub_menu.robot
+++ b/gui/gui_test/server_config/test_date_time_settings_sub_menu.robot
@@ -10,6 +10,7 @@
*** 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"]
@@ -22,6 +23,13 @@
*** 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
+
+ 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
diff --git a/gui/gui_test/server_config/test_obmc_gui_firmware_update.robot b/gui/gui_test/server_config/test_obmc_gui_firmware_update.robot
new file mode 100644
index 0000000..aefa65a
--- /dev/null
+++ b/gui/gui_test/server_config/test_obmc_gui_firmware_update.robot
@@ -0,0 +1,50 @@
+*** Settings ***
+
+Documentation Test OpenBMC Firmware Update" sub menu of "Configuration".
+
+Resource ../../lib/resource.robot
+
+Suite Setup Suite Setup Execution
+Suite Teardown Close Browser
+
+*** Variables ***
+
+${xpath_firmware_heading} //h1[text()="Firmware"]
+${xpath_change_image_and_reboot} //button[contains(text(),'Change image and reboot BMC')]
+${xpath_upload_image_and_reboot} //button[contains(text(),'Upload and reboot BMC')]
+
+*** Test Cases ***
+
+Verify Navigation To Firmware Page
+ [Documentation] Verify navigation to firmware page.
+ [Tags] Verify_Navigation_To_Firmware_Page
+
+ Page Should Contain Element ${xpath_firmware_heading}
+
+
+Verify Existence Of All Sections In Firmware Page
+ [Documentation] Verify existence of all sections in firmware page.
+ [Tags] Verify_Existence_Of_All_Sections_In_Firmware_Page
+
+ Page Should Contain Firmware on system
+ Page Should Contain Change to backup image
+ Page Should Contain Update code
+
+
+Verify Existence Of All Buttons In Firmware Page
+ [Documentation] Verify existence of all buttons in firmware page.
+ [Tags] Verify_Existence_Of_All_Buttons_In_Firmware_Page
+
+ Page Should Contain Element ${xpath_change_image_and_reboot}
+ Page Should Contain Element ${xpath_upload_image_and_reboot}
+
+
+*** Keywords ***
+
+Suite Setup Execution
+ [Documentation] Do test case setup tasks.
+
+ Launch Browser And Login GUI
+ Click Element ${xpath_server_configuration}
+ Click Element ${xpath_firmware_update_sub_menu}
+ Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain firmware
diff --git a/gui/gui_test/server_config/test_obmc_gui_network_settings.robot b/gui/gui_test/server_config/test_obmc_gui_network_settings.robot
index fa52a4c..4b4a70b 100644
--- a/gui/gui_test/server_config/test_obmc_gui_network_settings.robot
+++ b/gui/gui_test/server_config/test_obmc_gui_network_settings.robot
@@ -10,16 +10,47 @@
*** Variables ***
-${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_add_static_ip} //button[contains(text(),"Add static IP")]
-${xpath_setting_success} //*[contains(text(),"Successfully saved network settings.")]
+${xpath_network_setting_heading} //h1[text()="Network settings"]
+${xpath_interface} //h2[text()="Interface"]
+${xpath_system} //h2[text()="System"]
+${xpath_static_ipv4} //h2[text()="Static 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_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")]
*** Test Cases ***
+Verify Navigation To Network Settings Page
+ [Documentation] Verify navigation to network settings page.
+ [Tags] Verify_Navigation_To_Network_Settings_Page
+
+ Page Should Contain Element ${xpath_network_setting_heading}
+
+
+Verify Existence Of All Sections In Network Settings Page
+ [Documentation] Verify existence of all sections in network settings page.
+ [Tags] Verify_Existence_Of_All_Sections_In_Network_Settings_Page
+
+ Page Should Contain Element ${xpath_interface}
+ Page Should Contain Element ${xpath_system}
+ Page Should Contain Element ${xpath_static_ipv4}
+ Page Should Contain Element ${xpath_static_dns}
+
+
+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
+
+ 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".