Test_POR_14_07_002_CheckCloneNodeContainSubNode
open /portal/public/classic/
echo --Login portal--
clickAt link=Sign in
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo --Open Site Menu Editor--
waitForElementPresent link=Site
clickAt link=Site
echo --Add new page --
waitForElementPresent link=Add New Page
clickAt link=Add New Page
waitForElementPresent link=Home
clickAt link=Home
waitForElementPresent pageName
type pageName Test_POR_14_07_002
type pageDisplayName Test_POR_14_07_002
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
clickAt //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
clickAt //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]
clickAt //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
echo --Open Navigation Menu--
waitForElementPresent link=Site
clickAt link=Site
waitForElementPresent link=Edit Navigation
clickAt link=Edit Navigation
echo --Clone a node--
mouseDownRight //a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Home']
waitForElementPresent link=Clone Node
clickAt link=Clone Node
echo --Paste Clone node--
click //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[3]/div/a
mouseDownRight //a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='SiteMap']
click //div[@id='NavigationNodePopupMenu']/div/div[2]/div/div/div[7]/a
waitForElementPresent link=Save
clickAt link=Save
echo --Check page list in Manage Page--
waitForElementPresent link=Page Management
clickAt link=Page Management
echo -- Check existing of page with title 'Test_POR_14_07_002'--
waitForElementPresent searchTerm
type searchTerm Test_POR_14_07_002
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
mouseDownRight //a[@class='NodeIcon DefaultPageIcon' and @title='Test_POR_14_07_002']
waitForElementPresent link=Delete Node
click link=Delete Node
assertConfirmation Are you sure you want to delete this node?
waitForElementPresent //a[@class='NodeIcon DefaultPageIcon' and @title='SiteMap']
click //a[@class='NodeIcon DefaultPageIcon' and @title='SiteMap']
waitForElementPresent //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[3]/div[2]/div/div//a
mouseDownRight //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[3]/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 --
waitForElementPresent link=Sign out
clickAndWait link=Sign out