blob: cc3c6ce935c88c8c92525d75cdefe3c7f2e53287 [file] [log] [blame]
*** Settings ***
Documentation Test OpenBMC GUI "Network" sub-menu of "Settings".
Resource ../../lib/gui_resource.robot
Resource ../../../lib/bmc_network_utils.robot
Suite Setup Suite Setup Execution
Suite Teardown Close Browser
*** Variables ***
${xpath_network_heading} //h1[text()="Network"]
${xpath_interface_settings} //h2[text()="Interface settings"]
${xpath_network_settings} //h2[text()="Network settings"]
${xpath_static_ipv4} //h2[text()="IPv4"]
${xpath_static_dns} //h2[text()="Static DNS"]
${xpath_domain_name_toggle} //*[@data-test-id="networkSettings-switch-useDomainName"]
${xpath_dns_servers_toggle} //*[@data-test-id="networkSettings-switch-useDns"]
${xpath_ntp_servers_toggle} //*[@data-test-id="networkSettings-switch-useNtp"]
${xpath_add_static_ipv4_address_button} //button[contains(text(),"Add static IPv4 address")]
${xpath_add_dns_ip_address_button} //button[contains(text(),"Add IP address")]
*** Test Cases ***
Verify Navigation To Network Page
[Documentation] Login to GUI and navigate to the settings sub-menu network page.
[Tags] Verify_Navigation_To_Network_Page
Page Should Contain Element ${xpath_network_heading}
Verify Existence Of All Sections In Network Page
[Documentation] Login to GUI and navigate to the settings sub-menu network page
... and confirm the page contains sections that should be accessible.
[Tags] Verify_Existence_Of_All_Sections_In_Network_Page
Wait Until Page Contains Element ${xpath_network_settings} timeout=1min
Page Should Contain Element ${xpath_interface_settings}
Page Should Contain Element ${xpath_static_ipv4}
Page Should Contain Element ${xpath_static_dns}
Verify Existence Of All Buttons In Network Page
[Documentation] Login to GUI and navigate to the settings sub-menu network page
... and confirm the page contains basic features button that should be accessible.
[Tags] Verify_Existence_Of_All_Buttons_In_Network_Page
Page Should Contain Button ${xpath_add_static_ipv4_address_button}
Page Should Contain Button ${xpath_add_dns_ip_address_button}
Page Should Contain Button ${xpath_domain_name_toggle}
Page Should Contain Button ${xpath_dns_servers_toggle}
Page Should Contain Button ${xpath_ntp_servers_toggle}
*** Keywords ***
Suite Setup Execution
[Documentation] Do suite setup tasks.
Launch Browser And Login GUI
Click Element ${xpath_settings_menu}
Click Element ${xpath_network_sub_menu}
Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain network