Rahul Maheshwari | 8c5f054 | 2020-08-12 00:46:40 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Test OpenBMC GUI "Date and time settings" sub-menu of "Configuration". |
| 4 | |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 5 | Resource ../../lib/gui_resource.robot |
Rahul Maheshwari | 8c5f054 | 2020-08-12 00:46:40 -0500 | [diff] [blame] | 6 | |
| 7 | Suite Setup Suite Setup Execution |
| 8 | Suite Teardown Close Browser |
| 9 | |
| 10 | |
| 11 | *** Variables *** |
| 12 | |
Anusha Dathatri | e11a54d | 2020-08-31 08:35:47 -0500 | [diff] [blame] | 13 | ${xpath_date_time_heading} //h1[text()="Date and time settings"] |
Rahul Maheshwari | 8c5f054 | 2020-08-12 00:46:40 -0500 | [diff] [blame] | 14 | ${xpath_select_manual} //*[@data-test-id="dateTimeSettings-radio-configureManual"] |
| 15 | ${xpath_select_ntp} //*[@data-test-id="dateTimeSettings-radio-configureNTP"] |
| 16 | ${xpath_manual_date} //input[@data-test-id="dateTimeSettings-input-manualDate"] |
| 17 | ${xpath_manual_time} //input[@data-test-id="dateTimeSettings-input-manualTime"] |
| 18 | ${xpath_ntp_server1} //input[@data-test-id="dateTimeSettings-input-ntpServer1"] |
| 19 | ${xpath_ntp_server2} //input[@data-test-id="dateTimeSettings-input-ntpServer2"] |
| 20 | ${xpath_ntp_server3} //input[@data-test-id="dateTimeSettings-input-ntpServer3"] |
| 21 | ${xpath_select_save_settings} //button[@data-test-id="dateTimeSettings-button-saveSettings"] |
| 22 | |
| 23 | |
| 24 | *** Test Cases *** |
| 25 | |
Anusha Dathatri | e11a54d | 2020-08-31 08:35:47 -0500 | [diff] [blame] | 26 | Verify Navigation To Date And Time Settings Page |
| 27 | [Documentation] Verify navigation to date and time settings page. |
| 28 | [Tags] Verify_Navigation_To_Date_And_Time_Settings_Page |
| 29 | |
| 30 | Page Should Contain Element ${xpath_date_time_heading} |
| 31 | |
| 32 | |
Rahul Maheshwari | 8c5f054 | 2020-08-12 00:46:40 -0500 | [diff] [blame] | 33 | Verify Existence Of All Sections In Date And Time Settings Page |
| 34 | [Documentation] Verify existence of all sections in date and time settings page. |
| 35 | [Tags] Verify_Existence_Of_All_Sections_In_Date_And_Time_Settings_Page |
| 36 | |
| 37 | Page Should Contain Configure settings |
| 38 | |
| 39 | |
| 40 | Verify Existence Of All Buttons In Date And Time Settings Page |
| 41 | [Documentation] Verify existence of all buttons in date and time settings page. |
| 42 | [Tags] Verify_Existence_Of_All_Buttons_In_Date_And_Time_Settings_Page |
| 43 | |
| 44 | Page Should Contain Element ${xpath_select_manual} |
| 45 | Page Should Contain Element ${xpath_select_ntp} |
| 46 | Page Should Contain Element ${xpath_select_save_settings} |
| 47 | |
| 48 | |
| 49 | Verify Existence Of All Input Boxes In Date And Time Settings Page |
| 50 | [Documentation] Verify existence of all input boxes in date time settings page. |
| 51 | [Tags] Verify_Existence_Of_All_Input_Boxes_In_Date_And_Time_Settings_Page |
| 52 | |
| 53 | Click Element At Coordinates ${xpath_select_manual} 0 0 |
| 54 | Page Should Contain Element ${xpath_manual_date} |
| 55 | Page Should Contain Element ${xpath_manual_time} |
| 56 | |
| 57 | Click Element At Coordinates ${xpath_select_ntp} 0 0 |
| 58 | Page Should Contain Element ${xpath_ntp_server1} |
| 59 | Page Should Contain Element ${xpath_ntp_server2} |
| 60 | Page Should Contain Element ${xpath_ntp_server3} |
| 61 | |
| 62 | |
Sushma M M | 2ba26e8 | 2020-11-25 14:07:15 -0600 | [diff] [blame] | 63 | Verify Date And Time From Configuration Section |
| 64 | [Documentation] Get date and time from configuration section and verify it via BMC CLI. |
| 65 | [Tags] Verify_Date_And_Time_From_Configuration_Section |
| 66 | |
| 67 | Click Element At Coordinates ${xpath_select_manual} 0 0 |
| 68 | ${manual_date}= Get Value ${xpath_manual_date} |
| 69 | ${manual_time}= Get Value ${xpath_manual_time} |
| 70 | |
| 71 | ${cli_date_time}= CLI Get BMC DateTime |
| 72 | Should contain ${cli_date_time} ${manual_date} ${manual_time} |
| 73 | |
| 74 | |
Sushma M M | 17ac1f5 | 2020-11-25 05:38:00 -0600 | [diff] [blame] | 75 | Verify Display Of Date and Time In GUI Page |
| 76 | [Documentation] Get date and time from Redfish and verify it via GUI date and time page. |
| 77 | [Tags] Verify_Display_Of_Date_And_Time_In_Gui_Page |
| 78 | |
| 79 | # Set Default timezone in profile settings page. |
| 80 | Set Timezone In Profile Settings Page Default |
| 81 | Navigate To Date and Time Page |
| 82 | |
| 83 | # Get date and time from Redfish. |
| 84 | ${redfish_date_time}= CLI Get BMC DateTime |
| 85 | ${redfish_date}= Convert Date ${redfish_date_time} result_format=%Y-%m-%d |
| 86 | ${redfish_time}= Convert Date ${redfish_date_time} result_format=%H:%M |
| 87 | |
| 88 | # Verify date and time via GUI date and time page. |
| 89 | |
| 90 | Page Should Contain ${redfish_date} |
| 91 | Page Should Contain ${redfish_time} |
| 92 | |
| 93 | |
Sushma M M | cba1b82 | 2020-11-25 16:02:48 -0600 | [diff] [blame] | 94 | Verify NTP Server Input Fields In Date And Time Page |
| 95 | [Documentation] Verify NTP server input fields in date and time page. |
| 96 | [Tags] Verify_NTP_Server_Input_Fields_In_Date_And_Time_Page |
| 97 | |
| 98 | Redfish.Patch ${REDFISH_NW_PROTOCOL_URI} |
| 99 | ... body={'NTP':{'NTPServers': ['10.10.10.10', '20.20.20.20', '30.30.30.30']}} |
| 100 | ... valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}] |
| 101 | |
| 102 | # Refresh the NTP Page. |
| 103 | Click Element ${xpath_refresh_button} |
| 104 | Wait Until Page Contains Element ${xpath_select_ntp} timeout=10s |
| 105 | |
| 106 | Textfield Value Should Be ${xpath_ntp_server1} 10.10.10.10 |
| 107 | Textfield Value Should Be ${xpath_ntp_server2} 20.20.20.20 |
| 108 | Textfield Value Should Be ${xpath_ntp_server3} 30.30.30.30 |
| 109 | |
| 110 | |
Rahul Maheshwari | 8c5f054 | 2020-08-12 00:46:40 -0500 | [diff] [blame] | 111 | *** Keywords *** |
| 112 | |
| 113 | Suite Setup Execution |
| 114 | [Documentation] Do test case setup tasks. |
| 115 | |
| 116 | Launch Browser And Login GUI |
Sushma M M | 17ac1f5 | 2020-11-25 05:38:00 -0600 | [diff] [blame] | 117 | Navigate To Date and Time Page |
| 118 | |
| 119 | Navigate To Date and Time Page |
| 120 | [Documentation] Navigate to the date and time page from main menu. |
| 121 | |
Rahul Maheshwari | 8c5f054 | 2020-08-12 00:46:40 -0500 | [diff] [blame] | 122 | Click Element ${xpath_server_configuration} |
| 123 | Click Element ${xpath_date_time_settings_sub_menu} |
| 124 | Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain date-time-settings |