Anusha Dathatri | 21ac59f | 2020-07-14 13:12:58 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 3 | Documentation Test OpenBMC GUI "Network" sub-menu of "Settings". |
Anusha Dathatri | 21ac59f | 2020-07-14 13:12:58 -0500 | [diff] [blame] | 4 | |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 5 | Resource ../../lib/gui_resource.robot |
Anves Kumar rayankula | 65e5ed2 | 2020-09-17 04:44:44 -0500 | [diff] [blame] | 6 | Resource ../../../lib/bmc_network_utils.robot |
Anusha Dathatri | 21ac59f | 2020-07-14 13:12:58 -0500 | [diff] [blame] | 7 | |
| 8 | Suite Setup Suite Setup Execution |
| 9 | Suite Teardown Close Browser |
| 10 | |
meghagn | 1bd3928 | 2021-12-19 23:56:42 -0600 | [diff] [blame] | 11 | |
Anusha Dathatri | 21ac59f | 2020-07-14 13:12:58 -0500 | [diff] [blame] | 12 | *** Variables *** |
| 13 | |
meghagn | 1bd3928 | 2021-12-19 23:56:42 -0600 | [diff] [blame] | 14 | ${xpath_network_heading} //h1[text()="Network"] |
| 15 | ${xpath_interface_settings} //h2[text()="Interface settings"] |
| 16 | ${xpath_network_settings} //h2[text()="Network settings"] |
| 17 | ${xpath_static_ipv4} //h2[text()="IPv4"] |
| 18 | ${xpath_static_dns} //h2[text()="Static DNS"] |
| 19 | ${xpath_domain_name_toggle} //*[@data-test-id="networkSettings-switch-useDomainName"] |
| 20 | ${xpath_dns_servers_toggle} //*[@data-test-id="networkSettings-switch-useDns"] |
| 21 | ${xpath_ntp_servers_toggle} //*[@data-test-id="networkSettings-switch-useNtp"] |
| 22 | ${xpath_add_static_ipv4_address_button} //button[contains(text(),"Add static IPv4 address")] |
| 23 | ${xpath_add_dns_ip_address_button} //button[contains(text(),"Add IP address")] |
meghagn | cca733c | 2021-12-20 04:34:55 -0600 | [diff] [blame] | 24 | ${xpath_hostname} //*[@title="Edit hostname"] |
| 25 | ${xpath_hostname_input} //*[@id="hostname"] |
| 26 | ${xpath_input_ip_address} //*[@id="ipAddress"] |
| 27 | ${xpath_input_gateway} //*[@id="gateway"] |
| 28 | ${xpath_input_subnetmask} //*[@id="subnetMask"] |
| 29 | ${xpath_input_static_dns} //*[@id="staticDns"] |
| 30 | ${xpath_cancel_button} //button[contains(text(),'Cancel')] |
| 31 | ${xpath_add_button} //button[contains(text(),'Add')] |
Anves Kumar rayankula | 4c88447 | 2020-11-24 05:03:45 -0600 | [diff] [blame] | 32 | |
Anves Kumar rayankula | ef4d34f | 2021-02-12 03:26:42 -0600 | [diff] [blame] | 33 | |
Anusha Dathatri | 21ac59f | 2020-07-14 13:12:58 -0500 | [diff] [blame] | 34 | *** Test Cases *** |
| 35 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 36 | Verify Navigation To Network Page |
meghagn | 1bd3928 | 2021-12-19 23:56:42 -0600 | [diff] [blame] | 37 | [Documentation] Login to GUI and navigate to the settings sub-menu network page. |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 38 | [Tags] Verify_Navigation_To_Network_Page |
Anusha Dathatri | e11a54d | 2020-08-31 08:35:47 -0500 | [diff] [blame] | 39 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 40 | Page Should Contain Element ${xpath_network_heading} |
Anusha Dathatri | e11a54d | 2020-08-31 08:35:47 -0500 | [diff] [blame] | 41 | |
| 42 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 43 | Verify Existence Of All Sections In Network Page |
meghagn | 1bd3928 | 2021-12-19 23:56:42 -0600 | [diff] [blame] | 44 | [Documentation] Login to GUI and navigate to the settings sub-menu network page |
| 45 | ... and confirm the page contains sections that should be accessible. |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 46 | [Tags] Verify_Existence_Of_All_Sections_In_Network_Page |
Anusha Dathatri | e11a54d | 2020-08-31 08:35:47 -0500 | [diff] [blame] | 47 | |
meghagn | 1bd3928 | 2021-12-19 23:56:42 -0600 | [diff] [blame] | 48 | Wait Until Page Contains Element ${xpath_network_settings} timeout=1min |
| 49 | Page Should Contain Element ${xpath_interface_settings} |
Anusha Dathatri | e11a54d | 2020-08-31 08:35:47 -0500 | [diff] [blame] | 50 | Page Should Contain Element ${xpath_static_ipv4} |
| 51 | Page Should Contain Element ${xpath_static_dns} |
| 52 | |
| 53 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 54 | Verify Existence Of All Buttons In Network Page |
meghagn | 1bd3928 | 2021-12-19 23:56:42 -0600 | [diff] [blame] | 55 | [Documentation] Login to GUI and navigate to the settings sub-menu network page |
| 56 | ... and confirm the page contains basic features button that should be accessible. |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 57 | [Tags] Verify_Existence_Of_All_Buttons_In_Network_Page |
Anusha Dathatri | e11a54d | 2020-08-31 08:35:47 -0500 | [diff] [blame] | 58 | |
meghagn | 1bd3928 | 2021-12-19 23:56:42 -0600 | [diff] [blame] | 59 | Page Should Contain Button ${xpath_add_static_ipv4_address_button} |
| 60 | Page Should Contain Button ${xpath_add_dns_ip_address_button} |
| 61 | Page Should Contain Button ${xpath_domain_name_toggle} |
| 62 | Page Should Contain Button ${xpath_dns_servers_toggle} |
| 63 | Page Should Contain Button ${xpath_ntp_servers_toggle} |
Anves Kumar rayankula | c3a37e4 | 2021-06-17 06:56:51 -0500 | [diff] [blame] | 64 | |
| 65 | |
meghagn | cca733c | 2021-12-20 04:34:55 -0600 | [diff] [blame] | 66 | Verify Existence Of All Fields In Hostname |
| 67 | [Documentation] Login to GUI and navigate to the settings sub-menu network page |
| 68 | ... and confirm hostname contains all the fields. |
| 69 | [Tags] Verify_Existence_Of_All_Fields_In_Hostname |
| 70 | [Teardown] Run Keywords Click Button ${xpath_cancel_button} AND |
| 71 | ... Wait Until Keyword Succeeds 10 sec 5 sec |
| 72 | ... Refresh GUI And Verify Element Value ${xpath_network_heading} Network |
| 73 | |
| 74 | Click Element ${xpath_hostname} |
| 75 | Wait Until Page Contains Edit hostname timeout=1min |
| 76 | Page Should Contain Textfield ${xpath_hostname_input} |
| 77 | Page Should Contain Button ${xpath_cancel_button} |
| 78 | Page Should Contain Button ${xpath_add_button} |
| 79 | |
| 80 | |
| 81 | Verify Existence Of All Fields In Static IP Address |
| 82 | [Documentation] Login to GUI and navigate to the settings sub-menu network page |
| 83 | ... and confirm section static IPv4 contains all the fields. |
| 84 | [Tags] Verify_Existence_Of_All_Fields_In_Static_IP_Address |
| 85 | [Teardown] Run Keywords Click Button ${xpath_cancel_button} AND |
| 86 | ... Wait Until Keyword Succeeds 10 sec 5 sec |
| 87 | ... Refresh GUI And Verify Element Value ${xpath_network_heading} Network |
| 88 | |
| 89 | Wait Until Keyword Succeeds 30 sec 10 sec Click Element ${xpath_add_static_ipv4_address_button} |
| 90 | Wait Until Page Contains Add static IPv4 address timeout=15s |
| 91 | Page Should Contain Textfield ${xpath_input_ip_address} |
| 92 | Page Should Contain Textfield ${xpath_input_gateway} |
| 93 | Page Should Contain Textfield ${xpath_input_subnetmask} |
| 94 | Page Should Contain Button ${xpath_cancel_button} |
| 95 | Page Should Contain Button ${xpath_add_button} |
| 96 | |
| 97 | |
| 98 | Verify Existence Of All Fields In Static DNS |
| 99 | [Documentation] Login to GUI and navigate to the settings sub-menu network page |
| 100 | ... and confirm section static DNS contains all the fields. |
| 101 | [Tags] Verify_Existence_Of_All_Fields_In_Static_DNS |
| 102 | [Teardown] Run Keywords Click Button ${xpath_cancel_button} AND |
| 103 | ... Wait Until Keyword Succeeds 10 sec 5 sec |
| 104 | ... Refresh GUI And Verify Element Value ${xpath_network_heading} Network |
| 105 | |
| 106 | Wait Until Keyword Succeeds 30 sec 10 sec Click Element ${xpath_add_dns_ip_address_button} |
| 107 | Wait Until Page Contains Add IP address timeout=11s |
| 108 | Page Should Contain Textfield ${xpath_input_static_dns} |
| 109 | Page Should Contain Button ${xpath_cancel_button} |
| 110 | Page Should Contain Button ${xpath_add_button} |
| 111 | |
| 112 | |
Anusha Dathatri | 21ac59f | 2020-07-14 13:12:58 -0500 | [diff] [blame] | 113 | *** Keywords *** |
| 114 | |
| 115 | Suite Setup Execution |
meghagn | 1bd3928 | 2021-12-19 23:56:42 -0600 | [diff] [blame] | 116 | [Documentation] Do suite setup tasks. |
Anusha Dathatri | 21ac59f | 2020-07-14 13:12:58 -0500 | [diff] [blame] | 117 | |
| 118 | Launch Browser And Login GUI |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 119 | Click Element ${xpath_settings_menu} |
| 120 | Click Element ${xpath_network_sub_menu} |
| 121 | Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain network |