Test_POR_24_01_003_CheckNavigationListByUserWhoHasRightToEditCurrentPortalButIsNotManagerOfAnyGroup
open /portal/public/classic/
echo -- Check navigations list by user who does not have right to edit any group navigation --
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo -- Create new user --
clickAndWait link=New Staff
waitForElementPresent username
type username Test_POR_24_01_003
type password Test_POR_24_01_003
type Confirmpassword Test_POR_24_01_003
type firstName Test_POR_24_01_003
type lastName Test_POR_24_01_003
type email Test_POR_24_01_003@gmail.com
echo -- Choose User Profile tab --
waitForElementPresent //div[3]/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[3]/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 -- Add this user into a group with membership is not “Manager” --
clickAndWait link=Users and groups management
waitForElementPresent //div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[2]/div[1]
click //div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[2]/div[1]
waitForElementPresent //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[2]/div/div/div/div[3]/div/a
click //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[2]/div/div/div/div[3]/div/a
waitForElementPresent link=Management
click link=Management
waitForElementPresent username
type username Test_POR_24_01_003
waitForElementPresent link=Save
click link=Save
echo -- Add this user into group that can edit current portal --
waitForElementPresent //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[2]/div/div/div/div[1]/a
click //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[2]/div/div/div/div[1]/a
waitForElementPresent link=Platform
click link=Platform
waitForElementPresent link=Administrators
click link=Administrators
waitForElementPresent username
type username Test_POR_24_01_003
waitForElementPresent link=Save
click link=Save
clickAndWait link=Sign out
open /portal/public/classic/
echo -- Login by new user --
click link=Sign in
waitForElementPresent username
type username Test_POR_24_01_003
type password Test_POR_24_01_003
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo -- Show navigation list which user has right to edit  --
clickAndWait link=Group
waitForTextPresent Administrators
verifyTextPresent Administrators
waitForTextPresent Users
verifyTextPresent Users
echo -- Check add Navigation --
click link=Add Navigation
echo -- https://jira.jboss.org/browse/GTNPORTAL-1464 --
clickAndWait link=Sign out
open /portal/public/classic/
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo -- Go to Users and group management --
clickAndWait link=Users and groups management
echo -- Search new user --
waitForElementPresent searchTerm
type searchTerm Test_POR_24_01_003
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_POR_24_01_002 user?
waitForElementPresent link=Sign out
clickAndWait link=Sign out