blob: c85f11ed0e4d37e8d1b1d9fa12e5b4d7a7af5c11 [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
52
53 Wait Until Page Contains Element ${xpath_sensors_search}
Anusha Dathatrid9ddac22020-11-02 06:19:32 -060054 Input Text ${xpath_sensors_search} ambi
rramyasr-inc561b7a2022-09-01 13:13:45 -050055 Wait Until Page Contains Ambient timeout=120s
Anusha Dathatrib5f12de2020-10-19 02:40:22 -050056
57
58Verify Sensors Filter From Server Health Clickable
59 [Documentation] Verify sensors filter from server health clickable
60 [Tags] Verify_Sensors_Filter_From_Server_Health_Clickable
61
62 Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s
63 Click Element ${xpath_sensors_filter}
64
65 Page Should Contain Element ${xpath_filter_ok}
66 Page Should Contain Element ${xpath_filter_warning}
67 Page Should Contain Element ${xpath_filter_critical}
68 Page Should Contain Element ${xpath_filter_clear_all}
69
70
Sushma M Mff5684a2020-12-13 22:55:51 -060071Verify Invalid Text In Filter Sensors Search
72 [Documentation] Input invalid text in sensor search and verify error message.
73 [Tags] Verify_Invalid_Text_In_Filter_Sensors_Search
rramyasr-in4b2e1ae2023-02-13 03:35:20 -060074 [Teardown] Click Element ${xpath_clear_search_input}
Sushma M Mff5684a2020-12-13 22:55:51 -060075
76 Wait Until Page Contains Element ${xpath_sensors_search}
77 Input Text ${xpath_sensors_search} abcd123
78
79 Page Should Contain No items match the search query
80
81
Sushma M Mdb737c72020-12-14 16:04:04 -060082Verify Clear All Button In Sensor Page
83 [Documentation] Select all severity and verify clear all button de-selects all severity.
84 [Tags] Verify_Clear_All_Button_In_Sensor_Page
rramyasr-in4b2e1ae2023-02-13 03:35:20 -060085 [Teardown] Click Element ${xpath_sensors_filter}
Sushma M Mdb737c72020-12-14 16:04:04 -060086
87 Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s
88 Click Element ${xpath_sensors_filter}
89
90 # Select all severity from filter.
91 Click Element At Coordinates ${xpath_filter_ok} 0 0
92 Click Element At Coordinates ${xpath_filter_warning} 0 0
93 Click Element At Coordinates ${xpath_filter_critical} 0 0
94 Element Should Be Visible ${xpath_selected_severity}
95
96 # De-select all severity using clear all button in filter.
97 Click Element At Coordinates ${xpath_filter_clear_all} 0 0
98 Click Element ${xpath_sensors_filter}
99
100 Element Should Not Be Visible ${xpath_selected_severity}
101
102
Sushma M Mae084112020-12-14 15:44:59 -0600103Verify Filter By Severity Button OK
104 [Documentation] Select severity button OK from filter and verify.
105 [Tags] Verify_Filter_By_Severity_Button_OK
106
107 Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s
108 Click Element ${xpath_sensors_filter}
109
110 # Select OK severity from filter.
111 Wait Until Page Contains Element ${xpath_filter_ok} timeout=5s
112
113 Click Element At Coordinates ${xpath_filter_ok} 0 0
114 Click Element ${xpath_sensors_filter}
115
116 Element Should Contain ${xpath_selected_severity} OK
117 Element Should Not Contain ${xpath_selected_severity} Warning
118 Element Should Not Contain ${xpath_selected_severity} Critical
119
120
Sushma M M9495a942020-08-10 01:23:33 -0500121*** Keywords ***
122
Rahul Maheshwarib87a5a72021-09-02 06:49:29 -0500123Suite Setup Execution
124 [Documentation] Do suite setup tasks.
Sushma M M9495a942020-08-10 01:23:33 -0500125
Rahul Maheshwarib87a5a72021-09-02 06:49:29 -0500126 Launch Browser And Login GUI
Rahul Maheshwari142642d2021-08-24 00:00:15 -0500127 Click Element ${xpath_hardware_status_menu}
Sushma M M9495a942020-08-10 01:23:33 -0500128 Click Element ${xpath_sensor_sub_menu}
Rahul Maheshwari41747da2020-11-17 09:09:52 -0600129 Wait Until Keyword Succeeds 30 sec 5 sec Location Should Contain sensors
rramyasr-ine23c1122023-01-17 11:12:03 -0600130 Wait Until Element Is Not Visible ${xpath_page_loading_progress_bar} timeout=30
rramyasr-in993f4a02022-01-03 04:47:14 -0600131 # Added delay for sensor page to load completely.
132 Sleep 100s