blob: 596acb0948ba0c5c97fc9a48508bbbc58d874dcb [file] [log] [blame]
Rahul Maheshwari8c5f0542020-08-12 00:46:40 -05001*** Settings ***
2
3Documentation Test OpenBMC GUI "Date and time settings" sub-menu of "Configuration".
4
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
Anusha Dathatrie11a54d2020-08-31 08:35:47 -050013${xpath_date_time_heading} //h1[text()="Date and time settings"]
Rahul Maheshwari8c5f0542020-08-12 00:46:40 -050014${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 Dathatrie11a54d2020-08-31 08:35:47 -050026Verify 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 Maheshwari8c5f0542020-08-12 00:46:40 -050033Verify 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
40Verify 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
49Verify 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
63*** Keywords ***
64
65Suite Setup Execution
66 [Documentation] Do test case setup tasks.
67
68 Launch Browser And Login GUI
69 Click Element ${xpath_server_configuration}
70 Click Element ${xpath_date_time_settings_sub_menu}
71 Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain date-time-settings
72