Test_PRL_02_03_004_CheckEditEmailInCommunityManagement
open /portal/public/classic/
echo -- Check Editing Email in Community Management--
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div
echo -- Go to New Staff--
waitForElementPresent link=New Staff
click link=New Staff
waitForElementPresent username
type username Test_PRL_02_03_003
type password Test_PRL_02_03_003
type Confirmpassword Test_PRL_02_03_003
type firstName Test_PRL_02_03_003
type lastName Test_PRL_02_03_003
type email Test_PRL_02_03_003@gmail.com
waitForElementPresent link=Save
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
echo -- Go to User and group management --
waitForElementPresent link=Users and groups management
clickAndWait link=Users and groups management
waitForElementPresent searchTerm
type searchTerm Test_PRL_02_03_003
waitForElementPresent //form[@id='UISearchForm']/div[2]/a
click //form[@id='UISearchForm']/div[2]/a
echo -- Click Edit user--
waitForElementPresent //img[@alt='ViewUserInfo']
click //img[@alt='ViewUserInfo']
echo --  Change current value of Email with valid value--
waitForElementPresent email
type email Test_PRL_02_03_003_edit@gmail.com
waitForElementPresent link=Save
click link=Save
waitForElementPresent //div[3]/div/div/div/div/div[2]
verifyText //div[3]/div/div/div/div/div[2] 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
waitForElementPresent //div[@id='UIListUsersGird']/table/tbody/tr[1]/td[4]/div
verifyText //div[@id='UIListUsersGird']/table/tbody/tr[1]/td[4]/div Test_PRL_02_03_003_edit@gmail.com
waitForElementPresent //form[@id='UISearchForm']/div[2]/a
click //form[@id='UISearchForm']/div[2]/a
waitForElementPresent //img[@alt='ViewUserInfo']
click //img[@alt='ViewUserInfo']
echo -- Edit with blank Email--
waitForElementPresent email
type email
waitForElementPresent link=Save
click link=Save
waitForElementPresent //div[2]/div[2]/div/div/div/div/div[2]
verifyText //div[2]/div[2]/div/div/div/div/div[2] The field "Email Address:" is required.
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 current value of Email with invalid format--
waitForElementPresent email
type email Test_PRL_02_03_003
waitForElementPresent link=Save
click link=Save
waitForElementPresent //div[2]/div[2]/div/div/div/div/div[2]
verifyText //div[2]/div[2]/div/div/div/div/div[2] Your email address is invalid. Please enter a different address.
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=Cancel
click link=Cancel
echo -- Delete user--
waitForElementPresent //form[@id='UISearchForm']/div[2]/a
click //form[@id='UISearchForm']/div[2]/a
waitForElementPresent //img[@alt='DeleteUser']
click //img[@alt='DeleteUser']
assertConfirmation Are you sure you want to delete Test_PRL_02_03_003 user?
clickAndWait link=Sign out