Test_SNF_PRL_07_UsersManagement
open /portal/public/intranet/
echo -- Users Management--
windowMaximize
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo -- Add new user --
waitForElementPresent link=Add new Users
clickAndWait link=Add new Users
waitForElementPresent username
type username Test_SNF_PRL_07
type password Test_SNF_PRL_07
type Confirmpassword Test_SNF_PRL_07
type firstName Test_SNF_PRL_07
type lastName Test_SNF_PRL_07
type email Test_SNF_PRL_07@gmail.com
echo -- Choose User Profile --
waitForElementPresent //div[2]/div/div/div/div/div/div/div/div[1]/div/div/div[1]/div/div/div/div/div/div/div/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
click //div[2]/div/div/div/div/div/div/div/div[1]/div/div/div[1]/div/div/div/div/div/div/div/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
waitForElementPresent user.language
select user.language label=English
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 Users and group management --
waitForElementPresent link=Manage Users and Groups
clickAndWait link=Manage Users and Groups
echo -- Users list is shown properly--
waitForTextPresent Test_SNF_PRL_07
verifyTextPresent Test_SNF_PRL_07
waitForTextPresent demo
verifyTextPresent demo
waitForTextPresent james
waitForTextPresent james
verifyTextPresent john
verifyTextPresent john
waitForTextPresent mary
verifyTextPresent mary
waitForTextPresent root
verifyTextPresent root
waitForElementPresent searchTerm
type searchTerm Test_SNF_PRL_07
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']
waitForElementPresent firstName
type firstName Test_SNF_PRL_07_edit
type lastName Test_SNF_PRL_07_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 -- 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_SNF_PRL_07 user?
waitForTextPresent No result found.
verifyTextPresent No result found.
waitForElementPresent //div[5]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
click //div[5]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
waitForElementPresent link=Logout
clickAndWait link=Logout