Test_PRL_02_03_007_ChangeUserProfileInCommunityManagement
open /portal/public/classic/
echo --Add new user--
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
clickAndWait link=New Staff
waitForElementPresent username
type username Test_PRL_02_03_007
type password Test_PRL_02_03_007
type Confirmpassword Test_PRL_02_03_007
type firstName Test_PRL_02_03_007
type lastName Test_PRL_02_03_007
type email Test_PRL_02_03_007@gmail.com
click //div[@id='UIAccountPortlet']/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
waitForElementPresent user.language
select user.language label=Vietnamese
click link=Save
waitForTextPresent
verifyTextPresent You have registered a new account.
waitForElementPresent //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
click //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
waitForElementPresent link=Users and groups management
clickAndWait link=Users and groups management
echo --Change normal User Profile information--
waitForElementPresent searchTerm
type searchTerm Test_PRL_02_03_007
click //form[@id='UISearchForm']/div[2]/a
waitForElementPresent //img[@alt='ViewUserInfo']
click //img[@alt='ViewUserInfo']
waitForElementPresent firstName
type firstName Test_PRL_02_03_007_edit
type lastName Test_PRL_02_03_007_edit
click link=Save
verifyTextPresent The user profile has been updated.
waitForElementPresent //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
click //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
echo --Change displaying language for user--
waitForElementPresent //form[@id='UISearchForm']/div[2]/a
click //form[@id='UISearchForm']/div[2]/a
waitForElementPresent //img[@alt='ViewUserInfo']
click //img[@alt='ViewUserInfo']
waitForElementPresent //div[@id='UIUserManagement']/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
click //div[@id='UIUserManagement']/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
waitForElementPresent user.language label=English
select user.language label=English
click link=Save
waitForTextPresent
verifyTextPresent The user profile has been updated.
waitForElementPresent //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div
click //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div
waitForElementPresent link=Sign out
clickAndWait link=Sign out
echo --Login with user which edited--
click link=Sign in
waitForElementPresent username
type username Test_PRL_02_03_007
type password Test_PRL_02_03_007
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
clickAndWait link=Sign out
echo --Delete new user--
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
clickAndWait link=Users and groups management
waitForElementPresent searchTerm
type searchTerm Test_PRL_02_03_007
click //form[@id='UISearchForm']/div[2]/a
click //img[@alt='DeleteUser']
assertConfirmation Are you sure you want to delete Test_PRL_02_03_007 user?
clickAndWait link=Sign out