blob: 9d1b1a281146d30bc2072825b963d510072ee32c [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 ***
rramyasr-in4b2e1ae2023-02-13 03:35:20 -060011
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"]
rramyasr-in4b2e1ae2023-02-13 03:35:20 -060020${xpath_clear_search_input} //*[@title="Clear search input"]
Sushma M M9495a942020-08-10 01:23:33 -050021
22*** Test Cases ***
23
Sushma M M15fa20d2020-08-31 02:25:52 -050024Verify Navigation To Sensors Page
25 [Documentation] Verify navigation to Sensors page.
26 [Tags] Verify_Navigation_To_Sensors_Page
27
28 Page Should Contain Element ${xpath_sensor_heading}
29
30
Sushma M M9495a942020-08-10 01:23:33 -050031Verify Existence Of All Sections In Sensor Page
32 [Documentation] Verify existence of all sections in sensor page.
George Keishingd6a77972022-01-31 12:50:29 -060033 [Tags] Verify_Existence_Of_All_Sections_In_Sensor_Page
Sushma M M9495a942020-08-10 01:23:33 -050034
35 Page Should Contain Sensors
36
37
38Verify Existence Of All Buttons And Input Boxes In Sensor Page
39 [Documentation] Verify existence of all buttons and input boxes in sensor page.
40 [Tags] Verify_Existence_Of_All_Buttons_And_Input_Boxes_In_Sensor_Page
41
42 Page Should Contain Element ${xpath_sensors_filter}
43 Click Element ${xpath_sensors_filter}
44
45 #Search field
46 Page Should Contain Element ${xpath_sensors_search}
47
48
Anusha Dathatrib5f12de2020-10-19 02:40:22 -050049Verify Search Text Entered
50 [Documentation] Verify search text input allowed from "Sensors" page.
51 [Tags] Verify_Search_Text_Entered
rramyasr-in5ee9e3b2023-02-16 10:27:02 -060052 [Teardown] Click Element ${xpath_clear_search_input}
Anusha Dathatrib5f12de2020-10-19 02:40:22 -050053
54 Wait Until Page Contains Element ${xpath_sensors_search}
Anusha Dathatrid9ddac22020-11-02 06:19:32 -060055 Input Text ${xpath_sensors_search} ambi
rramyasr-inc561b7a2022-09-01 13:13:45 -050056 Wait Until Page Contains Ambient timeout=120s
Anusha Dathatrib5f12de2020-10-19 02:40:22 -050057
58
59Verify Sensors Filter From Server Health Clickable
60 [Documentation] Verify sensors filter from server health clickable
61 [Tags] Verify_Sensors_Filter_From_Server_Health_Clickable
62
63 Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s
64 Click Element ${xpath_sensors_filter}
65
66 Page Should Contain Element ${xpath_filter_ok}
67 Page Should Contain Element ${xpath_filter_warning}
68 Page Should Contain Element ${xpath_filter_critical}
69 Page Should Contain Element ${xpath_filter_clear_all}
70
71
Sushma M Mff5684a2020-12-13 22:55:51 -060072Verify Invalid Text In Filter Sensors Search
73 [Documentation] Input invalid text in sensor search and verify error message.
74 [Tags] Verify_Invalid_Text_In_Filter_Sensors_Search
rramyasr-in4b2e1ae2023-02-13 03:35:20 -060075 [Teardown] Click Element ${xpath_clear_search_input}
Sushma M Mff5684a2020-12-13 22:55:51 -060076
77 Wait Until Page Contains Element ${xpath_sensors_search}
78 Input Text ${xpath_sensors_search} abcd123
79
80 Page Should Contain No items match the search query
81
82
Sushma M Mdb737c72020-12-14 16:04:04 -060083Verify Clear All Button In Sensor Page
84 [Documentation] Select all severity and verify clear all button de-selects all severity.
85 [Tags] Verify_Clear_All_Button_In_Sensor_Page
rramyasr-in4b2e1ae2023-02-13 03:35:20 -060086 [Teardown] Click Element ${xpath_sensors_filter}
Sushma M Mdb737c72020-12-14 16:04:04 -060087
88 Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s
89 Click Element ${xpath_sensors_filter}
90
91 # Select all severity from filter.
92 Click Element At Coordinates ${xpath_filter_ok} 0 0
93 Click Element At Coordinates ${xpath_filter_warning} 0 0
94 Click Element At Coordinates ${xpath_filter_critical} 0 0
95 Element Should Be Visible ${xpath_selected_severity}
96
97 # De-select all severity using clear all button in filter.
98 Click Element At Coordinates ${xpath_filter_clear_all} 0 0
99 Click Element ${xpath_sensors_filter}
100
101 Element Should Not Be Visible ${xpath_selected_severity}
102
103
Sushma M Mae084112020-12-14 15:44:59 -0600104Verify Filter By Severity Button OK
105 [Documentation] Select severity button OK from filter and verify.
106 [Tags] Verify_Filter_By_Severity_Button_OK
rramyasr-in5ee9e3b2023-02-16 10:27:02 -0600107 [Teardown] Clean Up Filter Values
Sushma M Mae084112020-12-14 15:44:59 -0600108
109 Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s
110 Click Element ${xpath_sensors_filter}
111
112 # Select OK severity from filter.
113 Wait Until Page Contains Element ${xpath_filter_ok} timeout=5s
114
115 Click Element At Coordinates ${xpath_filter_ok} 0 0
116 Click Element ${xpath_sensors_filter}
117
118 Element Should Contain ${xpath_selected_severity} OK
119 Element Should Not Contain ${xpath_selected_severity} Warning
120 Element Should Not Contain ${xpath_selected_severity} Critical
121
122
Sushma M M9495a942020-08-10 01:23:33 -0500123*** Keywords ***
124
Rahul Maheshwarib87a5a72021-09-02 06:49:29 -0500125Suite Setup Execution
126 [Documentation] Do suite setup tasks.
Sushma M M9495a942020-08-10 01:23:33 -0500127
Rahul Maheshwarib87a5a72021-09-02 06:49:29 -0500128 Launch Browser And Login GUI
Rahul Maheshwari142642d2021-08-24 00:00:15 -0500129 Click Element ${xpath_hardware_status_menu}
Sushma M M9495a942020-08-10 01:23:33 -0500130 Click Element ${xpath_sensor_sub_menu}
Rahul Maheshwari41747da2020-11-17 09:09:52 -0600131 Wait Until Keyword Succeeds 30 sec 5 sec Location Should Contain sensors
rramyasr-in66a3c192023-02-19 23:31:14 -0600132
133 # Added delay for sensor page to load completely by waiting for disapperance of progress bar.
134 Wait Until Element Is Not Visible ${xpath_page_loading_progress_bar} timeout=15min
rramyasr-in5ee9e3b2023-02-16 10:27:02 -0600135
136
137Clean Up Filter Values
138 [Documentation] Do clean up filter values after test execution
139 Click Element ${xpath_sensors_filter}
140 Click Element ${xpath_filter_clear_all}