blob: b8c2d751f9769d1c91cdcd9003df1401a72357f2 [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
15Suite Setup Launch Browser And Login OpenBMC GUI
16Suite Teardown Logout And Close Browser
Sivas SRRbe026912018-03-14 11:33:02 -050017Test Setup Test Setup Execution
18Test Teardown Test Teardown Execution
19
Sivas SRR008dcc62018-02-27 06:34:56 -060020
21*** Test Cases ***
22
23Verify Event Log Text Appears By Clicking Server Health
24 [Documentation] Check that "Event Log" text appears by clicking server
25 ... health in GUI header.
26 [Tags] Verify_Event_Log_Text_Appears_By_Clicking_Server_Health
27
28 Wait Until Page Contains Element event-log
29 Page should contain Event log
30
31
32Verify Filters By Severity Elements Appears
Sivas SRR179208e2018-03-01 04:08:23 -060033 [Documentation] Check that the "event log" filters appears by clicking
34 ... server health in GUI header.
Sivas SRR008dcc62018-02-27 06:34:56 -060035 [Tags] Verify_Filters_By_Severity_Elements_Appears
36
37 # Types of event severity: All, High, Medium, Low.
38 Page Should Contain Element ${xpath_event_severity_all} limit=1
39 Page Should Contain Element ${xpath_event_severity_high} limit=1
40 Page Should Contain Element ${xpath_event_severity_medium} limit=1
41 Page Should Contain Element ${xpath_event_severity_low} limit=1
42
43
44Verify Drop Down Button User Timezone Appears
Sivas SRR179208e2018-03-01 04:08:23 -060045 [Documentation] Check that the "drop down" button of user timezone appears
46 ... by clicking server health in GUI header.
Sivas SRR008dcc62018-02-27 06:34:56 -060047 [Tags] Verify_Drop_Down_Button_User_Timezone_Appears
48
49 Page Should Contain Button ${xpath_drop_down_timezone_edt}
50 # Ensure that page is not in refreshing state.
51 # It helps to click the drop down element.
52 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
53 Click Element class:dropdown__button
54 Page Should Contain Button ${xpath_drop_down_timezone_utc}
55
Sivas SRR179208e2018-03-01 04:08:23 -060056
57Verify Content Search Element Appears
58 [Documentation] Check that the "event search element is available with
59 ... filter" button appears.
60 [Tags] Verify_Content_Search_Element_Appears
61
62 Page Should Contain Element content__search-input limit=1
63 # Ensure that page is not in refreshing state.
64 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
65 Page Should Contain Button content__search-submit
66
67
68Verify Filter By Date Element Appears
69 [Documentation] Check that the "filter by date" elements are available and
70 ... visible.
71 [Tags] Verify_Filter_By_Date_Element_Appears
72
73 Wait Until Element Is Visible event-filter-start-date
74 Page Should Contain Element event-filter-start-date limit=1
75 Page Should Contain Element event-filter-end-date limit=1
76
77
78Verify Filter By Event Status Element Appears
79 [Documentation] Check that the "filter by event status" element appears.
80 [Tags] Verify_Filter_By_Event_Status_Element_Appears
81
82 # Ensure that page is not in refreshing state.
83 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
84 Wait Until Element is Visible class:dropdown__wrapper
85 Click Element class:dropdown__wrapper
86 Page Should Contain Element ${xpath_event_filter_all} limit=1
87 Page Should Contain Element ${xpath_event_filter_resolved} limit=1
88 Page Should Contain Element ${xpath_event_filter_unresolved} limit=1
Sivas SRR162bf482018-03-02 07:01:16 -060089
90
91Verify Event Action Bar Element Appears
92 [Documentation] Check that "event action bar" element appears.
93 [Tags] Verify_Event_Action_Bar_Element_Appears
94
95 # Ensure that page is not in refreshing state.
96 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
97 Page Should Contain Element ${xpath_event_action_bars} limit=1
98 Page Should Contain Element class:control__indicator
99
100
101Verify Click Events Check Box
102 [Documentation] Check that "event check box" element appears and on click
103 ... should be able to see elements like "Delete" button and "Export"
104 ... element.
105 [Tags] Verify_Click_Events_Check_Box
106
107 # Ensure that page is not in refreshing state.
108 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
109 Click Element class:control__indicator
110 Page Should Contain Button ${xpath_event_action_delete} limit=1
111 Page Should Contain Element ${xpath_event_action_export} limit=1
112
113
114Verify Number of Events Appears
115 [Documentation] Check that "number of events" element appears and value is
116 ... visible.
117 [Tags] Verify_Number_of_Events_Appears
118
119 # Ensure that page is not in refreshing state.
120 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
121 Page Should Contain Element ${xpath_number_of_events}
122 ${number_of_events}= Get Text ${xpath_number_of_events}
123 Log To Console \n Number of Events:${number_of_events}
Sivas SRRbe026912018-03-14 11:33:02 -0500124
125
126Select All Error Logs And Mark As Resolved
127 [Documentation] Select all error logs and mark them as resolved.
128 [Tags] Select_All_Error_Logs_And_Mark_As_Resolved
129
130 Create Test Error Log
131 Create Test Error Log
132 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
133 Page Should Contain Element ${xpath_number_of_events}
134 ${number_of_events}= Get Text ${xpath_number_of_events}
135 Click Element class:control__indicator
136 Run Keyword If ${number_of_events} > 0
137 ... Click Element ${xpath_mark_as_resolved}
138 Element Should Be Disabled ${xpath_mark_as_resolved}
139
140
141Select All Error Logs And Click Export
142 [Documentation] Select all error logs and click export element.
143 [Tags] Select_All_Error_Logs_And_Click_Export
144
145 Create Test Error Log
146 Create Test Error Log
147 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
148 Page Should Contain Element ${xpath_number_of_events}
149 ${number_of_events}= Get Text ${xpath_number_of_events}
150 Click Element class:control__indicator
151 Page Should Contain Element ${xpath_events_export}
152 Run Keyword If ${number_of_events} > 0
153 ... Click Element ${xpath_events_export}
154
155
156Select All Error Logs And Delete
157 [Documentation] Select all error logs and delete them.
158 [Tags] Select_All_Error_Logs_And_Delete
159
160 Create Test Error Log
161 Create Test Error Log
162 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
163 Page Should Contain Element ${xpath_number_of_events}
164 ${number_of_events}= Get Text ${xpath_number_of_events}
165 Click Element class:control__indicator
166 Page Should Contain Button ${xpath_event_action_delete}
167 Run Keyword If ${number_of_events} > 0
168 ... Click Element ${xpath_event_action_delete}
169 ${number_of_events}= Get Text ${xpath_number_of_events}
170 Should Be Equal ${number_of_events} 0
171
172
Sivas SRR2631b632018-04-04 11:33:21 -0500173Select Single Error Log And Delete
174 [Documentation] Select single error log and delete it.
175 [Tags] Select_Single_Error_Log_And_Delete
176
177 Create Test Error Log
178 # Refresh the GUI to get the latest update.
179 Click Element ${xpath_select_refresh_button}
180 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
181 Page Should Contain Element ${xpath_number_of_events}
182 ${number_of_events}= Get Text ${xpath_number_of_events}
183 Run Keyword If ${number_of_events} > 0
184 ... Common Event Log Click Element ${xpath_individual_event_delete}
185 ... ${xpath_individual_event_delete_yes}
186 ${number_of_events}= Get Text ${xpath_number_of_events}
187 Should Be Equal ${number_of_events} 0
188 ... msg=Failed to delete single error log entry.
189
190
191Select Multiple Error Logs And Delete
192 [Documentation] Select multiple error logs and delete them.
193 [Tags] Select_Multiple_Error_Logs_And_Delete
194
195 Create Test Error Log
196 Create Test Error Log
197 # Refresh the GUI to get the latest update.
198 Click Element ${xpath_select_refresh_button}
199 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
200 Page Should Contain Element ${xpath_number_of_events}
201 ${number_of_events}= Get Text ${xpath_number_of_events}
202 Run Keyword If ${number_of_events} > 0
Sivas SRR1a94d002018-04-06 08:48:58 -0500203 ... Double Event Log Click Element ${xpath_individual_event_delete}
204 ... ${xpath_individual_event_delete_yes}
Sivas SRR2631b632018-04-04 11:33:21 -0500205 ${number_of_events}= Get Text ${xpath_number_of_events}
206 Should Be Equal ${number_of_events} 0
207 ... msg=Failed to delete multiple error log entries.
208
209
210Select Single Error Log And Mark As Resolved
211 [Documentation] Select single error log and mark as resolved.
212 [Tags] Select_Single_Error_Log_And_Mark_As_Resolved
213
214 Create Test Error Log
Sivas SRR1a94d002018-04-06 08:48:58 -0500215 # Refresh the GUI to get the latest update.
Sivas SRR2631b632018-04-04 11:33:21 -0500216 Click Element ${xpath_select_refresh_button}
217 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
218 Page Should Contain Element ${xpath_number_of_events}
219 ${number_of_events}= Get Text ${xpath_number_of_events}
220 Run Keyword If ${number_of_events} > 0
221 ... Common Event Log Click Element ${xpath_individual_event_resolved} 0
222 ${number_of_events}= Get Text ${xpath_number_of_events}
223 Should Be Equal ${number_of_events} 1
224 ... msg=Failed to mark single error log entry as resolved.
225
Sivas SRR1a94d002018-04-06 08:48:58 -0500226
227Select Multiple Error Logs And Mark As Resolved
228 [Documentation] Select multiple error logs and mark as resolved.
229 [Tags] Select_Multiple_Error_Logs_And_Mark_As_Resolved
230
231 Create Test Error Log
232 Create Test Error Log
233 # Refresh the GUI to get the latest update.
234 Click Element ${xpath_select_refresh_button}
235 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
236 Page Should Contain Element ${xpath_number_of_events}
237 ${number_of_events}= Get Text ${xpath_number_of_events}
238 Run Keyword If ${number_of_events} > 0
239 ... Double Event Log Click Element ${xpath_individual_event_resolved} 0
240 ${number_of_events}= Get Text ${xpath_number_of_events}
241 Should Be Equal ${number_of_events} 2
242 ... msg=Failed to mark multiple error log entries as resolved.
243
244
245Select Single Error Log And Export
246 [Documentation] Select single error log and export.
247 [Tags] Select_Single_Error_Log_And_Export
248
249 Create Test Error Log
250 # Refresh the GUI to get the latest update.
251 Click Element ${xpath_select_refresh_button}
252 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
253 Page Should Contain Element ${xpath_number_of_events}
254 ${number_of_events}= Get Text ${xpath_number_of_events}
255 Run Keyword If ${number_of_events} > 0
256 ... Common Event Log Click Element ${xpath_individual_event_export} 0
257 ${number_of_events}= Get Text ${xpath_number_of_events}
258 Should Be Equal ${number_of_events} 1
259 ... msg=Failed to export single error log entry.
260
261
262Select Multiple Error Log And Export
263 [Documentation] Select multiple error log and export.
264 [Tags] Select_Multiple_Error_Log_And_Export
265
266 Create Test Error Log
267 Create Test Error Log
268 # Refresh the GUI to get the latest update.
269 Click Element ${xpath_select_refresh_button}
270 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
271 Page Should Contain Element ${xpath_number_of_events}
272 ${number_of_events}= Get Text ${xpath_number_of_events}
273 Run Keyword If ${number_of_events} > 0
274 ... Double Event Log Click Element ${xpath_individual_event_export} 0
275 ${number_of_events}= Get Text ${xpath_number_of_events}
276 Should Be Equal ${number_of_events} 2
277 ... msg=Failed to export multiple error log entries.
278
Sivas SRRbe026912018-03-14 11:33:02 -0500279*** Keywords ***
280
Sivas SRR2631b632018-04-04 11:33:21 -0500281Common Event Log Click Element
282 [Documentation] Keep common click elements associated with event log.
283 [Arguments] ${action_element} ${action_click_confirmation}
284
285 # Description of argument(s):
Sivas SRR1a94d002018-04-06 08:48:58 -0500286 # action_element xpath value of the element to be actioned
287 # (e.g. "Delete" or "Resolved" or "Export").
288 # action_click_confirmation Confirmation of action by pressing yes
289 # (e.g. "Yes" or "No").
Sivas SRR2631b632018-04-04 11:33:21 -0500290
291 Click Element ${xpath_individual_event_select}
Sivas SRR1a94d002018-04-06 08:48:58 -0500292 Page Should Contain Element ${action_element}
Sivas SRR2631b632018-04-04 11:33:21 -0500293 Click Element ${action_element}
294 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
295 Run Keyword If ${action_click_confirmation} <> 0
296 ... Click Element ${action_click_confirmation}
297 Click Element ${xpath_select_refresh_button}
298 Run Key Sleep \ 50s
299
300Double Event Log Click Element
Sivas SRR1a94d002018-04-06 08:48:58 -0500301 [Documentation] Keep double click elements associated with event logs.
302 [Arguments] ${action_element} ${action_click_confirmation}
303
304 # Description of argument(s):
305 # action_element xpath value of the element to be actioned
306 # (e.g. "Delete" or "Resolved" or "Export").
307 # action_click_confirmation Confirmation of action by pressing yes
308 # (e.g. "Yes" or "No").
Sivas SRR2631b632018-04-04 11:33:21 -0500309
310 Click Element ${xpath_second_event_select}
Sivas SRR1a94d002018-04-06 08:48:58 -0500311 Common Event Log Click Element ${action_element}
312 ... ${action_click_confirmation}
Sivas SRR2631b632018-04-04 11:33:21 -0500313
Sivas SRRbe026912018-03-14 11:33:02 -0500314Test Setup Execution
315 [Documentation] Do test case setup tasks.
316 ${status}= Run Keyword And Return Status Logging Test Binary Exist
317 Run Keyword If ${status} == ${False} Install Tarball
318 Delete Error Logs And Verify
319 Click Element ${xpath_select_server_health}
320
321
322Test Teardown Execution
323 [Documentation] Do the post test teardown.
324
325 FFDC On Test Case Fail
326 Delete All Error Logs
327 Close All Connections