Test_POR_25_05_004_CutPasteNodeByAddPageWizard
open /portal/public/classic/
echo --Login portal--
windowMaximize
click link=Sign in
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo --Open Group Menu Editor--
waitForElementPresent link=Group
click link=Group
waitForElementPresent link=New Staff
click link=New Staff
echo --Add new page --
waitForElementPresent link=Add New Page
click link=Add New Page
waitForElementPresent pageName
type pageName Test_POR_25_05_004
type pageDisplayName Test_POR_25_05_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]
clickAndWait //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
echo --Open Navigation Menu--
waitForElementPresent link=Group
click link=Group
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
mouseDownRight xpath=//div[@id='UINavigationNodeSelector']//a[@class='NodeIcon DefaultPageIcon' and @title='Test_POR_25_05_004']
waitForElementPresent link=Cut Node
click link=Cut Node
echo --Paste node into another node in the same navigation--
mouseDownRight //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div[2]/div/div
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
click //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[1]/a
mouseDownRight //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[3]/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