Test_POR_25_02_033_CheckDoNotShowGroupEditorMenu
open /portal/public/classic/
echo -- Check don't show Group Editor menu --
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo -- Add new user --
waitForElementPresent link=New Staff
clickAndWait link=New Staff
waitForElementPresent username
type username Test_POR_25_02_033
type password Test_POR_25_02_033
type Confirmpassword Test_POR_25_02_033
type firstName Test_POR_25_02_033
type lastName Test_POR_25_02_033
type email Test_POR_25_02_033@gmail.com
echo -- Choose User Profile --
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 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 --
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
echo -- Add this user into a group with membership is  “Member” --
waitForElementPresent link=Management
click link=Management
waitForElementPresent link=Executive Board
click link=Executive Board
waitForElementPresent username
type username Test_POR_25_02_033
waitForElementPresent link=Save
click link=Save
echo -- Create new page for group --
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
echo --select Owner Id is the same with group add user above --
waitForElementPresent ownerId label=/organization/management/executive-board
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_25_02_033
waitForElementPresent title
type title Test_POR_25_02_033
echo -- Choose Page Layout --
waitForElementPresent //div[@id='UIMaskWorkspace']/div[2]/div/div/div/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
click //div[@id='UIMaskWorkspace']/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[@id='UIMaskWorkspace']/div[2]/div/div/div/div/div/div/div/div/div/div/div/div[3]/div/div/div/div
click //div[@id='UIMaskWorkspace']/div[2]/div/div/div/div/div/div/div/div/div/div/div/div[3]/div/div/div/div
echo -- Choose Access Permission --
waitForTextPresent Access Permission Setting
verifyTextPresent Access Permission Setting
echo -- Choose Edit Permission --
waitForElementPresent link=Edit Permission Setting
click link=Edit Permission Setting
waitForTextPresent Edit Permission Setting
verifyTextPresent Edit Permission Setting
waitForElementPresent link=Save
click link=Save
echo -- Add new node --
waitForElementPresent link=Group
click link=Group
waitForElementPresent link=Edit Navigation
click link=Edit Navigation
waitForElementPresent //div[@id='UINavigationManagement']/div[3]/table/tbody/tr/td[1]/div/div/div/div
click //div[@id='UINavigationManagement']/div[3]/table/tbody/tr/td[1]/div/div/div/div
waitForElementPresent name
type name Test_POR_25_02_033
waitForElementPresent label Test_POR_25_02_033
type label Test_POR_25_02_033
echo -- Choose a page from list --
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 //img[@title='Select Page']
click //img[@title='Select Page']
waitForElementPresent //form[@id='UIPageNodeForm']/div[3]/div[2]/table/tbody/tr/td/div[1]/div/div/div
click //form[@id='UIPageNodeForm']/div[3]/div[2]/table/tbody/tr/td/div[1]/div/div/div
waitForElementPresent link=Save
click link=Save
echo -- View new node --
waitForElementPresent link=Test_POR_25_02_033
click link=Test_POR_25_02_033
waitForElementPresent link=Sign out
clickAndWait link=Sign out
echo -- Login by new user --
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username Test_POR_25_02_033
type password Test_POR_25_02_033
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo -- View page ( node ) created
waitForElementPresent link=Test_POR_25_02_033
click link=Test_POR_25_02_033
waitForTextNotPresent Group Editor
verifyTextNotPresent Group Editor
waitForElementPresent link=Sign out
clickAndWait link=Sign out
waitForElementPresent link=Sign in
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 --
waitForElementPresent link=Users and groups management
click link=Users and groups management
echo -- Search new user created --
waitForElementPresent searchTerm
type searchTerm Test_POR_25_02_033
waitForElementPresent //form[@id='UISearchForm']/div[2]/a
click //form[@id='UISearchForm']/div[2]/a
echo -- Delete user created --
waitForElementPresent //img[@alt='DeleteUser']
click //img[@alt='DeleteUser']
waitForConfirmationPresent Are you sure you want to delete Test_POR_25_02_033 user?
assertConfirmation Are you sure you want to delete Test_POR_25_02_033 user?
echo -- Delete node --
waitForElementPresent link=Group
clickAndWait link=Group
waitForElementPresent link=Edit Navigation
click link=Edit Navigation
waitForElementPresent //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[3]/div/a
click //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[3]/div/a
waitForElementPresent //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[3]/div[1]/a
click //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[3]/div[1]/a
waitForElementPresent //a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Test_POR_25_02_033']
mouseDownRight //a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Test_POR_25_02_033']
waitForElementPresent link=Delete Node
click link=Delete Node
assertConfirmation Are you sure you want to delete this node?
waitForElementPresent link=Save
click link=Save
echo -- delete page --
waitForElementPresent link=Page Management
click link=Page Management
echo -- Search new page --
waitForElementPresent searchTerm
type searchTerm Test_POR_25_02_033
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']
assertConfirmation Do you want to delete this page?
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