blob: 3cca295e4ada90722f14c80a1d6afb63fc283354 [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
203 ... Double Event Log Click Element
204 ${number_of_events}= Get Text ${xpath_number_of_events}
205 Should Be Equal ${number_of_events} 0
206 ... msg=Failed to delete multiple error log entries.
207
208
209Select Single Error Log And Mark As Resolved
210 [Documentation] Select single error log and mark as resolved.
211 [Tags] Select_Single_Error_Log_And_Mark_As_Resolved
212
213 Create Test Error Log
214 # Refresh the GUI to get the latest update
215 Click Element ${xpath_select_refresh_button}
216 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
217 Page Should Contain Element ${xpath_number_of_events}
218 ${number_of_events}= Get Text ${xpath_number_of_events}
219 Run Keyword If ${number_of_events} > 0
220 ... Common Event Log Click Element ${xpath_individual_event_resolved} 0
221 ${number_of_events}= Get Text ${xpath_number_of_events}
222 Should Be Equal ${number_of_events} 1
223 ... msg=Failed to mark single error log entry as resolved.
224
Sivas SRRbe026912018-03-14 11:33:02 -0500225*** Keywords ***
226
Sivas SRR2631b632018-04-04 11:33:21 -0500227Common Event Log Click Element
228 [Documentation] Keep common click elements associated with event log.
229 [Arguments] ${action_element} ${action_click_confirmation}
230
231 # Description of argument(s):
232 # action_element xpath value of the element to be actioned.
233 # (e.g. "Delete" or "Resolved" or "Export")
234 # action_click_confirmation Confirmation of action by pressing yes.
235 # (e.g. "Yes" or "No")
236
237 Click Element ${xpath_individual_event_select}
238 Page Should Contain Button ${action_element}
239 Click Element ${action_element}
240 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
241 Run Keyword If ${action_click_confirmation} <> 0
242 ... Click Element ${action_click_confirmation}
243 Click Element ${xpath_select_refresh_button}
244 Run Key Sleep \ 50s
245
246Double Event Log Click Element
247 [Documentation] Keep double click elements associated with event logs.
248
249 Click Element ${xpath_second_event_select}
250 Common Event Log Click Element ${xpath_individual_event_delete}
251 ... ${xpath_individual_event_delete_yes}
252
Sivas SRRbe026912018-03-14 11:33:02 -0500253Test Setup Execution
254 [Documentation] Do test case setup tasks.
255 ${status}= Run Keyword And Return Status Logging Test Binary Exist
256 Run Keyword If ${status} == ${False} Install Tarball
257 Delete Error Logs And Verify
258 Click Element ${xpath_select_server_health}
259
260
261Test Teardown Execution
262 [Documentation] Do the post test teardown.
263
264 FFDC On Test Case Fail
265 Delete All Error Logs
266 Close All Connections