Test_POR_21_002_EditPageWhenUserHasRightToAccessButCanNotEditPage
open /portal/public/classic/
echo -- Edit page when user has right to access but can not edit page --
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']//a[text()='Sign in']
echo -- Add new user --
waitForElementPresent link=New Staff
clickAndWait link=New Staff
waitForElementPresent username
type username Test_POR_21_002
type password Test_POR_21_002
type Confirmpassword Test_POR_21_002
type firstName Test_POR_21_002
type lastName Test_POR_21_002
type email Test_POR_21_002@gmail.com
echo -- Choose user Profile --
waitForElementPresent //div[@id='UIAccountPortlet']//div[text()='User Profile']
click //div[@id='UIAccountPortlet']//div[text()='User Profile']
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
click //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div
echo -- Add user into group --
waitForElementPresent link=Users and groups management
clickAndWait link=Users and groups management
echo -- Choose Group 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_21_002
waitForElementPresent membership
select membership label=manager
waitForElementPresent link=Save
click link=Save
echo -- Add new page --
waitForElementPresent link=Page Management
click link=Page Management
waitForElementPresent //div[@id='UIPageBrowser']/div[2]/table/tbody/tr/td/div/div/div/div/a
click //div[@id='UIPageBrowser']/div[2]/table/tbody/tr/td/div/div/div/div/a
waitForElementPresent ownerType
select ownerType label=group
waitForElementPresent ownerId
select ownerId label=/organization/management/executive-board
waitForElementPresent //option[@value='/organization/management/executive-board']
click //option[@value='/organization/management/executive-board']
waitForElementPresent name
type name Test_POR_21_002
type title Test_POR_21_002
echo -- Choose Page Layout --
waitForElementPresent //div[5]/div[2]/div/div/div/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
click //div[5]/div[2]/div/div/div/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
echo -- Choose Permission Setting --
waitForElementPresent //div[2]/div/div/div/div/div/div/div/div/div/div/div/div[3]/div/div/div/div
click //div[2]/div/div/div/div/div/div/div/div/div/div/div/div[3]/div/div/div/div
waitForElementPresent link=Edit Permission Setting
click link=Edit Permission Setting
waitForElementPresent link=Save
click link=Save
echo -- Change Access Permission for page --
waitForElementPresent searchTerm
type searchTerm Test_POR_21_002
waitForElementPresent searchOption
select searchOption label=Title
waitForElementPresent //form[@id='UIPageSearch']/div[2]/a
click //form[@id='UIPageSearch']/div[2]/a
echo -- click Edit icon --
waitForElementPresent //img[@title='Edit Page']
click //img[@title='Edit Page']
waitForElementPresent link=View Page properties
click link=View Page properties
echo -- Choose Permisison Setting --
waitForElementPresent //div[text()='Permission Setting']
click //div[text()='Permission Setting']
waitForElementPresent link=Add Permission
click link=Add Permission
waitForElementPresent link=Organization
click link=Organization
waitForElementPresent link=Management
click link=Management
waitForElementPresent link=manager
click link=manager
waitForElementPresent link=Save
click link=Save
echo -- Close Page Editor --
waitForElementPresent //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
click //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
waitForElementPresent link=Sign out
clickAndWait link=Sign out
echo -- - Login by created user --
click link=Sign in
waitForElementPresent username
type username Test_POR_21_002
type password Test_POR_21_002
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
waitForElementPresent link=Group
clickAndWait link=Group
echo -- Add group navigation --
waitForElementPresent link=Add Navigation
click link=Add Navigation
waitForElementPresent //div[@id='UIAddGroupNavigationGrid']/table/tbody/tr/td[2]/a
click //div[@id='UIAddGroupNavigationGrid']/table/tbody/tr/td[2]/a
waitForElementPresent link=Cancel
click link=Cancel
echo -- Add new node on his group, link to created page --
waitForElementPresent link=Edit Navigation
click link=Edit Navigation
waitForElementPresent link=Add Node
click link=Add Node
waitForElementPresent name
type name Test_POR_21_002
type label Test_POR_21_002
echo -- Choose Page Selector --
waitForElementPresent //div[2]/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[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
waitForElementPresent link=Search and Select Page
click link=Search and Select Page
waitForElementPresent //div[@id='UIRepeater']/table/tbody/tr[2]/td[5]/div/img
click //div[@id='UIRepeater']/table/tbody/tr[2]/td[5]/div/img
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=Save
click link=Save
echo -- View new add node's page --
waitForElementPresent link=Test_POR_21_002
click link=Test_POR_21_002
waitForElementPresent link=Edit Navigation
click link=Edit Navigation
waitForElementPresent //div[contains(@onclick,'objectId=Test_POR_21_002')]
verifyElementPresent //div[contains(@onclick,'objectId=Test_POR_21_002')]
waitForElementPresent link=Sign out
clickAndWait link=Sign out
waitForElementPresent link=Sign in
click link=Sign in
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo -- Go to User and group management --
waitForElementPresent link=Users and groups management
click link=Users and groups management
echo -- Delete user --
waitForElementPresent searchTerm
type searchTerm Test_POR_21_002
waitForElementPresent //form[@id='UISearchForm']/div[2]/a
click //form[@id='UISearchForm']/div[2]/a
waitForElementPresent //img[@alt='DeleteUser']
click //img[@alt='DeleteUser']
waitForConfirmationPresent
assertConfirmation Are you sure you want to delete Test_POR_21_002 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
echo -- Delete group navigation --
waitForElementPresent link=Group
click link=Group
waitForElementPresent link=Delete Navigation
click link=Delete Navigation
waitForConfirmationPresent
assertConfirmation Are you sure to delete this navigation?
echo -- Go to Page Management --
clickAndWait link=Page Management
echo -- Delete page created --
waitForElementPresent searchTerm
type searchTerm Test_POR_21_002
waitForElementPresent searchOption
select searchOption label=Title
waitForElementPresent //form[@id='UIPageSearch']/div[2]/a
click //form[@id='UIPageSearch']/div[2]/a
waitForElementPresent //img[@title='Delete Page']
click //img[@title='Delete Page']
waitForConfirmationPresent
assertConfirmation Do you want to delete this page?
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=Sign out
clickAndWait link=Sign out