blob: be1785703026ec064dd37881efcb38f6cc926461 [file] [log] [blame]
Sushma M M9495a942020-08-10 01:23:33 -05001*** Settings ***
2
3Documentation Test OpenBMC GUI "Sensors" sub-menu.
Rahul Maheshwari41747da2020-11-17 09:09:52 -06004Resource ../../lib/gui_resource.robot
Sushma M M9495a942020-08-10 01:23:33 -05005
Rahul Maheshwarib87a5a72021-09-02 06:49:29 -05006Suite Setup Suite Setup Execution
Sushma M M9495a942020-08-10 01:23:33 -05007Suite Teardown Close Browser
Sushma M M9495a942020-08-10 01:23:33 -05008
9
10*** Variables ***
Anusha Dathatrib5f12de2020-10-19 02:40:22 -050011${xpath_sensor_heading} //h1[text()="Sensors"]
12${xpath_sensors_filter} //button[contains(text(),'Filter')]
13${xpath_sensors_search} //input[contains(@class,"search-input")]
14${xpath_filter_ok} //*[@data-test-id='tableFilter-checkbox-OK']
15${xpath_filter_warning} //*[@data-test-id='tableFilter-checkbox-Warning']
16${xpath_filter_critical} //*[@data-test-id='tableFilter-checkbox-Critical']
17${xpath_filter_clear_all} //*[@data-test-id='tableFilter-button-clearAll']
Sushma M Mdb737c72020-12-14 16:04:04 -060018${xpath_selected_severity} //*[@class="d-inline-block mb-0"]
Sushma M M9495a942020-08-10 01:23:33 -050019
20*** Test Cases ***
21
Sushma M M15fa20d2020-08-31 02:25:52 -050022Verify Navigation To Sensors Page
23 [Documentation] Verify navigation to Sensors page.
24 [Tags] Verify_Navigation_To_Sensors_Page
25
26 Page Should Contain Element ${xpath_sensor_heading}
27
28
Sushma M M9495a942020-08-10 01:23:33 -050029Verify Existence Of All Sections In Sensor Page
30 [Documentation] Verify existence of all sections in sensor page.
31 [Tags] Verify_Existence_Of_All_Sections_In_Event_Logs_Page
32
33 Page Should Contain Sensors
34
35
36Verify Existence Of All Buttons And Input Boxes In Sensor Page
37 [Documentation] Verify existence of all buttons and input boxes in sensor page.
38 [Tags] Verify_Existence_Of_All_Buttons_And_Input_Boxes_In_Sensor_Page
39
40 Page Should Contain Element ${xpath_sensors_filter}
41 Click Element ${xpath_sensors_filter}
42
43 #Search field
44 Page Should Contain Element ${xpath_sensors_search}
45
46
Anusha Dathatrib5f12de2020-10-19 02:40:22 -050047Verify Search Text Entered
48 [Documentation] Verify search text input allowed from "Sensors" page.
49 [Tags] Verify_Search_Text_Entered
50
51 Wait Until Page Contains Element ${xpath_sensors_search}
Anusha Dathatrid9ddac22020-11-02 06:19:32 -060052 Input Text ${xpath_sensors_search} ambi
Ashwini Chandrappab4625502021-07-07 04:56:24 -050053 Wait Until Page Contains Ambient timeout=15
Anusha Dathatrib5f12de2020-10-19 02:40:22 -050054
55
56Verify Sensors Filter From Server Health Clickable
57 [Documentation] Verify sensors filter from server health clickable
58 [Tags] Verify_Sensors_Filter_From_Server_Health_Clickable
59
60 Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s
61 Click Element ${xpath_sensors_filter}
62
63 Page Should Contain Element ${xpath_filter_ok}
64 Page Should Contain Element ${xpath_filter_warning}
65 Page Should Contain Element ${xpath_filter_critical}
66 Page Should Contain Element ${xpath_filter_clear_all}
67
68
Sushma M Mff5684a2020-12-13 22:55:51 -060069Verify Invalid Text In Filter Sensors Search
70 [Documentation] Input invalid text in sensor search and verify error message.
71 [Tags] Verify_Invalid_Text_In_Filter_Sensors_Search
72
73 Wait Until Page Contains Element ${xpath_sensors_search}
74 Input Text ${xpath_sensors_search} abcd123
75
76 Page Should Contain No items match the search query
77
78
Sushma M Mdb737c72020-12-14 16:04:04 -060079Verify Clear All Button In Sensor Page
80 [Documentation] Select all severity and verify clear all button de-selects all severity.
81 [Tags] Verify_Clear_All_Button_In_Sensor_Page
82
83 Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s
84 Click Element ${xpath_sensors_filter}
85
86 # Select all severity from filter.
87 Click Element At Coordinates ${xpath_filter_ok} 0 0
88 Click Element At Coordinates ${xpath_filter_warning} 0 0
89 Click Element At Coordinates ${xpath_filter_critical} 0 0
90 Element Should Be Visible ${xpath_selected_severity}
91
92 # De-select all severity using clear all button in filter.
93 Click Element At Coordinates ${xpath_filter_clear_all} 0 0
94 Click Element ${xpath_sensors_filter}
95
96 Element Should Not Be Visible ${xpath_selected_severity}
97
98
Sushma M Mae084112020-12-14 15:44:59 -060099Verify Filter By Severity Button OK
100 [Documentation] Select severity button OK from filter and verify.
101 [Tags] Verify_Filter_By_Severity_Button_OK
102
103 Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s
104 Click Element ${xpath_sensors_filter}
105
106 # Select OK severity from filter.
107 Wait Until Page Contains Element ${xpath_filter_ok} timeout=5s
108
109 Click Element At Coordinates ${xpath_filter_ok} 0 0
110 Click Element ${xpath_sensors_filter}
111
112 Element Should Contain ${xpath_selected_severity} OK
113 Element Should Not Contain ${xpath_selected_severity} Warning
114 Element Should Not Contain ${xpath_selected_severity} Critical
115
116
Sushma M M9495a942020-08-10 01:23:33 -0500117*** Keywords ***
118
Rahul Maheshwarib87a5a72021-09-02 06:49:29 -0500119Suite Setup Execution
120 [Documentation] Do suite setup tasks.
Sushma M M9495a942020-08-10 01:23:33 -0500121
Rahul Maheshwarib87a5a72021-09-02 06:49:29 -0500122 Launch Browser And Login GUI
Rahul Maheshwari142642d2021-08-24 00:00:15 -0500123 Click Element ${xpath_hardware_status_menu}
Sushma M M9495a942020-08-10 01:23:33 -0500124 Click Element ${xpath_sensor_sub_menu}
Rahul Maheshwari41747da2020-11-17 09:09:52 -0600125 Wait Until Keyword Succeeds 30 sec 5 sec Location Should Contain sensors