Test_PRL_02_03_003_EditLastNameOfUserInCommunityManagement
open /portal/public/classic/
echo -- Edit First Name of user in Community Management--
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']//a[text()='Sign in']
echo -- Go to New Staff--
waitForElementPresent link=New Staff
clickAndWait 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 //div[@id='UIAccountPortlet']//div[text()='User Profile']
click //div[@id='UIAccountPortlet']//div[text()='User Profile']
waitForElementPresent link=Save
click link=Save
waitForTextPresent You have registered a new account.
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
click link=Users and groups management
waitForElementPresent searchTerm
type searchTerm Test_PRL_02_03_003
waitForElementPresent //a[@title='Quick Search']
click //a[@title='Quick Search']
echo -- Edit user--
waitForElementPresent //img[@alt='ViewUserInfo']
click //img[@alt='ViewUserInfo']
echo -- Edit with blank First Name--
waitForElementPresent lastName
type lastName
waitForElementPresent link=Save
click link=Save
waitForTextPresent The field "Last Name:" is required.
verifyTextPresent The field "Last Name:" 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 -- Edit with First Name contains special characters --
waitForElementPresent lastName
type lastName #$#%#^#@
waitForElementPresent link=Save
click link=Save
waitForTextPresent The user profile has been updated.
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 -- Search user--
waitForElementPresent //a[@title='Quick Search']
click //a[@title='Quick Search']
waitForElementPresent //img[@alt='ViewUserInfo']
click //img[@alt='ViewUserInfo']
echo -- Change current value of First Name with dash --
waitForElementPresent lastName
type lastName ----Test_PRL_02_03_003
waitForElementPresent link=Save
click link=Save
waitForTextPresent The user profile has been updated.
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 -- Search user --
type searchTerm
type searchTerm Test_PRL_02_03_003
waitForElementPresent //a[@title='Quick Search']
click //a[@title='Quick Search']
waitForElementPresent //img[@alt='ViewUserInfo']
click //img[@alt='ViewUserInfo']
echo -- Change current value of First Name with underscore--
waitForElementPresent lastName
type lastName ____Test_PRL_02_03_003
waitForElementPresent link=Save
click link=Save
waitForTextPresent The user profile has been updated.
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 -- Search user--
waitForElementPresent //a[@title='Quick Search']
click //a[@title='Quick Search']
waitForElementPresent //img[@alt='ViewUserInfo']
click //img[@alt='ViewUserInfo']
echo -- Change current value of First Name with over 45 characters--
waitForElementPresent lastName
type lastName Test_PRL_02_03_003Test_PRL_02_03_003Test_PRL_02_03_003Test_PRL_02_03_003Test_PRL_02_03_003Test_PRL_02_03_003Test_PRL_02_03_003Test_PRL_02_03_003Test_PRL_02_03_003Test_PRL_02_03_003Test_PRL_02_03_003Test_PRL_02_03_003Test_PRL_02_03_003Test_PRL_02_03_003Test_PRL_02_03_003
waitForElementPresent link=Save
click link=Save
waitForTextPresent The length of the text in field "Last Name:" must be between "1" and "45" characters.
verifyTextPresent The length of the text in field "Last Name:" must be between "1" and "45" characters.
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 -- Edit with First Name contains space--
waitForElementPresent lastName
type lastName Test_PRL_02_03_003 Test_PRL_02_03_003
waitForElementPresent link=Save
click link=Save
waitForTextPresent The user profile has been updated.
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 -- Search user --
waitForElementPresent //a[@title='Quick Search']
click //a[@title='Quick Search']
waitForElementPresent //img[@alt='ViewUserInfo']
click //img[@alt='ViewUserInfo']
echo -- Edit with valid value for First Name--
waitForText lastName
type lastName Test_PRL_02_03_003_edit
waitForElementPresent link=Save
click link=Save
waitForTextPresent The user profile has been updated.
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 -- Search user --
waitForElementPresent //a[@title='Quick Search']
click //a[@title='Quick Search']
waitForElementPresent //img[@alt='ViewUserInfo']
click //img[@alt='ViewUserInfo']
echo --  Edit with First Name start with number--
waitForElementPresent lastName
type lastName 02_03_003
waitForElementPresent link=Save
click link=Save
waitForTextPresent The user profile has been updated.
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 -- Search user --
type searchTerm
type searchTerm Test_PRL_02_03_003
waitForElementPresent //a[@title='Quick Search']
click //a[@title='Quick Search']
waitForElementPresent //img[@alt='DeleteUser']
click //img[@alt='DeleteUser']
assertConfirmation Are you sure you want to delete Test_PRL_02_03_003 user?
waitForElementPresent link=Sign out
clickAndWait link=Sign out