Test_SNF_PRL_67_ChangePassword
open /portal/public/classic/
echo -- Change Password --
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_SNF_PRL_67
type password Test_SNF_PRL_67
type Confirmpassword Test_SNF_PRL_67
type firstName Test_SNF_PRL_67
type lastName Test_SNF_PRL_67
type email Test_SNF_PRL_67@gmail.com
echo -- Choose user Profile tab --
waitForElementPresent //div[text()='User Profile']
click //div[text()='User Profile']
waitForElementPresent user.language
select user.language label=English
waitForElementPresent //form[@id='UIAccountForm']/div[3]/div[2]/table/tbody/tr/td/div[1]/div/div/div
click //form[@id='UIAccountForm']/div[3]/div[2]/table/tbody/tr/td/div[1]/div/div/div
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
click //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div
clickAndWait link=Sign out
echo -- Login by new user --
open /portal/public/classic/
click link=Sign in
waitForElementPresent username
type username Test_SNF_PRL_67
type password Test_SNF_PRL_67
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
waitForTextPresent Test_SNF_PRL_67 Test_SNF_PRL_67
verifyTextPresent Test_SNF_PRL_67 Test_SNF_PRL_67
waitForElementPresent link=Test_SNF_PRL_67 Test_SNF_PRL_67
click link=Test_SNF_PRL_67 Test_SNF_PRL_67
echo -- Change Password--
waitForElementPresent link=Change Password
click link=Change Password
waitForElementPresent currentpass
type currentpass Test_SNF_PRL_67
type newpass Test_SNF_PRL_67_edit
type confirmnewpass Test_SNF_PRL_67_edit
waitForElementPresent //form[@id='UIAccountChangePass']/div[2]/div/div/table/tbody/tr/td/div[1]/div/div/div/a
click //form[@id='UIAccountChangePass']/div[2]/div/div/table/tbody/tr/td/div[1]/div/div/div/a
waitForTextPresent The password has been changed.
verifyTextPresent The password has been changed.
waitForElementPresent //div[6]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div
click //div[6]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div
waitForElementPresent link=Close
click link=Close
clickAndWait link=Sign out
echo -- Login by new user after change password --
open /portal/public/classic/
click link=Sign in
waitForElementPresent username
type username Test_SNF_PRL_67
type password Test_SNF_PRL_67_edit
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
waitForTextPresent Test_SNF_PRL_67 Test_SNF_PRL_67
verifyTextPresent Test_SNF_PRL_67 Test_SNF_PRL_67
clickAndWait link=Sign out
echo -- Login by admin--
open /portal/public/classic/
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
echo -- Search new user --
waitForElementPresent searchTerm
type searchTerm Test_SNF_PRL_67
waitForElementPresent //form[@id='UISearchForm']/div[2]/a
click //form[@id='UISearchForm']/div[2]/a
echo -- Delete user --
waitForElementPresent //img[@alt='DeleteUser']
click //img[@alt='DeleteUser']
waitForConfirmationPresent
assertConfirmation Are you sure you want to delete Test_SNF_PRL_67 user?
waitForTextNotPresent Test_SNF_PRL_67
verifyTextNotPresent Test_SNF_PRL_67
waitForElementPresent link=Sign out
clickAndWait link=Sign out