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