blob: fd79065610b9695f257775ce88effc4267eb4602 [file] [log] [blame]
Sivas SRR008dcc62018-02-27 06:34:56 -06001*** Settings ***
2
3Documentation Test Open BMC GUI server health under GUI Header.
4
5Resource ../../lib/resource.robot
6Resource ../../../../lib/boot_utils.robot
Sivas SRRbe026912018-03-14 11:33:02 -05007Resource ../../../../lib/utils.robot
8Resource ../../../../lib/openbmc_ffdc.robot
9Resource ../../../../lib/state_manager.robot
10Resource ../../../../lib/openbmc_ffdc_methods.robot
11Resource ../../../../lib/dump_utils.robot
Sivas SRRcf6714f2018-03-26 10:51:29 -050012Resource ../../../../lib/logging_utils.robot
Sivas SRR2631b632018-04-04 11:33:21 -050013Library ../../../../lib/gen_robot_keyword.py
Sivas SRR008dcc62018-02-27 06:34:56 -060014
Sivas SRRbe026912018-03-14 11:33:02 -050015Test Setup Test Setup Execution
16Test Teardown Test Teardown Execution
17
Sivas SRR008dcc62018-02-27 06:34:56 -060018
19*** Test Cases ***
20
21Verify Event Log Text Appears By Clicking Server Health
22 [Documentation] Check that "Event Log" text appears by clicking server
23 ... health in GUI header.
24 [Tags] Verify_Event_Log_Text_Appears_By_Clicking_Server_Health
25
26 Wait Until Page Contains Element event-log
27 Page should contain Event log
28
29
30Verify Filters By Severity Elements Appears
Sivas SRR179208e2018-03-01 04:08:23 -060031 [Documentation] Check that the "event log" filters appears by clicking
32 ... server health in GUI header.
Sivas SRR008dcc62018-02-27 06:34:56 -060033 [Tags] Verify_Filters_By_Severity_Elements_Appears
34
35 # Types of event severity: All, High, Medium, Low.
36 Page Should Contain Element ${xpath_event_severity_all} limit=1
37 Page Should Contain Element ${xpath_event_severity_high} limit=1
38 Page Should Contain Element ${xpath_event_severity_medium} limit=1
39 Page Should Contain Element ${xpath_event_severity_low} limit=1
40
41
42Verify Drop Down Button User Timezone Appears
Sivas SRR179208e2018-03-01 04:08:23 -060043 [Documentation] Check that the "drop down" button of user timezone appears
44 ... by clicking server health in GUI header.
Sivas SRR008dcc62018-02-27 06:34:56 -060045 [Tags] Verify_Drop_Down_Button_User_Timezone_Appears
46
47 Page Should Contain Button ${xpath_drop_down_timezone_edt}
48 # Ensure that page is not in refreshing state.
49 # It helps to click the drop down element.
50 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
Rahul Maheshwaribc7adca2018-11-26 01:13:41 -060051 Click Element //*[@class='dropdown__button']
Sivas SRR008dcc62018-02-27 06:34:56 -060052 Page Should Contain Button ${xpath_drop_down_timezone_utc}
53
Sivas SRR179208e2018-03-01 04:08:23 -060054
55Verify Content Search Element Appears
56 [Documentation] Check that the "event search element is available with
57 ... filter" button appears.
58 [Tags] Verify_Content_Search_Element_Appears
59
60 Page Should Contain Element content__search-input limit=1
61 # Ensure that page is not in refreshing state.
62 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
63 Page Should Contain Button content__search-submit
64
65
66Verify Filter By Date Element Appears
67 [Documentation] Check that the "filter by date" elements are available and
68 ... visible.
69 [Tags] Verify_Filter_By_Date_Element_Appears
70
71 Wait Until Element Is Visible event-filter-start-date
72 Page Should Contain Element event-filter-start-date limit=1
73 Page Should Contain Element event-filter-end-date limit=1
74
75
76Verify Filter By Event Status Element Appears
77 [Documentation] Check that the "filter by event status" element appears.
78 [Tags] Verify_Filter_By_Event_Status_Element_Appears
79
80 # Ensure that page is not in refreshing state.
81 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
Rahul Maheshwaribc7adca2018-11-26 01:13:41 -060082 Wait Until Element is Visible //*[@class='dropdown__wrapper']
83 Click Element //*[@class='dropdown__wrapper']
Sivas SRR179208e2018-03-01 04:08:23 -060084 Page Should Contain Element ${xpath_event_filter_all} limit=1
85 Page Should Contain Element ${xpath_event_filter_resolved} limit=1
86 Page Should Contain Element ${xpath_event_filter_unresolved} limit=1
Sivas SRR162bf482018-03-02 07:01:16 -060087
88
89Verify Event Action Bar Element Appears
90 [Documentation] Check that "event action bar" element appears.
91 [Tags] Verify_Event_Action_Bar_Element_Appears
92
93 # Ensure that page is not in refreshing state.
94 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
95 Page Should Contain Element ${xpath_event_action_bars} limit=1
Rahul Maheshwaribc7adca2018-11-26 01:13:41 -060096 Page Should Contain Element //*[@class='control__indicator']
Sivas SRR162bf482018-03-02 07:01:16 -060097
98
99Verify Click Events Check Box
100 [Documentation] Check that "event check box" element appears and on click
101 ... should be able to see elements like "Delete" button and "Export"
102 ... element.
103 [Tags] Verify_Click_Events_Check_Box
104
105 # Ensure that page is not in refreshing state.
106 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
Rahul Maheshwaribc7adca2018-11-26 01:13:41 -0600107 Click Element //*[@class='control__indicator']
Sivas SRR162bf482018-03-02 07:01:16 -0600108 Page Should Contain Button ${xpath_event_action_delete} limit=1
109 Page Should Contain Element ${xpath_event_action_export} limit=1
110
111
112Verify Number of Events Appears
113 [Documentation] Check that "number of events" element appears and value is
114 ... visible.
115 [Tags] Verify_Number_of_Events_Appears
116
117 # Ensure that page is not in refreshing state.
118 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
119 Page Should Contain Element ${xpath_number_of_events}
120 ${number_of_events}= Get Text ${xpath_number_of_events}
121 Log To Console \n Number of Events:${number_of_events}
Sivas SRRbe026912018-03-14 11:33:02 -0500122
123
124Select All Error Logs And Mark As Resolved
125 [Documentation] Select all error logs and mark them as resolved.
126 [Tags] Select_All_Error_Logs_And_Mark_As_Resolved
127
128 Create Test Error Log
129 Create Test Error Log
130 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
131 Page Should Contain Element ${xpath_number_of_events}
132 ${number_of_events}= Get Text ${xpath_number_of_events}
Rahul Maheshwaribc7adca2018-11-26 01:13:41 -0600133 Click Element //*[@class='control__indicator']
Sivas SRRbe026912018-03-14 11:33:02 -0500134 Run Keyword If ${number_of_events} > 0
135 ... Click Element ${xpath_mark_as_resolved}
136 Element Should Be Disabled ${xpath_mark_as_resolved}
137
138
139Select All Error Logs And Click Export
140 [Documentation] Select all error logs and click export element.
141 [Tags] Select_All_Error_Logs_And_Click_Export
142
143 Create Test Error Log
144 Create Test Error Log
145 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
146 Page Should Contain Element ${xpath_number_of_events}
147 ${number_of_events}= Get Text ${xpath_number_of_events}
Rahul Maheshwaribc7adca2018-11-26 01:13:41 -0600148 Click Element //*[@class='control__indicator']
Sivas SRRbe026912018-03-14 11:33:02 -0500149 Page Should Contain Element ${xpath_events_export}
150 Run Keyword If ${number_of_events} > 0
151 ... Click Element ${xpath_events_export}
152
153
154Select All Error Logs And Delete
155 [Documentation] Select all error logs and delete them.
156 [Tags] Select_All_Error_Logs_And_Delete
157
158 Create Test Error Log
159 Create Test Error Log
160 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
161 Page Should Contain Element ${xpath_number_of_events}
162 ${number_of_events}= Get Text ${xpath_number_of_events}
Rahul Maheshwaribc7adca2018-11-26 01:13:41 -0600163 Click Element //*[@class='control__indicator']
Sivas SRRbe026912018-03-14 11:33:02 -0500164 Page Should Contain Button ${xpath_event_action_delete}
165 Run Keyword If ${number_of_events} > 0
166 ... Click Element ${xpath_event_action_delete}
167 ${number_of_events}= Get Text ${xpath_number_of_events}
168 Should Be Equal ${number_of_events} 0
169
170
Sivas SRR2631b632018-04-04 11:33:21 -0500171Select Single Error Log And Delete
172 [Documentation] Select single error log and delete it.
173 [Tags] Select_Single_Error_Log_And_Delete
174
175 Create Test Error Log
176 # Refresh the GUI to get the latest update.
177 Click Element ${xpath_select_refresh_button}
178 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
179 Page Should Contain Element ${xpath_number_of_events}
180 ${number_of_events}= Get Text ${xpath_number_of_events}
181 Run Keyword If ${number_of_events} > 0
182 ... Common Event Log Click Element ${xpath_individual_event_delete}
Rahul Maheshwari65f69442018-11-27 04:43:00 -0600183 ... ${xpath_yes_button}
Sivas SRR2631b632018-04-04 11:33:21 -0500184 ${number_of_events}= Get Text ${xpath_number_of_events}
185 Should Be Equal ${number_of_events} 0
186 ... msg=Failed to delete single error log entry.
187
188
189Select Multiple Error Logs And Delete
190 [Documentation] Select multiple error logs and delete them.
191 [Tags] Select_Multiple_Error_Logs_And_Delete
192
193 Create Test Error Log
194 Create Test Error Log
195 # Refresh the GUI to get the latest update.
196 Click Element ${xpath_select_refresh_button}
197 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
198 Page Should Contain Element ${xpath_number_of_events}
199 ${number_of_events}= Get Text ${xpath_number_of_events}
200 Run Keyword If ${number_of_events} > 0
Sivas SRR1a94d002018-04-06 08:48:58 -0500201 ... Double Event Log Click Element ${xpath_individual_event_delete}
Rahul Maheshwari65f69442018-11-27 04:43:00 -0600202 ... ${xpath_yes_button}
Sivas SRR2631b632018-04-04 11:33:21 -0500203 ${number_of_events}= Get Text ${xpath_number_of_events}
204 Should Be Equal ${number_of_events} 0
205 ... msg=Failed to delete multiple error log entries.
206
207
208Select Single Error Log And Mark As Resolved
209 [Documentation] Select single error log and mark as resolved.
210 [Tags] Select_Single_Error_Log_And_Mark_As_Resolved
211
212 Create Test Error Log
Sivas SRR1a94d002018-04-06 08:48:58 -0500213 # Refresh the GUI to get the latest update.
Sivas SRR2631b632018-04-04 11:33:21 -0500214 Click Element ${xpath_select_refresh_button}
215 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
216 Page Should Contain Element ${xpath_number_of_events}
217 ${number_of_events}= Get Text ${xpath_number_of_events}
218 Run Keyword If ${number_of_events} > 0
Rahul Maheshwari65f69442018-11-27 04:43:00 -0600219 ... Common Event Log Click Element ${xpath_individual_event_resolved}
Sivas SRR2631b632018-04-04 11:33:21 -0500220 ${number_of_events}= Get Text ${xpath_number_of_events}
221 Should Be Equal ${number_of_events} 1
222 ... msg=Failed to mark single error log entry as resolved.
223
Sivas SRR1a94d002018-04-06 08:48:58 -0500224
225Select Multiple Error Logs And Mark As Resolved
226 [Documentation] Select multiple error logs and mark as resolved.
227 [Tags] Select_Multiple_Error_Logs_And_Mark_As_Resolved
228
229 Create Test Error Log
230 Create Test Error Log
231 # Refresh the GUI to get the latest update.
232 Click Element ${xpath_select_refresh_button}
233 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
234 Page Should Contain Element ${xpath_number_of_events}
235 ${number_of_events}= Get Text ${xpath_number_of_events}
236 Run Keyword If ${number_of_events} > 0
Rahul Maheshwari65f69442018-11-27 04:43:00 -0600237 ... Double Event Log Click Element ${xpath_individual_event_resolved}
Sivas SRR1a94d002018-04-06 08:48:58 -0500238 ${number_of_events}= Get Text ${xpath_number_of_events}
239 Should Be Equal ${number_of_events} 2
240 ... msg=Failed to mark multiple error log entries as resolved.
241
242
243Select Single Error Log And Export
244 [Documentation] Select single error log and export.
245 [Tags] Select_Single_Error_Log_And_Export
246
247 Create Test Error Log
248 # Refresh the GUI to get the latest update.
249 Click Element ${xpath_select_refresh_button}
250 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
251 Page Should Contain Element ${xpath_number_of_events}
252 ${number_of_events}= Get Text ${xpath_number_of_events}
253 Run Keyword If ${number_of_events} > 0
Rahul Maheshwari65f69442018-11-27 04:43:00 -0600254 ... Common Event Log Click Element ${xpath_individual_event_export}
Sivas SRR1a94d002018-04-06 08:48:58 -0500255 ${number_of_events}= Get Text ${xpath_number_of_events}
256 Should Be Equal ${number_of_events} 1
257 ... msg=Failed to export single error log entry.
258
259
260Select Multiple Error Log And Export
261 [Documentation] Select multiple error log and export.
262 [Tags] Select_Multiple_Error_Log_And_Export
263
264 Create Test Error Log
265 Create Test Error Log
266 # Refresh the GUI to get the latest update.
267 Click Element ${xpath_select_refresh_button}
268 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
269 Page Should Contain Element ${xpath_number_of_events}
270 ${number_of_events}= Get Text ${xpath_number_of_events}
271 Run Keyword If ${number_of_events} > 0
Rahul Maheshwari65f69442018-11-27 04:43:00 -0600272 ... Double Event Log Click Element ${xpath_individual_event_export}
Sivas SRR1a94d002018-04-06 08:48:58 -0500273 ${number_of_events}= Get Text ${xpath_number_of_events}
274 Should Be Equal ${number_of_events} 2
275 ... msg=Failed to export multiple error log entries.
276
Sivas SRRbe026912018-03-14 11:33:02 -0500277*** Keywords ***
278
Sivas SRR2631b632018-04-04 11:33:21 -0500279Common Event Log Click Element
280 [Documentation] Keep common click elements associated with event log.
Rahul Maheshwari65f69442018-11-27 04:43:00 -0600281 [Arguments] ${action_element} ${action_click_confirmation}=${None}
Sivas SRR2631b632018-04-04 11:33:21 -0500282
283 # Description of argument(s):
Sivas SRR1a94d002018-04-06 08:48:58 -0500284 # action_element xpath value of the element to be actioned
285 # (e.g. "Delete" or "Resolved" or "Export").
286 # action_click_confirmation Confirmation of action by pressing yes
287 # (e.g. "Yes" or "No").
Sivas SRR2631b632018-04-04 11:33:21 -0500288
289 Click Element ${xpath_individual_event_select}
Sivas SRR1a94d002018-04-06 08:48:58 -0500290 Page Should Contain Element ${action_element}
Sivas SRR2631b632018-04-04 11:33:21 -0500291 Click Element ${action_element}
292 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
Rahul Maheshwari65f69442018-11-27 04:43:00 -0600293 Run Keyword If "${action_click_confirmation}" != "${None}"
Sivas SRR2631b632018-04-04 11:33:21 -0500294 ... Click Element ${action_click_confirmation}
295 Click Element ${xpath_select_refresh_button}
296 Run Key Sleep \ 50s
297
298Double Event Log Click Element
Sivas SRR1a94d002018-04-06 08:48:58 -0500299 [Documentation] Keep double click elements associated with event logs.
Rahul Maheshwari65f69442018-11-27 04:43:00 -0600300 [Arguments] ${action_element} ${action_click_confirmation}=${None}
Sivas SRR1a94d002018-04-06 08:48:58 -0500301
302 # Description of argument(s):
303 # action_element xpath value of the element to be actioned
304 # (e.g. "Delete" or "Resolved" or "Export").
305 # action_click_confirmation Confirmation of action by pressing yes
306 # (e.g. "Yes" or "No").
Sivas SRR2631b632018-04-04 11:33:21 -0500307
308 Click Element ${xpath_second_event_select}
Sivas SRR1a94d002018-04-06 08:48:58 -0500309 Common Event Log Click Element ${action_element}
310 ... ${action_click_confirmation}
Sivas SRR2631b632018-04-04 11:33:21 -0500311
Sivas SRRbe026912018-03-14 11:33:02 -0500312Test Setup Execution
313 [Documentation] Do test case setup tasks.
Rahul Maheshwari2f8aaa02018-11-29 00:23:09 -0600314
Sivas SRRbe026912018-03-14 11:33:02 -0500315 ${status}= Run Keyword And Return Status Logging Test Binary Exist
316 Run Keyword If ${status} == ${False} Install Tarball
317 Delete Error Logs And Verify
Sivas SRRbe026912018-03-14 11:33:02 -0500318
Rahul Maheshwari2a674e22018-12-06 01:40:56 -0600319 # Launch the GUI and navigate to server health page.
320 Launch Browser And Login OpenBMC GUI
Rahul Maheshwari2f8aaa02018-11-29 00:23:09 -0600321 Click Element ${xpath_select_server_health}
322 Wait Until Page Contains Event log
Sivas SRRbe026912018-03-14 11:33:02 -0500323
324Test Teardown Execution
325 [Documentation] Do the post test teardown.
326
327 FFDC On Test Case Fail
328 Delete All Error Logs
329 Close All Connections
Rahul Maheshwari2a674e22018-12-06 01:40:56 -0600330 Close Browser