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 | |
| 9 | |
| 10 | *** Variables *** |
Anusha Dathatri | b5f12de | 2020-10-19 02:40:22 -0500 | [diff] [blame] | 11 | ${xpath_sensor_heading} //h1[text()="Sensors"] |
| 12 | ${xpath_sensors_filter} //button[contains(text(),'Filter')] |
| 13 | ${xpath_sensors_search} //input[contains(@class,"search-input")] |
| 14 | ${xpath_filter_ok} //*[@data-test-id='tableFilter-checkbox-OK'] |
| 15 | ${xpath_filter_warning} //*[@data-test-id='tableFilter-checkbox-Warning'] |
| 16 | ${xpath_filter_critical} //*[@data-test-id='tableFilter-checkbox-Critical'] |
| 17 | ${xpath_filter_clear_all} //*[@data-test-id='tableFilter-button-clearAll'] |
Sushma M M | db737c7 | 2020-12-14 16:04:04 -0600 | [diff] [blame] | 18 | ${xpath_selected_severity} //*[@class="d-inline-block mb-0"] |
Sushma M M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 19 | |
| 20 | *** Test Cases *** |
| 21 | |
Sushma M M | 15fa20d | 2020-08-31 02:25:52 -0500 | [diff] [blame] | 22 | Verify Navigation To Sensors Page |
| 23 | [Documentation] Verify navigation to Sensors page. |
| 24 | [Tags] Verify_Navigation_To_Sensors_Page |
| 25 | |
| 26 | Page Should Contain Element ${xpath_sensor_heading} |
| 27 | |
| 28 | |
Sushma M M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 29 | Verify Existence Of All Sections In Sensor Page |
| 30 | [Documentation] Verify existence of all sections in sensor page. |
George Keishing | d6a7797 | 2022-01-31 12:50:29 -0600 | [diff] [blame] | 31 | [Tags] Verify_Existence_Of_All_Sections_In_Sensor_Page |
Sushma M M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 32 | |
| 33 | Page Should Contain Sensors |
| 34 | |
| 35 | |
| 36 | Verify Existence Of All Buttons And Input Boxes In Sensor Page |
| 37 | [Documentation] Verify existence of all buttons and input boxes in sensor page. |
| 38 | [Tags] Verify_Existence_Of_All_Buttons_And_Input_Boxes_In_Sensor_Page |
| 39 | |
| 40 | Page Should Contain Element ${xpath_sensors_filter} |
| 41 | Click Element ${xpath_sensors_filter} |
| 42 | |
| 43 | #Search field |
| 44 | Page Should Contain Element ${xpath_sensors_search} |
| 45 | |
| 46 | |
Anusha Dathatri | b5f12de | 2020-10-19 02:40:22 -0500 | [diff] [blame] | 47 | Verify Search Text Entered |
| 48 | [Documentation] Verify search text input allowed from "Sensors" page. |
| 49 | [Tags] Verify_Search_Text_Entered |
| 50 | |
| 51 | Wait Until Page Contains Element ${xpath_sensors_search} |
Anusha Dathatri | d9ddac2 | 2020-11-02 06:19:32 -0600 | [diff] [blame] | 52 | Input Text ${xpath_sensors_search} ambi |
rramyasr-in | c561b7a | 2022-09-01 13:13:45 -0500 | [diff] [blame] | 53 | Wait Until Page Contains Ambient timeout=120s |
Anusha Dathatri | b5f12de | 2020-10-19 02:40:22 -0500 | [diff] [blame] | 54 | |
| 55 | |
| 56 | Verify Sensors Filter From Server Health Clickable |
| 57 | [Documentation] Verify sensors filter from server health clickable |
| 58 | [Tags] Verify_Sensors_Filter_From_Server_Health_Clickable |
| 59 | |
| 60 | Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s |
| 61 | Click Element ${xpath_sensors_filter} |
| 62 | |
| 63 | Page Should Contain Element ${xpath_filter_ok} |
| 64 | Page Should Contain Element ${xpath_filter_warning} |
| 65 | Page Should Contain Element ${xpath_filter_critical} |
| 66 | Page Should Contain Element ${xpath_filter_clear_all} |
| 67 | |
| 68 | |
Sushma M M | ff5684a | 2020-12-13 22:55:51 -0600 | [diff] [blame] | 69 | Verify Invalid Text In Filter Sensors Search |
| 70 | [Documentation] Input invalid text in sensor search and verify error message. |
| 71 | [Tags] Verify_Invalid_Text_In_Filter_Sensors_Search |
| 72 | |
| 73 | Wait Until Page Contains Element ${xpath_sensors_search} |
| 74 | Input Text ${xpath_sensors_search} abcd123 |
| 75 | |
| 76 | Page Should Contain No items match the search query |
| 77 | |
| 78 | |
Sushma M M | db737c7 | 2020-12-14 16:04:04 -0600 | [diff] [blame] | 79 | Verify Clear All Button In Sensor Page |
| 80 | [Documentation] Select all severity and verify clear all button de-selects all severity. |
| 81 | [Tags] Verify_Clear_All_Button_In_Sensor_Page |
| 82 | |
| 83 | Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s |
| 84 | Click Element ${xpath_sensors_filter} |
| 85 | |
| 86 | # Select all severity from filter. |
| 87 | Click Element At Coordinates ${xpath_filter_ok} 0 0 |
| 88 | Click Element At Coordinates ${xpath_filter_warning} 0 0 |
| 89 | Click Element At Coordinates ${xpath_filter_critical} 0 0 |
| 90 | Element Should Be Visible ${xpath_selected_severity} |
| 91 | |
| 92 | # De-select all severity using clear all button in filter. |
| 93 | Click Element At Coordinates ${xpath_filter_clear_all} 0 0 |
| 94 | Click Element ${xpath_sensors_filter} |
| 95 | |
| 96 | Element Should Not Be Visible ${xpath_selected_severity} |
| 97 | |
| 98 | |
Sushma M M | ae08411 | 2020-12-14 15:44:59 -0600 | [diff] [blame] | 99 | Verify Filter By Severity Button OK |
| 100 | [Documentation] Select severity button OK from filter and verify. |
| 101 | [Tags] Verify_Filter_By_Severity_Button_OK |
| 102 | |
| 103 | Wait Until Page Contains Element ${xpath_sensors_filter} timeout=15s |
| 104 | Click Element ${xpath_sensors_filter} |
| 105 | |
| 106 | # Select OK severity from filter. |
| 107 | Wait Until Page Contains Element ${xpath_filter_ok} timeout=5s |
| 108 | |
| 109 | Click Element At Coordinates ${xpath_filter_ok} 0 0 |
| 110 | Click Element ${xpath_sensors_filter} |
| 111 | |
| 112 | Element Should Contain ${xpath_selected_severity} OK |
| 113 | Element Should Not Contain ${xpath_selected_severity} Warning |
| 114 | Element Should Not Contain ${xpath_selected_severity} Critical |
| 115 | |
| 116 | |
Sushma M M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 117 | *** Keywords *** |
| 118 | |
Rahul Maheshwari | b87a5a7 | 2021-09-02 06:49:29 -0500 | [diff] [blame] | 119 | Suite Setup Execution |
| 120 | [Documentation] Do suite setup tasks. |
Sushma M M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 121 | |
Rahul Maheshwari | b87a5a7 | 2021-09-02 06:49:29 -0500 | [diff] [blame] | 122 | Launch Browser And Login GUI |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 123 | Click Element ${xpath_hardware_status_menu} |
Sushma M M | 9495a94 | 2020-08-10 01:23:33 -0500 | [diff] [blame] | 124 | Click Element ${xpath_sensor_sub_menu} |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 125 | Wait Until Keyword Succeeds 30 sec 5 sec Location Should Contain sensors |
rramyasr-in | 993f4a0 | 2022-01-03 04:47:14 -0600 | [diff] [blame] | 126 | # Added delay for sensor page to load completely. |
| 127 | Sleep 100s |