1*** Settings *** 2 3Documentation Test OpenBMC GUI "Sensors" sub-menu. 4Resource ../../lib/gui_resource.robot 5 6Suite Setup Suite Setup Execution 7Suite Teardown Close Browser 8 9 10*** Variables *** 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'] 18${xpath_selected_severity} //*[@class="d-inline-block mb-0"] 19 20*** Test Cases *** 21 22Verify 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 29Verify Existence Of All Sections In Sensor Page 30 [Documentation] Verify existence of all sections in sensor page. 31 [Tags] Verify_Existence_Of_All_Sections_In_Sensor_Page 32 33 Page Should Contain Sensors 34 35 36Verify 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 47Verify 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} 52 Input Text ${xpath_sensors_search} ambi 53 Wait Until Page Contains Ambient timeout=15 54 55 56Verify 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 69Verify 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 79Verify 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 99Verify 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 117*** Keywords *** 118 119Suite Setup Execution 120 [Documentation] Do suite setup tasks. 121 122 Launch Browser And Login GUI 123 Click Element ${xpath_hardware_status_menu} 124 Click Element ${xpath_sensor_sub_menu} 125 Wait Until Keyword Succeeds 30 sec 5 sec Location Should Contain sensors 126 # Added delay for sensor page to load completely. 127 Sleep 100s 128