Test_SNF_PRL_50_AddApplicationIntoContainerWhenEditPagePropertiesOfNode
open /portal/public/classic
echo -- Change application when edit page properties of node--
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo --Add new node for group --
clickAndWait link=Group
waitForElementPresent link=Edit Navigation
click link=Edit Navigation
waitForElementPresent link=Add Node
click link=Add Node
waitForElementPresent name
type name Test_SNF_PRL_50
type label Test_SNF_PRL_50
echo -- Page Selector--
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 searchTerm
type searchTerm Community Management
waitForElementPresent searchOption
select searchOption label=Title
waitForElementPresent //form[@id='UIPageSearch']/div[2]/a
click //form[@id='UIPageSearch']/div[2]/a
waitForElementPresent xpath=//img[@title='Select Page']
click xpath=//img[@title='Select Page']
waitForElementPresent link=Save
click link=Save
echo -- Save to finish create new node--
waitForElementPresent link=Save
click link=Save
echo -- View new node--
waitForElementPresent //div[4]/div[2]/div/a
clickAndWait //div[4]/div[2]/div/a
waitForTextPresent Test_SNF_PRL_50
verifyTextPresent Test_SNF_PRL_50
echo -- Right click and choose Edit node's page -
waitForElementPresent link=Group
clickAndWait link=Group
waitForElementPresent link=Edit Navigation
click link=Edit Navigation
waitForElementPresent //div[2]/div/div/div[3]/div/a
click //div[2]/div/div/div[3]/div/a
waitForElementPresent xpath=//a[@title='Test_SNF_PRL_50']
mouseDownRight xpath=//a[@title='Test_SNF_PRL_50']
pause 1000
waitForElementPresent link=Edit Node's Page
click link=Edit Node's Page
echo -- View layout of node before Change application--
waitForElementPresent link=Switch View mode
click link=Switch View mode
waitForElementPresent //div[2]/div/div/div/div/div/div[2]/div/div/div/div/div/div/div/div/div/div[2]/div/div/div[1]
verifyElementPresent //div[2]/div/div/div/div/div/div[2]/div/div/div/div/div/div/div/div/div/div[2]/div/div/div[1]
waitForTextPresent User Management
verifyTextPresent User Management
waitForTextPresent Group Management
verifyTextPresent Group Management
waitForTextPresent Membership Management
verifyTextPresent Membership Management
waitForElementPresent link=Switch View mode
click link=Switch View mode
echo -- Choose Container tab--
waitForElementPresent //div[@id='UIPortalComposerTab']/div[1]/div/div[2]/div/div/div/div
click //div[@id='UIPortalComposerTab']/div[1]/div/div[2]/div/div/div/div
echo -- Add container by drag & drop--
waitForElementPresent //div[@id='oneRow']/div //div[2]/div/div/div/div/div/div[2]/div/div/div/div/div[1]/div/div/div[1]/div/div/div/div[1]/div
dragAndDropToObject //div[@id='oneRow']/div //div[2]/div/div/div/div/div/div[2]/div/div/div/div/div[1]/div/div/div[1]/div/div/div/div[1]/div
echo -- Choose Application tab--
waitForElementPresent //div[@id='UIPortalComposerTab']/div[1]/div/div[1]/div/div/div/div
click //div[@id='UIPortalComposerTab']/div[1]/div/div[1]/div/div/div/div
echo -- Drag & drop application into the container added above--
waitForElementPresent //div[@id='Gadgets/Calculator']/div/div/img //div[2]/div/div/div/div/div/div[2]/div/div/div/div/div[1]/div/div/div[1]/div/div/div
dragAndDropToObject //div[@id='Gadgets/Calculator']/div/div/img //div[2]/div/div/div/div/div/div[2]/div/div/div/div/div[1]/div/div/div[1]/div/div/div
waitForElementPresent link=Switch View mode
click link=Switch View mode
waitForElementPresent UIPortalApplication
verifyElementPresent UIPortalApplication
waitForElementPresent link=Switch View mode
click link=Switch View mode
echo -- Delete application --
mouseOver //div/div/div[2]/div/div/div/div/div/div/div[2] Calculator
waitForElementPresent //div/div/div[2]/div/div/div/div/div/div/a[2]
click //div/div/div[2]/div/div/div/div/div/div/a[2]
waitForConfirmationPresent
assertConfirmation Are you sure you want to delete this portlet?
echo -- Choose Container tab to delete container --
waitForElementPresent //div[@id='UIPortalComposerTab']/div[1]/div/div[2]/div/div/div/div
click //div[@id='UIPortalComposerTab']/div[1]/div/div[2]/div/div/div/div
mouseOver //div/div/div[2]/div/div/div/div/div/div/div[2] Container
waitForElementPresent //div/div/div[2]/div/div/div/div/div/div/a[2]
click //div/div/div[2]/div/div/div/div/div/div/a[2]
waitForConfirmationPresent
assertConfirmation Are you sure you want to delete this Container?
echo -- Click to Finish
waitForElementPresent //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
click //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
waitForElementPresent link=Save
click link=Save
echo -- View node --
clickAndWait link=Test_SNF_PRL_50
echo -- Delete this node--
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
pause 1000
waitForElementPresent xpath=//a[@title='Test_SNF_PRL_50']
mouseDownRight xpath=//a[@title='Test_SNF_PRL_50']
waitForElementPresent link=Delete Node
click link=Delete Node
waitForConfirmationPresent
assertConfirmation Are you sure you want to delete this node?
waitForElementNotPresent xpath=//a[@title='Test_SNF_PRL_50']
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=Sign out
clickAndWait link=Sign out