Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Test OpenBMC GUI "Overview" menu. |
| 4 | |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 5 | Resource ../../lib/gui_resource.robot |
manashsarma | 2544cb1 | 2020-08-23 14:25:08 -0500 | [diff] [blame] | 6 | Resource ../../../lib/logging_utils.robot |
manashsarma | fb35366 | 2020-08-27 05:12:04 -0500 | [diff] [blame] | 7 | Resource ../../../lib/list_utils.robot |
manashsarma | 6d584de | 2020-08-30 02:33:07 -0500 | [diff] [blame] | 8 | Resource ../../../lib/bmc_network_utils.robot |
| 9 | |
| 10 | Library String |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 11 | |
| 12 | Suite Setup Launch Browser And Login GUI |
| 13 | Suite Teardown Close Browser |
| 14 | Test Setup Test Setup Execution |
| 15 | |
| 16 | |
| 17 | *** Variables *** |
| 18 | |
manashsarma | 43568c2 | 2020-08-19 12:16:24 -0500 | [diff] [blame] | 19 | ${xpath_overview_page_header} //h1[contains(text(), "Overview")] |
rramyasr-in | 22ed4ae | 2021-12-03 04:50:41 -0600 | [diff] [blame] | 20 | ${xpath_edit_network_settings_button} (//*[text()="View more"])[3] |
| 21 | ${view_all_event_logs} (//*[text()="View more"])[5] |
manashsarma | a3a2536 | 2020-08-23 09:23:28 -0500 | [diff] [blame] | 22 | ${xpath_launch_serial_over_lan} //*[@data-test-id='overviewQuickLinks-button-solConsole'] |
rramyasr-in | 00b5545 | 2021-12-01 23:47:03 -0600 | [diff] [blame] | 23 | ${xpath_led_button} //*[@data-test-id='overviewInventory-checkbox-identifyLed'] |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 24 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 25 | |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 26 | *** Test Cases *** |
| 27 | |
| 28 | Verify Existence Of All Sections In Overview Page |
| 29 | [Documentation] Verify existence of all sections in Overview page. |
| 30 | [Tags] Verify_Existence_Of_All_Sections_In_Overview_Page |
| 31 | |
rramyasr-in | 532c37f | 2021-12-03 03:39:14 -0600 | [diff] [blame] | 32 | Page Should Contain BMC time |
Ashwini Chandrappa | 516f70d | 2021-12-14 01:21:29 -0600 | [diff] [blame] | 33 | Page Should Contain Firmware information |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 34 | Page Should Contain Server information |
Ashwini Chandrappa | 516f70d | 2021-12-14 01:21:29 -0600 | [diff] [blame] | 35 | Wait Until Page Contains Network information timeout=10 |
rramyasr-in | 532c37f | 2021-12-03 03:39:14 -0600 | [diff] [blame] | 36 | Page Should Contain Power information |
| 37 | Page Should Contain Event logs |
| 38 | Page Should Contain Inventory and LEDs |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 39 | |
manashsarma | 6d584de | 2020-08-30 02:33:07 -0500 | [diff] [blame] | 40 | Verify Network Information In Overview Page |
| 41 | [Documentation] Verify values under network information section. |
George Keishing | f924895 | 2021-05-28 07:52:37 -0500 | [diff] [blame] | 42 | [Tags] Verify_Network_Information_In_Overview_Page |
manashsarma | 6d584de | 2020-08-30 02:33:07 -0500 | [diff] [blame] | 43 | |
| 44 | ${hostname}= Get BMC Hostname |
| 45 | Page Should Contain ${hostname} |
| 46 | |
| 47 | # Get all IP addresses and prefix lengths on system. |
| 48 | |
| 49 | ${ip_addr_list}= Get BMC IP Info |
| 50 | FOR ${ip_address} IN @{ip_addr_list} |
| 51 | ${ip}= Fetch From Left ${ip_address} \/ |
| 52 | Page Should Contain ${ip} |
| 53 | END |
| 54 | |
| 55 | ${macaddr}= Get BMC MAC Address |
| 56 | Page Should Contain ${macaddr} |
| 57 | |
| 58 | |
| 59 | Verify Message In High Priority Events Section For No Events |
| 60 | [Documentation] Verify message under high priority events section in case of no events. |
| 61 | [Tags] Verify_Message_In_High_Priority_Events_Section_For_No_Events |
| 62 | |
| 63 | Redfish Purge Event Log |
| 64 | Click Element ${xpath_refresh_button} |
| 65 | Wait Until Page Contains no high priority events to display timeout=10 |
| 66 | |
| 67 | |
manashsarma | e18f99e | 2020-08-28 10:12:57 -0500 | [diff] [blame] | 68 | Verify Server Information Section |
| 69 | [Documentation] Verify values under server information section in overview page. |
| 70 | [Tags] Verify_Server_Information_Section |
| 71 | |
| 72 | ${redfish_machine_model}= Redfish.Get Attribute /redfish/v1/Systems/system/ Model |
| 73 | Page Should Contain ${redfish_machine_model} |
| 74 | |
| 75 | ${redfish_serial_number}= Redfish.Get Attribute /redfish/v1/Systems/system/ SerialNumber |
| 76 | Page Should Contain ${redfish_serial_number} |
| 77 | |
| 78 | ${redfish_motherboard_manufacturer}= Redfish.Get Attribute |
manashsarma | 58de7d7 | 2020-09-07 21:05:21 -0500 | [diff] [blame] | 79 | ... /redfish/v1/Systems/system/ Manufacturer |
manashsarma | e18f99e | 2020-08-28 10:12:57 -0500 | [diff] [blame] | 80 | |
| 81 | Page Should Contain ${redfish_motherboard_manufacturer} |
| 82 | |
| 83 | |
manashsarma | 554ddec | 2020-08-26 00:46:02 -0500 | [diff] [blame] | 84 | Verify BMC Information Section |
| 85 | [Documentation] Verify BMC information section in overview page. |
| 86 | [Tags] Verify_BMC_Information_Section |
| 87 | |
| 88 | ${firmware_version}= Redfish Get BMC Version |
| 89 | Page Should Contain ${firmware_version} |
| 90 | |
| 91 | |
manashsarma | 43568c2 | 2020-08-19 12:16:24 -0500 | [diff] [blame] | 92 | Verify Edit Network Setting Button |
| 93 | [Documentation] Verify navigation to network setting page after clicking the button in overview page. |
| 94 | [Tags] Verify_Edit_Network_Setting_Button |
| 95 | |
| 96 | Click Element ${xpath_edit_network_settings_button} |
| 97 | Wait Until Page Contains Element ${xpath_network_page_header} |
| 98 | |
| 99 | |
manashsarma | fb35366 | 2020-08-27 05:12:04 -0500 | [diff] [blame] | 100 | Verify Event Under High Priority Events Section |
| 101 | [Documentation] Verify event under high priority events section in case of any event. |
| 102 | [Tags] Verify_Event_Under_High_Priority_Events_Section |
| 103 | |
| 104 | Redfish Purge Event Log |
| 105 | Click Element ${xpath_refresh_button} |
| 106 | Generate Test Error Log |
Ashwini Chandrappa | 243a1f2 | 2021-07-26 01:10:04 -0500 | [diff] [blame] | 107 | Click Element ${xpath_refresh_button} |
manashsarma | fb35366 | 2020-08-27 05:12:04 -0500 | [diff] [blame] | 108 | Wait Until Page Contains xyz.openbmc_project.Common.Error.InternalFailure timeout=30s |
| 109 | |
| 110 | |
manashsarma | 7d0a412 | 2020-08-23 13:41:03 -0500 | [diff] [blame] | 111 | Verify View All Event Logs Button |
| 112 | [Documentation] Verify view all event log button in overview page. |
| 113 | [Tags] Verify_View_All_Event_Logs_Button |
| 114 | |
| 115 | Generate Test Error Log |
| 116 | Page Should Contain Element ${view_all_event_logs} timeout=30 |
| 117 | Click Element ${view_all_event_logs} |
| 118 | Wait Until Page Contains Element ${xpath_event_header} timeout=30 |
| 119 | |
| 120 | |
manashsarma | a3a2536 | 2020-08-23 09:23:28 -0500 | [diff] [blame] | 121 | Verify Serial Over LAN Console Button In Overview Page |
| 122 | [Documentation] Click serial over LAN button and verify page navigation to serial over LAN page. |
| 123 | [Tags] Verify_Serial_Over_LAN_Console_Button_In_Overview_Page |
| 124 | |
| 125 | Click Element ${xpath_launch_serial_over_lan} |
Rahul Maheshwari | b037426 | 2020-11-02 01:38:31 -0600 | [diff] [blame] | 126 | Wait Until Page Contains Element ${xpath_sol_console_heading} |
manashsarma | a3a2536 | 2020-08-23 09:23:28 -0500 | [diff] [blame] | 127 | |
| 128 | |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 129 | Verify Server LED Turn On |
| 130 | [Documentation] Turn on server LED via GUI and verify its status via Redfish. |
| 131 | [Tags] Verify_Server_LED_Turn_On |
| 132 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 133 | # Turn Off the server LED via Redfish and refresh GUI. |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 134 | Redfish.Patch /redfish/v1/Systems/system body={"IndicatorLED":"Off"} valid_status_codes=[200, 204] |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 135 | Refresh GUI |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 136 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 137 | # Turn ON the LED via GUI. |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 138 | Click Element At Coordinates ${xpath_led_button} 0 0 |
| 139 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 140 | # Cross check that server LED ON state via Redfish. |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 141 | ${led_status}= Redfish.Get Attribute /redfish/v1/Systems/system IndicatorLED |
| 142 | Should Be True '${led_status}' == 'Lit' |
| 143 | |
| 144 | |
| 145 | Verify Server LED Turn Off |
| 146 | [Documentation] Turn off server LED via GUI and verify its status via Redfish. |
| 147 | [Tags] Verify_Server_LED_Turn_Off |
| 148 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 149 | # Turn On the server LED via Redfish and refresh GUI. |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 150 | Redfish.Patch /redfish/v1/Systems/system body={"IndicatorLED":"Lit"} valid_status_codes=[200, 204] |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 151 | Refresh GUI |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 152 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 153 | # Turn OFF the LED via GUI. |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 154 | Click Element At Coordinates ${xpath_led_button} 0 0 |
| 155 | |
| 156 | # Cross check that server LED off state via Redfish. |
| 157 | ${led_status}= Redfish.Get Attribute /redfish/v1/Systems/system IndicatorLED |
| 158 | Should Be True '${led_status}' == 'Off' |
| 159 | |
| 160 | |
manashsarma | 65c9e14 | 2020-08-23 07:27:52 -0500 | [diff] [blame] | 161 | Verify BMC Time In Overview Page |
| 162 | [Documentation] Verify that BMC date from GUI matches with BMC time via Redfish. |
| 163 | [Tags] Verify_BMC_Time_In_Overview_Page |
| 164 | |
| 165 | ${date_time}= Redfish.Get Attribute ${REDFISH_BASE_URI}Managers/bmc DateTime |
| 166 | ${converted_date}= Convert Date ${date_time} result_format=%Y-%m-%d |
| 167 | |
| 168 | Page Should Contain ${converted_date} |
| 169 | |
| 170 | |
manashsarma | 43458ff | 2021-08-17 05:42:47 -0500 | [diff] [blame] | 171 | Verify BMC Information At Host Power Off State |
| 172 | [Documentation] Verify that BMC information is displayed at host power off state. |
| 173 | [Tags] Verify_BMC_Information_At_Host_Power_Off_State |
| 174 | |
| 175 | Redfish Power Off stack_mode=skip |
| 176 | ${firmware_version}= Redfish Get BMC Version |
| 177 | Page Should Contain ${firmware_version} |
| 178 | |
| 179 | |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 180 | *** Keywords *** |
| 181 | |
| 182 | Test Setup Execution |
| 183 | [Documentation] Do test case setup tasks. |
| 184 | |
| 185 | Click Element ${xpath_overview_menu} |
| 186 | Wait Until Page Contains Element ${xpath_overview_page_header} |