blob: d55934ed486517e1fdd6a90d404a3659d59ffe22 [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
George Keishing0302e9a2023-10-12 21:48:35 +05309Force Tags Sensors_Sub_Menu
Sushma M M9495a942020-08-10 01:23:33 -050010
11*** Variables ***
rramyasr-in4b2e1ae2023-02-13 03:35:20 -060012
Anusha Dathatrib5f12de2020-10-19 02:40:22 -050013${xpath_sensor_heading} //h1[text()="Sensors"]
14${xpath_sensors_filter} //button[contains(text(),'Filter')]
15${xpath_sensors_search} //input[contains(@class,"search-input")]
16${xpath_filter_ok} //*[@data-test-id='tableFilter-checkbox-OK']
17${xpath_filter_warning} //*[@data-test-id='tableFilter-checkbox-Warning']
18${xpath_filter_critical} //*[@data-test-id='tableFilter-checkbox-Critical']
19${xpath_filter_clear_all} //*[@data-test-id='tableFilter-button-clearAll']
Sushma M Mdb737c72020-12-14 16:04:04 -060020${xpath_selected_severity} //*[@class="d-inline-block mb-0"]
rramyasr-in4b2e1ae2023-02-13 03:35:20 -060021${xpath_clear_search_input} //*[@title="Clear search input"]
Sushma M M9495a942020-08-10 01:23:33 -050022
23*** Test Cases ***
24
Sushma M M15fa20d2020-08-31 02:25:52 -050025Verify Navigation To Sensors Page
26 [Documentation] Verify navigation to Sensors page.
27 [Tags] Verify_Navigation_To_Sensors_Page
28
29 Page Should Contain Element ${xpath_sensor_heading}
30
31
Sushma M M9495a942020-08-10 01:23:33 -050032Verify Existence Of All Sections In Sensor Page
33 [Documentation] Verify existence of all sections in sensor page.
George Keishingd6a77972022-01-31 12:50:29 -060034 [Tags] Verify_Existence_Of_All_Sections_In_Sensor_Page
Sushma M M9495a942020-08-10 01:23:33 -050035
36 Page Should Contain Sensors
37
38
39Verify Existence Of All Buttons And Input Boxes In Sensor Page
40 [Documentation] Verify existence of all buttons and input boxes in sensor page.
41 [Tags] Verify_Existence_Of_All_Buttons_And_Input_Boxes_In_Sensor_Page
42
43 Page Should Contain Element ${xpath_sensors_filter}
44 Click Element ${xpath_sensors_filter}
45
46 #Search field
47 Page Should Contain Element ${xpath_sensors_search}
48
49
Anusha Dathatrib5f12de2020-10-19 02:40:22 -050050Verify Search Text Entered
51 [Documentation] Verify search text input allowed from "Sensors" page.
52 [Tags] Verify_Search_Text_Entered
rramyasr-in5ee9e3b2023-02-16 10:27:02 -060053 [Teardown] Click Element ${xpath_clear_search_input}
Anusha Dathatrib5f12de2020-10-19 02:40:22 -050054
55 Wait Until Page Contains Element ${xpath_sensors_search}
Anusha Dathatrid9ddac22020-11-02 06:19:32 -060056 Input Text ${xpath_sensors_search} ambi
rramyasr-inc561b7a2022-09-01 13:13:45 -050057 Wait Until Page Contains Ambient timeout=120s
Anusha Dathatrib5f12de2020-10-19 02:40:22 -050058
59
60Verify Sensors Filter From Server Health Clickable
61 [Documentation] Verify sensors filter from server health clickable
62 [Tags] Verify_Sensors_Filter_From_Server_Health_Clickable
63
64 Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s
65 Click Element ${xpath_sensors_filter}
66
67 Page Should Contain Element ${xpath_filter_ok}
68 Page Should Contain Element ${xpath_filter_warning}
69 Page Should Contain Element ${xpath_filter_critical}
70 Page Should Contain Element ${xpath_filter_clear_all}
71
72
Sushma M Mff5684a2020-12-13 22:55:51 -060073Verify Invalid Text In Filter Sensors Search
74 [Documentation] Input invalid text in sensor search and verify error message.
75 [Tags] Verify_Invalid_Text_In_Filter_Sensors_Search
rramyasr-in4b2e1ae2023-02-13 03:35:20 -060076 [Teardown] Click Element ${xpath_clear_search_input}
Sushma M Mff5684a2020-12-13 22:55:51 -060077
78 Wait Until Page Contains Element ${xpath_sensors_search}
79 Input Text ${xpath_sensors_search} abcd123
80
81 Page Should Contain No items match the search query
82
83
Sushma M Mdb737c72020-12-14 16:04:04 -060084Verify Clear All Button In Sensor Page
85 [Documentation] Select all severity and verify clear all button de-selects all severity.
86 [Tags] Verify_Clear_All_Button_In_Sensor_Page
rramyasr-in4b2e1ae2023-02-13 03:35:20 -060087 [Teardown] Click Element ${xpath_sensors_filter}
Sushma M Mdb737c72020-12-14 16:04:04 -060088
89 Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s
90 Click Element ${xpath_sensors_filter}
91
92 # Select all severity from filter.
93 Click Element At Coordinates ${xpath_filter_ok} 0 0
94 Click Element At Coordinates ${xpath_filter_warning} 0 0
95 Click Element At Coordinates ${xpath_filter_critical} 0 0
96 Element Should Be Visible ${xpath_selected_severity}
97
98 # De-select all severity using clear all button in filter.
99 Click Element At Coordinates ${xpath_filter_clear_all} 0 0
100 Click Element ${xpath_sensors_filter}
101
102 Element Should Not Be Visible ${xpath_selected_severity}
103
104
Sushma M Mae084112020-12-14 15:44:59 -0600105Verify Filter By Severity Button OK
106 [Documentation] Select severity button OK from filter and verify.
107 [Tags] Verify_Filter_By_Severity_Button_OK
rramyasr-in5ee9e3b2023-02-16 10:27:02 -0600108 [Teardown] Clean Up Filter Values
Sushma M Mae084112020-12-14 15:44:59 -0600109
110 Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s
111 Click Element ${xpath_sensors_filter}
112
113 # Select OK severity from filter.
114 Wait Until Page Contains Element ${xpath_filter_ok} timeout=5s
115
116 Click Element At Coordinates ${xpath_filter_ok} 0 0
117 Click Element ${xpath_sensors_filter}
118
119 Element Should Contain ${xpath_selected_severity} OK
120 Element Should Not Contain ${xpath_selected_severity} Warning
121 Element Should Not Contain ${xpath_selected_severity} Critical
122
123
Sushma M M9495a942020-08-10 01:23:33 -0500124*** Keywords ***
125
Rahul Maheshwarib87a5a72021-09-02 06:49:29 -0500126Suite Setup Execution
127 [Documentation] Do suite setup tasks.
Sushma M M9495a942020-08-10 01:23:33 -0500128
Rahul Maheshwarib87a5a72021-09-02 06:49:29 -0500129 Launch Browser And Login GUI
Rahul Maheshwari142642d2021-08-24 00:00:15 -0500130 Click Element ${xpath_hardware_status_menu}
Sushma M M9495a942020-08-10 01:23:33 -0500131 Click Element ${xpath_sensor_sub_menu}
Rahul Maheshwari41747da2020-11-17 09:09:52 -0600132 Wait Until Keyword Succeeds 30 sec 5 sec Location Should Contain sensors
rramyasr-in66a3c192023-02-19 23:31:14 -0600133
134 # Added delay for sensor page to load completely by waiting for disapperance of progress bar.
135 Wait Until Element Is Not Visible ${xpath_page_loading_progress_bar} timeout=15min
rramyasr-in5ee9e3b2023-02-16 10:27:02 -0600136
137
138Clean Up Filter Values
139 [Documentation] Do clean up filter values after test execution
140 Click Element ${xpath_sensors_filter}
141 Click Element ${xpath_filter_clear_all}