blob: 0a938773976b0a7a6d88d0531b48f8d1f1885ebd [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
6Suite Setup Launch Browser And Login GUI
7Suite Teardown Close Browser
8Test Setup Test Setup Execution
9
10
11*** Variables ***
Anusha Dathatrib5f12de2020-10-19 02:40:22 -050012${xpath_sensor_heading} //h1[text()="Sensors"]
13${xpath_sensors_filter} //button[contains(text(),'Filter')]
14${xpath_sensors_search} //input[contains(@class,"search-input")]
15${xpath_filter_ok} //*[@data-test-id='tableFilter-checkbox-OK']
16${xpath_filter_warning} //*[@data-test-id='tableFilter-checkbox-Warning']
17${xpath_filter_critical} //*[@data-test-id='tableFilter-checkbox-Critical']
18${xpath_filter_clear_all} //*[@data-test-id='tableFilter-button-clearAll']
Sushma M Mdb737c72020-12-14 16:04:04 -060019${xpath_selected_severity} //*[@class="d-inline-block mb-0"]
Sushma M M9495a942020-08-10 01:23:33 -050020
21*** Test Cases ***
22
Sushma M M15fa20d2020-08-31 02:25:52 -050023Verify Navigation To Sensors Page
24 [Documentation] Verify navigation to Sensors page.
25 [Tags] Verify_Navigation_To_Sensors_Page
26
27 Page Should Contain Element ${xpath_sensor_heading}
28
29
Sushma M M9495a942020-08-10 01:23:33 -050030Verify Existence Of All Sections In Sensor Page
31 [Documentation] Verify existence of all sections in sensor page.
32 [Tags] Verify_Existence_Of_All_Sections_In_Event_Logs_Page
33
34 Page Should Contain Sensors
35
36
37Verify Existence Of All Buttons And Input Boxes In Sensor Page
38 [Documentation] Verify existence of all buttons and input boxes in sensor page.
39 [Tags] Verify_Existence_Of_All_Buttons_And_Input_Boxes_In_Sensor_Page
40
41 Page Should Contain Element ${xpath_sensors_filter}
42 Click Element ${xpath_sensors_filter}
43
44 #Search field
45 Page Should Contain Element ${xpath_sensors_search}
46
47
Anusha Dathatrib5f12de2020-10-19 02:40:22 -050048Verify Search Text Entered
49 [Documentation] Verify search text input allowed from "Sensors" page.
50 [Tags] Verify_Search_Text_Entered
51
52 Wait Until Page Contains Element ${xpath_sensors_search}
Anusha Dathatrid9ddac22020-11-02 06:19:32 -060053 Input Text ${xpath_sensors_search} ambi
Ashwini Chandrappab4625502021-07-07 04:56:24 -050054 Wait Until Page Contains Ambient timeout=15
Anusha Dathatrib5f12de2020-10-19 02:40:22 -050055
56
57Verify Sensors Filter From Server Health Clickable
58 [Documentation] Verify sensors filter from server health clickable
59 [Tags] Verify_Sensors_Filter_From_Server_Health_Clickable
60
61 Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s
62 Click Element ${xpath_sensors_filter}
63
64 Page Should Contain Element ${xpath_filter_ok}
65 Page Should Contain Element ${xpath_filter_warning}
66 Page Should Contain Element ${xpath_filter_critical}
67 Page Should Contain Element ${xpath_filter_clear_all}
68
69
Sushma M Mff5684a2020-12-13 22:55:51 -060070Verify Invalid Text In Filter Sensors Search
71 [Documentation] Input invalid text in sensor search and verify error message.
72 [Tags] Verify_Invalid_Text_In_Filter_Sensors_Search
73
74 Wait Until Page Contains Element ${xpath_sensors_search}
75 Input Text ${xpath_sensors_search} abcd123
76
77 Page Should Contain No items match the search query
78
79
Sushma M Mdb737c72020-12-14 16:04:04 -060080Verify Clear All Button In Sensor Page
81 [Documentation] Select all severity and verify clear all button de-selects all severity.
82 [Tags] Verify_Clear_All_Button_In_Sensor_Page
83
84 Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s
85 Click Element ${xpath_sensors_filter}
86
87 # Select all severity from filter.
88 Click Element At Coordinates ${xpath_filter_ok} 0 0
89 Click Element At Coordinates ${xpath_filter_warning} 0 0
90 Click Element At Coordinates ${xpath_filter_critical} 0 0
91 Element Should Be Visible ${xpath_selected_severity}
92
93 # De-select all severity using clear all button in filter.
94 Click Element At Coordinates ${xpath_filter_clear_all} 0 0
95 Click Element ${xpath_sensors_filter}
96
97 Element Should Not Be Visible ${xpath_selected_severity}
98
99
Sushma M Mae084112020-12-14 15:44:59 -0600100Verify Filter By Severity Button OK
101 [Documentation] Select severity button OK from filter and verify.
102 [Tags] Verify_Filter_By_Severity_Button_OK
103
104 Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s
105 Click Element ${xpath_sensors_filter}
106
107 # Select OK severity from filter.
108 Wait Until Page Contains Element ${xpath_filter_ok} timeout=5s
109
110 Click Element At Coordinates ${xpath_filter_ok} 0 0
111 Click Element ${xpath_sensors_filter}
112
113 Element Should Contain ${xpath_selected_severity} OK
114 Element Should Not Contain ${xpath_selected_severity} Warning
115 Element Should Not Contain ${xpath_selected_severity} Critical
116
117
Sushma M M9495a942020-08-10 01:23:33 -0500118*** Keywords ***
119
120Test Setup Execution
121 [Documentation] Do test case setup tasks.
122
123 Click Element ${xpath_health_menu}
124 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