blob: 88f5775b1c8f90ece059192a9b691d321b711bf0 [file] [log] [blame]
Rahul Maheshwarid29cf302020-07-07 03:13:17 -05001*** Settings ***
2
3Documentation Test OpenBMC GUI "Event logs" sub-menu.
4
5Resource ../../lib/resource.robot
6
Anusha Dathatri44c5aef2020-07-30 04:16:02 -05007Suite Setup Suite Setup Execution
Rahul Maheshwarid29cf302020-07-07 03:13:17 -05008Suite Teardown Close Browser
Rahul Maheshwarid29cf302020-07-07 03:13:17 -05009
10
Sushma M M15fa20d2020-08-31 02:25:52 -050011*** Variables ***
Anusha Dathatri44c5aef2020-07-30 04:16:02 -050012${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 M15fa20d2020-08-31 02:25:52 -050025
Rahul Maheshwarid29cf302020-07-07 03:13:17 -050026*** Test Cases ***
27
Sushma M M15fa20d2020-08-31 02:25:52 -050028Verify 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 Dathatri44c5aef2020-07-30 04:16:02 -050035Verify 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 Maheshwarid29cf302020-07-07 03:13:17 -050038
Anusha Dathatri44c5aef2020-07-30 04:16:02 -050039 # 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
46Verify 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
58Verify 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 Maheshwarid29cf302020-07-07 03:13:17 -050067
68
69*** Keywords ***
70
Anusha Dathatri44c5aef2020-07-30 04:16:02 -050071Suite Setup Execution
72 [Documentation] Do suite setup tasks.
73
74 Launch Browser And Login GUI
75 Navigate To Event Logs Page
76
77Navigate To Event Logs Page
78 [Documentation] Navigate to the event logs page from main menu.
Rahul Maheshwarid29cf302020-07-07 03:13:17 -050079
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 Dathatri44c5aef2020-07-30 04:16:02 -050083
84
85Create 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
96Select All Events
97 [Documentation] Select all error logs.
98
99 Click Element At Coordinates ${xpath_select_all_events} 0 0