Rahul Maheshwari | d29cf30 | 2020-07-07 03:13:17 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Test OpenBMC GUI "Event logs" sub-menu. |
| 4 | |
| 5 | Resource ../../lib/resource.robot |
| 6 | |
Anusha Dathatri | 44c5aef | 2020-07-30 04:16:02 -0500 | [diff] [blame] | 7 | Suite Setup Suite Setup Execution |
Rahul Maheshwari | d29cf30 | 2020-07-07 03:13:17 -0500 | [diff] [blame] | 8 | Suite Teardown Close Browser |
Rahul Maheshwari | d29cf30 | 2020-07-07 03:13:17 -0500 | [diff] [blame] | 9 | |
| 10 | |
Sushma M M | 15fa20d | 2020-08-31 02:25:52 -0500 | [diff] [blame] | 11 | *** Variables *** |
Anusha Dathatri | 44c5aef | 2020-07-30 04:16:02 -0500 | [diff] [blame] | 12 | ${xpath_event_logs_heading} //h1[text()="Event logs"] |
| 13 | ${xpath_filter_event} //button[contains(text(),"Filter")] |
| 14 | ${xpath_event_severity_ok} //*[@data-test-id="tableFilter-checkbox-OK"] |
| 15 | ${xpath_event_severity_warning} //*[@data-test-id="tableFilter-checkbox-Warning"] |
| 16 | ${xpath_event_severity_critical} //*[@data-test-id="tableFilter-checkbox-Critical"] |
| 17 | ${xpath_event_search} //input[@placeholder="Search logs"] |
| 18 | ${xpath_event_from_date} //*[@id="input-from-date"] |
| 19 | ${xpath_event_to_date} //*[@id="input-to-date"] |
| 20 | ${xpath_select_all_events} //*[@data-test-id="eventLogs-checkbox-selectAll"] |
| 21 | ${xpath_event_action_delete} //*[@data-test-id="table-button-deleteSelected"] |
| 22 | ${xpath_event_action_export} //*[contains(text(),"Export")] |
| 23 | ${xpath_event_action_cancel} //button[contains(text(),"Cancel")] |
| 24 | |
Sushma M M | 15fa20d | 2020-08-31 02:25:52 -0500 | [diff] [blame] | 25 | |
Rahul Maheshwari | d29cf30 | 2020-07-07 03:13:17 -0500 | [diff] [blame] | 26 | *** Test Cases *** |
| 27 | |
Sushma M M | 15fa20d | 2020-08-31 02:25:52 -0500 | [diff] [blame] | 28 | Verify Navigation To Event Logs Page |
| 29 | [Documentation] Verify navigation to Event Logs page. |
| 30 | [Tags] Verify_Navigation_To_Event_Logs_Page |
| 31 | |
| 32 | Page Should Contain Element ${xpath_event_logs_heading} |
| 33 | |
| 34 | |
Anusha Dathatri | 44c5aef | 2020-07-30 04:16:02 -0500 | [diff] [blame] | 35 | Verify Existence Of All Buttons In Event Logs Page |
| 36 | [Documentation] Verify existence of all buttons in Event Logs page. |
| 37 | [Tags] Verify_Existence_Of_All_Buttons_In_Event_Logs_Page |
Rahul Maheshwari | d29cf30 | 2020-07-07 03:13:17 -0500 | [diff] [blame] | 38 | |
Anusha Dathatri | 44c5aef | 2020-07-30 04:16:02 -0500 | [diff] [blame] | 39 | # Types of event severity: OK, Warning, Critical. |
| 40 | Click Element ${xpath_filter_event} |
| 41 | Page Should Contain Element ${xpath_event_severity_ok} limit=1 |
| 42 | Page Should Contain Element ${xpath_event_severity_warning} limit=1 |
| 43 | Page Should Contain Element ${xpath_event_severity_critical} limit=1 |
| 44 | |
| 45 | |
| 46 | Verify Existence Of All Input boxes In Event Logs Page |
| 47 | [Documentation] Verify existence of all input boxes in Event Logs page. |
| 48 | [Tags] Verify_Existence_Of_All_Input_Boxes_In_Event_Logs_Page |
| 49 | |
| 50 | # Search logs. |
| 51 | Page Should Contain Element ${xpath_event_search} |
| 52 | |
| 53 | # Date filter. |
| 54 | Page Should Contain Element ${xpath_event_from_date} limit=1 |
| 55 | Page Should Contain Element ${xpath_event_to_date} limit=1 |
| 56 | |
| 57 | |
| 58 | Verify Event Log Options |
| 59 | [Documentation] Verify all the options after selecting event logs. |
| 60 | [Tags] Verify_Click_Event_Options |
| 61 | |
| 62 | Create Error Logs ${1} |
| 63 | Select All Events |
| 64 | Page Should Contain Button ${xpath_event_action_delete} limit=1 |
| 65 | Page Should Contain Element ${xpath_event_action_export} limit=1 |
| 66 | Page Should Contain Element ${xpath_event_action_cancel} limit=1 |
Rahul Maheshwari | d29cf30 | 2020-07-07 03:13:17 -0500 | [diff] [blame] | 67 | |
| 68 | |
| 69 | *** Keywords *** |
| 70 | |
Anusha Dathatri | 44c5aef | 2020-07-30 04:16:02 -0500 | [diff] [blame] | 71 | Suite Setup Execution |
| 72 | [Documentation] Do suite setup tasks. |
| 73 | |
| 74 | Launch Browser And Login GUI |
| 75 | Navigate To Event Logs Page |
| 76 | |
| 77 | Navigate To Event Logs Page |
| 78 | [Documentation] Navigate to the event logs page from main menu. |
Rahul Maheshwari | d29cf30 | 2020-07-07 03:13:17 -0500 | [diff] [blame] | 79 | |
| 80 | Click Element ${xpath_health_menu} |
| 81 | Click Element ${xpath_event_logs_sub_menu} |
| 82 | Wait Until Keyword Succeeds 30 sec 5 sec Location Should Contain event-logs |
Anusha Dathatri | 44c5aef | 2020-07-30 04:16:02 -0500 | [diff] [blame] | 83 | |
| 84 | |
| 85 | Create Error Logs |
| 86 | [Documentation] Create given number of error logs. |
| 87 | [Arguments] ${log_count} |
| 88 | |
| 89 | # Description of argument(s): |
| 90 | # log_count Number of error logs to create. |
| 91 | |
| 92 | FOR ${num} IN RANGE ${log_count} |
| 93 | Generate Test Error Log |
| 94 | END |
| 95 | |
| 96 | Select All Events |
| 97 | [Documentation] Select all error logs. |
| 98 | |
| 99 | Click Element At Coordinates ${xpath_select_all_events} 0 0 |