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