blob: a6fea78025667559dd5300143e35f0e7435c8622 [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")]
meghagncca733c2021-12-20 04:34:55 -060024${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 rayankula4c884472020-11-24 05:03:45 -060032
Anves Kumar rayankulaef4d34f2021-02-12 03:26:42 -060033
Anusha Dathatri21ac59f2020-07-14 13:12:58 -050034*** Test Cases ***
35
Rahul Maheshwari142642d2021-08-24 00:00:15 -050036Verify Navigation To Network Page
meghagn1bd39282021-12-19 23:56:42 -060037 [Documentation] Login to GUI and navigate to the settings sub-menu network page.
Rahul Maheshwari142642d2021-08-24 00:00:15 -050038 [Tags] Verify_Navigation_To_Network_Page
Anusha Dathatrie11a54d2020-08-31 08:35:47 -050039
Rahul Maheshwari142642d2021-08-24 00:00:15 -050040 Page Should Contain Element ${xpath_network_heading}
Anusha Dathatrie11a54d2020-08-31 08:35:47 -050041
42
Rahul Maheshwari142642d2021-08-24 00:00:15 -050043Verify Existence Of All Sections In Network Page
meghagn1bd39282021-12-19 23:56:42 -060044 [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 Maheshwari142642d2021-08-24 00:00:15 -050046 [Tags] Verify_Existence_Of_All_Sections_In_Network_Page
Anusha Dathatrie11a54d2020-08-31 08:35:47 -050047
meghagn1bd39282021-12-19 23:56:42 -060048 Wait Until Page Contains Element ${xpath_network_settings} timeout=1min
49 Page Should Contain Element ${xpath_interface_settings}
Anusha Dathatrie11a54d2020-08-31 08:35:47 -050050 Page Should Contain Element ${xpath_static_ipv4}
51 Page Should Contain Element ${xpath_static_dns}
52
53
Rahul Maheshwari142642d2021-08-24 00:00:15 -050054Verify Existence Of All Buttons In Network Page
meghagn1bd39282021-12-19 23:56:42 -060055 [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 Maheshwari142642d2021-08-24 00:00:15 -050057 [Tags] Verify_Existence_Of_All_Buttons_In_Network_Page
Anusha Dathatrie11a54d2020-08-31 08:35:47 -050058
meghagn1bd39282021-12-19 23:56:42 -060059 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 rayankulac3a37e42021-06-17 06:56:51 -050064
65
meghagncca733c2021-12-20 04:34:55 -060066Verify 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
81Verify 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
98Verify 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 Dathatri21ac59f2020-07-14 13:12:58 -0500113*** Keywords ***
114
115Suite Setup Execution
meghagn1bd39282021-12-19 23:56:42 -0600116 [Documentation] Do suite setup tasks.
Anusha Dathatri21ac59f2020-07-14 13:12:58 -0500117
118 Launch Browser And Login GUI
Rahul Maheshwari142642d2021-08-24 00:00:15 -0500119 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