blob: 0780ef0b1b557660faf41738074925767016f531 [file] [log] [blame]
Sushma M M0125f0c2020-08-12 21:43:32 -05001*** Settings ***
2
3Documentation Test OpenBMC GUI "Profile settings" menu.
4
Rahul Maheshwari41747da2020-11-17 09:09:52 -06005Resource ../../lib/gui_resource.robot
Sushma M M0125f0c2020-08-12 21:43:32 -05006
7Suite Setup Launch Browser And Login GUI
8Suite Teardown Close Browser
9Test Setup Test Setup Execution
10
11
12*** Variables ***
13
Sushma M Mc96a4b62020-11-12 01:01:42 -060014${xpath_new_password} //input[@id="password"]
15${xpath_confirm_password} //input[@id="password-confirmation"]
16${xpath_logged_usename} //*[@data-test-id='appHeader-container-user']
17${xpath_default_UTC} //*[@data-test-id='profileSettings-radio-defaultUTC']
18${xpath_profile_settings_save_button} //*[@data-test-id='profileSettings-button-saveSettings']
Sushma M M0125f0c2020-08-12 21:43:32 -050019
20*** Test Cases ***
21
22Verify Navigation To Profile Settings Page
23 [Documentation] Verify navigation to profile settings page.
24 [Tags] Verify_Navigation_To_Profile_Settings_page
25
26 Page Should Contain Profile settings
27
28
29Verify Existence Of All Sections In Profile Settings Page
30 [Documentation] Verify existence of all sections in profile settings page.
31 [Tags] Verify_Existence_Of_All_Sections_In_Profile_Settings_Page
32
33 Page Should Contain Profile information
34 Page Should Contain Change password
35 Page Should Contain Timezone display preference
36
37
38Verify Existence Of All Buttons And Input Boxes In Profile Settings Page
39 [Documentation] Verify existence of all buttons and input boxes in profile settings page.
40 [Tags] Verify_Existence_Of_All_Buttons_And_Input_Boxes_In_Profile_Settings_Page
41
42 # Input Boxes in profile settings page.
43 Page Should Contain Element ${xpath_new_password}
44 Page Should Contain Element ${xpath_confirm_password}
45
46 # Buttons in profile settings page.
47 Page Should Contain Element ${xpath_save_settings_button}
48
49
Sushma M Md63190b2020-08-19 06:52:14 -050050Verify Logged In Username
51 [Documentation] Verify logged in username in profile settings page.
52 [Tags] Verify_Logged_In_Username
53
54 Wait Until Page Contains Element ${xpath_logged_usename}
55 ${gui_logged_username}= Get Text ${xpath_logged_usename}
56 Should Contain ${gui_logged_username} ${OPENBMC_USERNAME}
57
58
Sushma M Mc96a4b62020-11-12 01:01:42 -060059Verify Default UTC Timezone Display
60 [Documentation] Set default UTC timezone via GUI and verify timezone value in overview page.
61 [Tags] Verify_Default_UTC_Timezone_Display
62
63 Click Element At Coordinates ${xpath_default_UTC} 0 0
64 Click Element ${xpath_profile_settings_save_button}
65
66 # Navigate to the overview page.
67
68 Click Element ${xpath_overview_menu}
69 Wait Until Page Contains Overview timeout=30s
70
71 ${cli_date_time}= CLI Get BMC DateTime
72
73 # Fetching hour and minute from BMC CLI to handle seconds difference during execution.
74
75 ${cli_hour_and_min}= Convert Date ${cli_date_time} result_format=%H:%M
76 Page Should Contain ${cli_hour_and_min}
77
78
Sushma M M0125f0c2020-08-12 21:43:32 -050079*** Keywords ***
80
81Test Setup Execution
82 [Documentation] Do test case setup tasks.
83
84 # Navigate to https://xx.xx.xx.xx/#/profile-settings profile-settings page.
85
86 Wait Until Page Contains Element ${xpath_root_button_menu}
87 Click Element ${xpath_root_button_menu}
88 Click Element ${xpath_profile_settings}
89 Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain profile-settings