Test_POR_14_04_004_CutPasteNodeByAddPage
open /portal/public/classic/
echo --Login portal--
clickAt link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo --Open Site Menu Editor--
waitForElementPresent link=Site
clickAndWait link=Site
waitForElementPresent link=Home
clickAndWait link=Home
echo --Add new page --
waitForElementPresent link=Add New Page
click link=Add New Page
waitForElementPresent pageName
type pageName Test_POR_14_04_004
type pageDisplayName Test_POR_14_04_004
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 --Cut a node--
waitForElementPresent //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div[2]/div[1]/div/a
click //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div[2]/div[1]/div/a
waitForElementPresent //div[@id='UINavigationNodeSelector']//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Test_POR_14_04_004']
mouseDownRight //div[@id='UINavigationNodeSelector']//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Test_POR_14_04_004']
waitForElementPresent link=Cut Node
click link=Cut Node
echo --Paste node into another node in the same navigation--
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
echo --Delete node--
waitForElementPresent //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[1]/a
clickAt //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[1]/a
waitForElementPresent //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[7]/div//a
mouseDownRight //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[7]/div//a
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