blob: 3b54bedebb33f9c9ca1d863376ef39c4f53eba1c [file] [log] [blame]
Rahul Maheshwari8c5f0542020-08-12 00:46:40 -05001*** Settings ***
2
Rahul Maheshwari142642d2021-08-24 00:00:15 -05003Documentation Test OpenBMC GUI "Date and time" sub-menu of "Settings".
Rahul Maheshwari8c5f0542020-08-12 00:46:40 -05004
Rahul Maheshwari41747da2020-11-17 09:09:52 -06005Resource ../../lib/gui_resource.robot
Rahul Maheshwari8c5f0542020-08-12 00:46:40 -05006
7Suite Setup Suite Setup Execution
8Suite Teardown Close Browser
9
10
11*** Variables ***
12
Rahul Maheshwari142642d2021-08-24 00:00:15 -050013${xpath_date_time_heading} //h1[text()="Date and time"]
14${xpath_select_manual} //*[@data-test-id="dateTime-radio-configureManual"]
15${xpath_select_ntp} //*[@data-test-id="dateTime-radio-configureNTP"]
16${xpath_manual_date} //input[@data-test-id="dateTime-input-manualDate"]
17${xpath_manual_time} //input[@data-test-id="dateTime-input-manualTime"]
18${xpath_ntp_server1} //input[@data-test-id="dateTime-input-ntpServer1"]
19${xpath_ntp_server2} //input[@data-test-id="dateTime-input-ntpServer2"]
20${xpath_ntp_server3} //input[@data-test-id="dateTime-input-ntpServer3"]
21${xpath_select_save_settings} //button[@data-test-id="dateTime-button-saveSettings"]
Rahul Maheshwari8c5f0542020-08-12 00:46:40 -050022
23
24*** Test Cases ***
25
Rahul Maheshwari142642d2021-08-24 00:00:15 -050026Verify Navigation To Date And Time Page
27 [Documentation] Verify navigation to date and time page.
28 [Tags] Verify_Navigation_To_Date_And_Time_Page
Anusha Dathatrie11a54d2020-08-31 08:35:47 -050029
30 Page Should Contain Element ${xpath_date_time_heading}
31
32
Rahul Maheshwari142642d2021-08-24 00:00:15 -050033Verify Existence Of All Sections In Date And Time Page
34 [Documentation] Verify existence of all sections in date and time page.
George Keishingd6a77972022-01-31 12:50:29 -060035 [Tags] Verify_Existence_Of_All_Sections_In_Date_And_Time_Page
Rahul Maheshwari8c5f0542020-08-12 00:46:40 -050036
37 Page Should Contain Configure settings
38
39
Rahul Maheshwari142642d2021-08-24 00:00:15 -050040Verify Existence Of All Buttons In Date And Time Page
Rahul Maheshwari8c5f0542020-08-12 00:46:40 -050041 [Documentation] Verify existence of all buttons in date and time settings page.
Rahul Maheshwari142642d2021-08-24 00:00:15 -050042 [Tags] Verify_Existence_Of_All_Buttons_In_Date_And_Time_Page
Rahul Maheshwari8c5f0542020-08-12 00:46:40 -050043
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
Rahul Maheshwari142642d2021-08-24 00:00:15 -050049Verify Existence Of All Input Boxes In Date And Time Page
50 [Documentation] Verify existence of all input boxes in date time page.
51 [Tags] Verify_Existence_Of_All_Input_Boxes_In_Date_And_Time_Page
Rahul Maheshwari8c5f0542020-08-12 00:46:40 -050052
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 M2ba26e82020-11-25 14:07:15 -060063Verify 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
George Keishingd6a77972022-01-31 12:50:29 -060075Verify Display Of Date And Time In GUI Page
Sushma M M17ac1f52020-11-25 05:38:00 -060076 [Documentation] Get date and time from Redfish and verify it via GUI date and time page.
George Keishingd6a77972022-01-31 12:50:29 -060077 [Tags] Verify_Display_Of_Date_And_Time_In_GUI_Page
Sushma M M17ac1f52020-11-25 05:38:00 -060078
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
sarandev39cbaca82023-01-10 00:16:55 -060093Verify Profile Setting Button In Date And Time Page
94 [Documentation] Verify navigation to profile setting page after clicking
95 ... on profile setting button in date and time page.
96 [Tags] Verify_Profile_Setting_Button_In_Date_And_Time_Page
97
98 Click Element ${xpath_Profile_Settings}
99 Wait Until Page Contains Element ${xpath_profile_settings_heading} timeout=10
100 Location Should Contain profile-settings
101
Sushma M M17ac1f52020-11-25 05:38:00 -0600102
Sushma M Mcba1b822020-11-25 16:02:48 -0600103Verify NTP Server Input Fields In Date And Time Page
104 [Documentation] Verify NTP server input fields in date and time page.
105 [Tags] Verify_NTP_Server_Input_Fields_In_Date_And_Time_Page
106
107 Redfish.Patch ${REDFISH_NW_PROTOCOL_URI}
108 ... body={'NTP':{'NTPServers': ['10.10.10.10', '20.20.20.20', '30.30.30.30']}}
109 ... valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}]
110
111 # Refresh the NTP Page.
112 Click Element ${xpath_refresh_button}
113 Wait Until Page Contains Element ${xpath_select_ntp} timeout=10s
114
115 Textfield Value Should Be ${xpath_ntp_server1} 10.10.10.10
116 Textfield Value Should Be ${xpath_ntp_server2} 20.20.20.20
117 Textfield Value Should Be ${xpath_ntp_server3} 30.30.30.30
118
119
Rahul Maheshwari8c5f0542020-08-12 00:46:40 -0500120*** Keywords ***
121
122Suite Setup Execution
123 [Documentation] Do test case setup tasks.
124
125 Launch Browser And Login GUI
Sushma M M17ac1f52020-11-25 05:38:00 -0600126 Navigate To Date and Time Page
127
128Navigate To Date and Time Page
129 [Documentation] Navigate to the date and time page from main menu.
130
Rahul Maheshwari142642d2021-08-24 00:00:15 -0500131 Click Element ${xpath_settings_menu}
132 Click Element ${xpath_date_time_sub_menu}
133 Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain date-time
rramyasr-in05da0fb2022-08-26 05:52:03 -0500134 Wait Until Element Is Not Visible ${xpath_page_loading_progress_bar} timeout=30
135