Test_POR_14_07_001_CheckCloneNodeDoesNotContainSubNode
open /portal/public/classic/
echo --Login portal--
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo --Open Site Menu Editor--
clickAndWait link=Site
echo --Add new page --
waitForElementPresent link=Add New Page
click link=Add New Page
waitForElementPresent //a[@class='NodeIcon DefaultPageIcon' and @title='Home']
click //a[@class='NodeIcon DefaultPageIcon' and @title='Home']
waitForElementPresent pageName
type pageName Test_POR_14_07_001
type pageDisplayName Test_POR_14_07_001
echo --Click Next to move to step 2
waitForElementPresent //div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div
click //div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div
echo --Click Next to move to step 3, keep Empty layout
waitForElementPresent //div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div
click //div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div
echo --Click Save to complete adding page
waitForElementPresent //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
click //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
echo --Open Navigation Menu--
waitForElementPresent link=Site
clickAndWait link=Site
waitForElementPresent link=Edit Navigation
click link=Edit Navigation
echo --Clone a node--
waitForElementPresent //div[2]/div/div/div[2]/div[2]/div/div/a
click //div[2]/div/div/div[2]/div[2]/div/div/a
mouseDownRight //a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Test_POR_14_07_001']
waitForElementPresent link=Clone Node
click link=Clone Node
echo --Paste Clone node--
waitForElementPresent //div[@class='HomeNode']
mouseDownRight //div[@class='HomeNode']
waitForElementPresent //div[@class="UIContextMenuContainer"]/div[2]/div/div/div[2]//a
click //div[@class="UIContextMenuContainer"]/div[2]/div/div/div[2]//a
waitForElementPresent link=Save
click link=Save
echo -- Edit this node after clone node--
waitForElementPresent link=Edit Navigation
click link=Edit Navigation
waitForElementPresent //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[8]/div/a
mouseDownRight //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[8]/div/a
waitForElementPresent link=Edit this Node
click link=Edit this Node
echo --Choose Page Selector--
waitForElementPresent //div[@class='UIFormTabPane']//div[@class='TabsContainer']/div[2]/div/div/div/div
click //div[@class='UIFormTabPane']//div[@class='TabsContainer']/div[2]/div/div/div/div
waitForElementPresent link=Search and Select Page
click link=Search and Select Page
waitForElementPresent xpath=//img[@title='Select Page']
click xpath=//img[@title='Select Page']
echo -- Save after choose another page--
waitForElementPresent link=Save
click link=Save
echo -- Save to close Naviation Management form--
waitForElementPresent link=Save
click link=Save
echo -- Show content of clone node after change--
waitForElementPresent //div[@id='PortalNavigationTopContainer']/div[3]/div/div/div/div/div/div//a
click //div[@id='PortalNavigationTopContainer']/div[3]/div/div/div/div/div/div//a
echo -- Check content of original node's page--
waitForElementPresent link=Test_POR_14_07_001
click link=Test_POR_14_07_001
assertLocation http://localhost:8080/portal/private/classic/home/Test_POR_14_07_001
echo --Check page list in Manage Page--
waitForElementPresent link=Page Management
click link=Page Management
echo -- Check existing of page with title 'Test_POR_14_07_001'--
waitForElementPresent searchTerm
type searchTerm Test_POR_14_07_001
waitForElementPresent searchOption
select searchOption label=Title
waitForElementPresent xpath=//form[@id='UIPageSearch']/div[2]/a
click xpath=//form[@id='UIPageSearch']/div[2]/a
echo -- Delete page--
waitForElementPresent xpath=//img[@title='Delete Page']
click xpath=//img[@title='Delete Page']
assertConfirmation Do you want to delete this page?
waitForElementPresent xpath=//img[@title='Delete Page']
click xpath=//img[@title='Delete Page']
assertConfirmation Do you want to delete this page?
waitForElementPresent xpath=//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a
click xpath=//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a
echo --Delete page (node)--
waitForElementPresent link=Site
clickAndWait link=Site
waitForElementPresent link=Edit Navigation
click link=Edit Navigation
waitForElementPresent //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[8]/div/a
mouseDownRight //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[8]/div/a
waitForElementPresent link=Delete Node
click link=Delete Node
assertConfirmation Are you sure you want to delete this node?
waitForElementPresent //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div[2]/div/div/a
mouseDownRight //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div[2]/div/div/a
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 --Sign out --
clickAndWait link=Sign out