blob: cc3c6ce935c88c8c92525d75cdefe3c7f2e53287 [file] [log] [blame]
Anusha Dathatri21ac59f2020-07-14 13:12:58 -05001*** Settings ***
2
Rahul Maheshwari142642d2021-08-24 00:00:15 -05003Documentation Test OpenBMC GUI "Network" sub-menu of "Settings".
Anusha Dathatri21ac59f2020-07-14 13:12:58 -05004
Rahul Maheshwari41747da2020-11-17 09:09:52 -06005Resource ../../lib/gui_resource.robot
Anves Kumar rayankula65e5ed22020-09-17 04:44:44 -05006Resource ../../../lib/bmc_network_utils.robot
Anusha Dathatri21ac59f2020-07-14 13:12:58 -05007
8Suite Setup Suite Setup Execution
9Suite Teardown Close Browser
10
meghagn1bd39282021-12-19 23:56:42 -060011
Anusha Dathatri21ac59f2020-07-14 13:12:58 -050012*** Variables ***
13
meghagn1bd39282021-12-19 23:56:42 -060014${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")]
Anves Kumar rayankula4c884472020-11-24 05:03:45 -060024
Anves Kumar rayankulaef4d34f2021-02-12 03:26:42 -060025
Anusha Dathatri21ac59f2020-07-14 13:12:58 -050026*** Test Cases ***
27
Rahul Maheshwari142642d2021-08-24 00:00:15 -050028Verify Navigation To Network Page
meghagn1bd39282021-12-19 23:56:42 -060029 [Documentation] Login to GUI and navigate to the settings sub-menu network page.
Rahul Maheshwari142642d2021-08-24 00:00:15 -050030 [Tags] Verify_Navigation_To_Network_Page
Anusha Dathatrie11a54d2020-08-31 08:35:47 -050031
Rahul Maheshwari142642d2021-08-24 00:00:15 -050032 Page Should Contain Element ${xpath_network_heading}
Anusha Dathatrie11a54d2020-08-31 08:35:47 -050033
34
Rahul Maheshwari142642d2021-08-24 00:00:15 -050035Verify Existence Of All Sections In Network Page
meghagn1bd39282021-12-19 23:56:42 -060036 [Documentation] Login to GUI and navigate to the settings sub-menu network page
37 ... and confirm the page contains sections that should be accessible.
Rahul Maheshwari142642d2021-08-24 00:00:15 -050038 [Tags] Verify_Existence_Of_All_Sections_In_Network_Page
Anusha Dathatrie11a54d2020-08-31 08:35:47 -050039
meghagn1bd39282021-12-19 23:56:42 -060040 Wait Until Page Contains Element ${xpath_network_settings} timeout=1min
41 Page Should Contain Element ${xpath_interface_settings}
Anusha Dathatrie11a54d2020-08-31 08:35:47 -050042 Page Should Contain Element ${xpath_static_ipv4}
43 Page Should Contain Element ${xpath_static_dns}
44
45
Rahul Maheshwari142642d2021-08-24 00:00:15 -050046Verify Existence Of All Buttons In Network Page
meghagn1bd39282021-12-19 23:56:42 -060047 [Documentation] Login to GUI and navigate to the settings sub-menu network page
48 ... and confirm the page contains basic features button that should be accessible.
Rahul Maheshwari142642d2021-08-24 00:00:15 -050049 [Tags] Verify_Existence_Of_All_Buttons_In_Network_Page
Anusha Dathatrie11a54d2020-08-31 08:35:47 -050050
meghagn1bd39282021-12-19 23:56:42 -060051 Page Should Contain Button ${xpath_add_static_ipv4_address_button}
52 Page Should Contain Button ${xpath_add_dns_ip_address_button}
53 Page Should Contain Button ${xpath_domain_name_toggle}
54 Page Should Contain Button ${xpath_dns_servers_toggle}
55 Page Should Contain Button ${xpath_ntp_servers_toggle}
Anves Kumar rayankulac3a37e42021-06-17 06:56:51 -050056
57
Anusha Dathatri21ac59f2020-07-14 13:12:58 -050058*** Keywords ***
59
60Suite Setup Execution
meghagn1bd39282021-12-19 23:56:42 -060061 [Documentation] Do suite setup tasks.
Anusha Dathatri21ac59f2020-07-14 13:12:58 -050062
63 Launch Browser And Login GUI
Rahul Maheshwari142642d2021-08-24 00:00:15 -050064 Click Element ${xpath_settings_menu}
65 Click Element ${xpath_network_sub_menu}
66 Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain network