Test_SNF_PRL_36_AddApplicationIntoContainerWhenEditPagePropertiesOfNode
open /portal/public/intranet/
echo -- Add application into container when edit page properties of node--
windowMaximize
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
clickAndWait link=Sign in
echo --Add new node for portal --
waitForElementPresent link=Manage sites
clickAndWait link=Manage sites
echo -- Edit Navigation of intranet
waitForElementPresent //td/div[text()='intranet']/following::td/a[text()='Edit Navigation']
click //td/div[text()='intranet']/following::td/a[text()='Edit Navigation']
waitForElementPresent link=Add Node
click link=Add Node
pause 30000
waitForElementPresent name
type name Test_SNF_PRL_36
type label Test_SNF_PRL_36
echo -- Page Selector--
waitForElementPresent //div[text()='Page Selector']
click //div[text()='Page Selector']
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']//a[@title='Quick Search']
click //form[@id='UIPageSearch']//a[@title='Quick Search']
waitForElementPresent //td/div[@title='Community Management']/following::td/div/img[@title='Select Page']
click //td/div[@title='Community Management']/following::td/div/img[@title='Select Page']
waitForElementPresent link=Save
click link=Save
echo -- Save to finish create new node--
waitForElementPresent link=Save
click link=Save
pause 30000
echo -- View new node--
waitForElementPresent link=Test_SNF_PRL_36
clickAndWait link=Test_SNF_PRL_36
echo -- Change application when edit page properties of node --
waitForElementPresent link=Manage sites
clickAndWait link=Manage sites
waitForElementPresent //td/div[text()='intranet']/following::td/a[text()='Edit Navigation']
click //td/div[text()='intranet']/following::td/a[text()='Edit Navigation']
waitForElementPresent //a[@title='Test_SNF_PRL_36']
click //a[@title='Test_SNF_PRL_36']
waitForElementPresent xpath=//a[@title='Test_SNF_PRL_36']
mouseDownRight xpath=//a[@title='Test_SNF_PRL_36']
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
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[contains(text(),'Containers')]
click //div[@id='UIPortalComposerTab']//div[contains(text(),'Containers')]
echo -- Add container by drag & drop--
waitForElementPresent //div[@id='oneRow']/div
dragAndDropToObject //div[@id='oneRow']/div //div[contains(text(),'Community Management')]
echo -- Choose Application tab--
waitForElementPresent //div[contains(text(),'Applications')]
click //div[contains(text(),'Applications')]
echo -- Drag & drop application into the container added above--
waitForElementPresent //div[@id='Gadgets/Calculator']
dragAndDropToObject //div[@id='Gadgets/Calculator'] //div[@id='UIPage']//div[@class='UIRowContainer EmptyContainer']
waitForElementPresent //div[@class='LAYOUT-BLOCK LAYOUT-PORTLET']//div[contains(text(),'Calculator')]
verifyElementPresent //div[@class='LAYOUT-BLOCK LAYOUT-PORTLET']//div[contains(text(),'Calculator')]
echo -- Delete application --
waitForElementPresent //div[text()='Calculator' and @class='PortletIcon PortletIcon']/following::a[@title='Delete Portlet']
mouseOver //div[text()='Calculator' and @class='PortletIcon PortletIcon']/following::a[@title='Delete Portlet']
click //div[text()='Calculator' and @class='PortletIcon PortletIcon']/following::a[@title='Delete Portlet']
waitForConfirmationPresent
assertConfirmation Are you sure you want to delete this portlet?
waitForElementNotPresent //div[text()='Calculator' and @class='PortletIcon PortletIcon']/following::a[@title='Delete Portlet']
verifyElementNotPresent //div[text()='Calculator' and @class='PortletIcon PortletIcon']/following::a[@title='Delete Portlet']
echo -- Choose Container tab to delete container --
waitForElementPresent //div[@id='UIPortalComposerTab']//div[contains(text(),'Containers')]
click //div[@id='UIPortalComposerTab']//div[contains(text(),'Containers')]
waitForElementPresent //div[text()='Container' and @class='ContainerIcon']/following::a[@title='Delete Container']
mouseOver //div[text()='Container' and @class='ContainerIcon']/following::a[@title='Delete Container']
click //div[text()='Container' and @class='ContainerIcon']/following::a[@title='Delete Container']
waitForConfirmationPresent
assertConfirmation Are you sure you want to delete this Container?
echo -- Click to Finish
waitForElementPresent //div[@id='UIPageEditor']//a[@title='Finish']
click //div[@id='UIPageEditor']//a[@title='Finish']
waitForElementPresent link=Save
click link=Save
echo -- View node after change application --
waitForElementPresent link=Test_SNF_PRL_36
clickAndWait link=Test_SNF_PRL_36
echo -- Delete this node--
waitForElementPresent link=Manage sites
clickAndWait link=Manage sites
waitForElementPresent //td/div[text()='intranet']/following::td/a[text()='Edit Navigation']
click //td/div[text()='intranet']/following::td/a[text()='Edit Navigation']
waitForElementPresent //a[@title='Test_SNF_PRL_36']
click //a[@title='Test_SNF_PRL_36']
waitForElementPresent xpath=//a[@title='Test_SNF_PRL_36']
mouseDownRight xpath=//a[@title='Test_SNF_PRL_36']
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_36']
waitForElementPresent link=Save
click link=Save
echo --Logout
waitForElementPresent link=Logout
clickAndWait link=Logout