Test_PRL_02_03_002_EditFirstNameOfUserInCommunityManagement
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']/div/div/div/a
echo -- Go to New Staff--
clickAndWait link=New Staff
waitForElementPresent username
type username Test_PRL_02_03_002
type password Test_PRL_02_03_002
type Confirmpassword Test_PRL_02_03_002
type firstName Test_PRL_02_03_002
type lastName Test_PRL_02_03_002
type email Test_PRL_02_03_002@gmail.com
waitForElementPresent //div[@id='UIAccountPortlet']/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
click //div[@id='UIAccountPortlet']/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
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
clickAndWait link=Users and groups management
waitForElementPresent searchTerm
type searchTerm Test_PRL_02_03_002
waitForElementPresent //form[@id='UISearchForm']/div[2]/a
click //form[@id='UISearchForm']/div[2]/a
echo -- Edit user--
waitForElementPresent //img[@alt='ViewUserInfo']
click //img[@alt='ViewUserInfo']
echo -- Edit with blank First Name--
waitForElementPresent firstName
type firstName
waitForElementPresent link=Save
click link=Save
waitForTextPresent The field "First Name:" is required.
verifyTextPresent The field "First 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
click //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div
echo -- Edit with First Name contains special characters --
waitForElementPresent firstName
type firstName #$#%#^#@
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
click //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div
echo -- Search user--
waitForElementPresent //form[@id='UISearchForm']/div[2]/a
click //form[@id='UISearchForm']/div[2]/a
waitForElementPresent //img[@alt='ViewUserInfo']
click //img[@alt='ViewUserInfo']
echo -- Change current value of First Name with dash --
waitForElementPresent firstName
type firstName ----Test_PRL_02_03_002
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
type searchTerm
type searchTerm
type searchTerm Test_PRL_02_03_002
waitForElementPresent //form[@id='UISearchForm']/div[2]/a
click //form[@id='UISearchForm']/div[2]/a
waitForElementPresent //img[@alt='ViewUserInfo']
click //img[@alt='ViewUserInfo']
echo -- Change current value of First Name with underscore--
waitForElementPresent firstName
type firstName ____Test_PRL_02_03_002
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 //form[@id='UISearchForm']/div[2]/a
click //form[@id='UISearchForm']/div[2]/a
waitForElementPresent //img[@alt='ViewUserInfo']
click //img[@alt='ViewUserInfo']
echo -- Change current value of First Name with over 45 characters--
waitForElementPresent firstName
type firstName Test_PRL_02_03_002Test_PRL_02_03_002Test_PRL_02_03_002Test_PRL_02_03_002Test_PRL_02_03_002Test_PRL_02_03_002Test_PRL_02_03_002Test_PRL_02_03_002Test_PRL_02_03_002Test_PRL_02_03_002Test_PRL_02_03_002Test_PRL_02_03_002Test_PRL_02_03_002Test_PRL_02_03_002Test_PRL_02_03_002
waitForElementPresent link=Save
click link=Save
waitForTextPresent The length of the text in field "First Name:" must be between "1" and "45" characters.
verifyTextPresent The length of the text in field "First 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 firstName
type firstName Test_PRL_02_03_002 Test_PRL_02_03_002
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
echo -- Search user --
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 valid value for First Name--
waitForText firstName
type firstName Test_PRL_02_03_002_edit
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
echo -- Search user --
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 First Name start with number--
waitForElementPresent firstName
type firstName 02_03_002
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
echo -- Search user --
type searchTerm
type searchTerm Test_PRL_02_03_002
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_002 user?
clickAndWait link=Sign out