Sushma M M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Test OpenBMC GUI "Sensors" sub-menu. |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 4 | Resource ../../lib/gui_resource.robot |
Sushma M M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 5 | |
Rahul Maheshwari | b87a5a7 | 2021-09-02 06:49:29 -0500 | [diff] [blame] | 6 | Suite Setup Suite Setup Execution |
Sushma M M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 7 | Suite Teardown Close Browser |
Sushma M M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 8 | |
George Keishing | 0302e9a | 2023-10-12 21:48:35 +0530 | [diff] [blame] | 9 | Force Tags Sensors_Sub_Menu |
Sushma M M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 10 | |
| 11 | *** Variables *** |
rramyasr-in | 4b2e1ae | 2023-02-13 03:35:20 -0600 | [diff] [blame] | 12 | |
Anusha Dathatri | b5f12de | 2020-10-19 02:40:22 -0500 | [diff] [blame] | 13 | ${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 M | db737c7 | 2020-12-14 16:04:04 -0600 | [diff] [blame] | 20 | ${xpath_selected_severity} //*[@class="d-inline-block mb-0"] |
rramyasr-in | 4b2e1ae | 2023-02-13 03:35:20 -0600 | [diff] [blame] | 21 | ${xpath_clear_search_input} //*[@title="Clear search input"] |
Sushma M M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 22 | |
| 23 | *** Test Cases *** |
| 24 | |
Sushma M M | 15fa20d | 2020-08-31 02:25:52 -0500 | [diff] [blame] | 25 | Verify 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 M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 32 | Verify Existence Of All Sections In Sensor Page |
| 33 | [Documentation] Verify existence of all sections in sensor page. |
George Keishing | d6a7797 | 2022-01-31 12:50:29 -0600 | [diff] [blame] | 34 | [Tags] Verify_Existence_Of_All_Sections_In_Sensor_Page |
Sushma M M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 35 | |
| 36 | Page Should Contain Sensors |
| 37 | |
| 38 | |
| 39 | Verify 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 Dathatri | b5f12de | 2020-10-19 02:40:22 -0500 | [diff] [blame] | 50 | Verify Search Text Entered |
| 51 | [Documentation] Verify search text input allowed from "Sensors" page. |
| 52 | [Tags] Verify_Search_Text_Entered |
rramyasr-in | 5ee9e3b | 2023-02-16 10:27:02 -0600 | [diff] [blame] | 53 | [Teardown] Click Element ${xpath_clear_search_input} |
Anusha Dathatri | b5f12de | 2020-10-19 02:40:22 -0500 | [diff] [blame] | 54 | |
| 55 | Wait Until Page Contains Element ${xpath_sensors_search} |
Anusha Dathatri | d9ddac2 | 2020-11-02 06:19:32 -0600 | [diff] [blame] | 56 | Input Text ${xpath_sensors_search} ambi |
rramyasr-in | c561b7a | 2022-09-01 13:13:45 -0500 | [diff] [blame] | 57 | Wait Until Page Contains Ambient timeout=120s |
Anusha Dathatri | b5f12de | 2020-10-19 02:40:22 -0500 | [diff] [blame] | 58 | |
| 59 | |
| 60 | Verify 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 M | ff5684a | 2020-12-13 22:55:51 -0600 | [diff] [blame] | 73 | Verify 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-in | 4b2e1ae | 2023-02-13 03:35:20 -0600 | [diff] [blame] | 76 | [Teardown] Click Element ${xpath_clear_search_input} |
Sushma M M | ff5684a | 2020-12-13 22:55:51 -0600 | [diff] [blame] | 77 | |
| 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 M | db737c7 | 2020-12-14 16:04:04 -0600 | [diff] [blame] | 84 | Verify 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-in | 4b2e1ae | 2023-02-13 03:35:20 -0600 | [diff] [blame] | 87 | [Teardown] Click Element ${xpath_sensors_filter} |
Sushma M M | db737c7 | 2020-12-14 16:04:04 -0600 | [diff] [blame] | 88 | |
| 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 M | ae08411 | 2020-12-14 15:44:59 -0600 | [diff] [blame] | 105 | Verify Filter By Severity Button OK |
| 106 | [Documentation] Select severity button OK from filter and verify. |
| 107 | [Tags] Verify_Filter_By_Severity_Button_OK |
rramyasr-in | 5ee9e3b | 2023-02-16 10:27:02 -0600 | [diff] [blame] | 108 | [Teardown] Clean Up Filter Values |
Sushma M M | ae08411 | 2020-12-14 15:44:59 -0600 | [diff] [blame] | 109 | |
| 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 M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 124 | *** Keywords *** |
| 125 | |
Rahul Maheshwari | b87a5a7 | 2021-09-02 06:49:29 -0500 | [diff] [blame] | 126 | Suite Setup Execution |
| 127 | [Documentation] Do suite setup tasks. |
Sushma M M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 128 | |
Rahul Maheshwari | b87a5a7 | 2021-09-02 06:49:29 -0500 | [diff] [blame] | 129 | Launch Browser And Login GUI |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 130 | Click Element ${xpath_hardware_status_menu} |
Sushma M M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 131 | Click Element ${xpath_sensor_sub_menu} |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 132 | Wait Until Keyword Succeeds 30 sec 5 sec Location Should Contain sensors |
rramyasr-in | 66a3c19 | 2023-02-19 23:31:14 -0600 | [diff] [blame] | 133 | |
| 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-in | 5ee9e3b | 2023-02-16 10:27:02 -0600 | [diff] [blame] | 136 | |
| 137 | |
| 138 | Clean 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} |