Added test for Profile Settings page
Changes:
- Added suite to test Profile Settings page
- Added tests to verify existence of all sections,
and buttons of Profile Settings page
Change-Id: If0c782efad89c4a201fb04e2daf3301ea8d7368c
Signed-off-by: Sushma M M <sushmm99@in.ibm.com>
diff --git a/gui/data/resource_variables.py b/gui/data/resource_variables.py
index 5407219..aec5a6a 100644
--- a/gui/data/resource_variables.py
+++ b/gui/data/resource_variables.py
@@ -127,6 +127,8 @@
# xpath for overview menu
xpath_overview_menu = "//a[@href='#/']"
+ xpath_root_button_menu = "//*[@id='app-header-user__BV_toggle_']"
+ xpath_profile_settings = "//a[@href='#/profile-settings']"
# xpath for health menu
xpath_health_menu = "//button[@aria-controls='health-menu']"
diff --git a/gui/gui_test/overview_menu/test_obmc_profile_settings.robot b/gui/gui_test/overview_menu/test_obmc_profile_settings.robot
new file mode 100644
index 0000000..b44ee7f
--- /dev/null
+++ b/gui/gui_test/overview_menu/test_obmc_profile_settings.robot
@@ -0,0 +1,57 @@
+*** Settings ***
+
+Documentation Test OpenBMC GUI "Profile settings" menu.
+
+Resource ../../lib/resource.robot
+
+Suite Setup Launch Browser And Login GUI
+Suite Teardown Close Browser
+Test Setup Test Setup Execution
+
+
+*** Variables ***
+
+${xpath_new_password} //input[@id="password"]
+${xpath_confirm_password} //input[@id="password-confirmation"]
+
+*** Test Cases ***
+
+Verify Navigation To Profile Settings Page
+ [Documentation] Verify navigation to profile settings page.
+ [Tags] Verify_Navigation_To_Profile_Settings_page
+
+ Page Should Contain Profile settings
+
+
+Verify Existence Of All Sections In Profile Settings Page
+ [Documentation] Verify existence of all sections in profile settings page.
+ [Tags] Verify_Existence_Of_All_Sections_In_Profile_Settings_Page
+
+ Page Should Contain Profile information
+ Page Should Contain Change password
+ Page Should Contain Timezone display preference
+
+
+Verify Existence Of All Buttons And Input Boxes In Profile Settings Page
+ [Documentation] Verify existence of all buttons and input boxes in profile settings page.
+ [Tags] Verify_Existence_Of_All_Buttons_And_Input_Boxes_In_Profile_Settings_Page
+
+ # Input Boxes in profile settings page.
+ Page Should Contain Element ${xpath_new_password}
+ Page Should Contain Element ${xpath_confirm_password}
+
+ # Buttons in profile settings page.
+ Page Should Contain Element ${xpath_save_settings_button}
+
+
+*** Keywords ***
+
+Test Setup Execution
+ [Documentation] Do test case setup tasks.
+
+ # Navigate to https://xx.xx.xx.xx/#/profile-settings profile-settings page.
+
+ Wait Until Page Contains Element ${xpath_root_button_menu}
+ Click Element ${xpath_root_button_menu}
+ Click Element ${xpath_profile_settings}
+ Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain profile-settings