Test_SNF_PRL_36_AddApplicationIntoContainerWhenEditPagePropertiesOfNode
open /portal/public/classic
echo -- Add application into container when edit page properties of node--
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']
echo --Add new node for portal --
clickAndWait link=Site
waitForElementPresent //div[@id='UISiteManagement']//a[contains(@href,"classic") and text()="Edit Navigation"]
click //div[@id='UISiteManagement']//a[contains(@href,"classic") and text()="Edit Navigation"]
waitForElementPresent link=Add Node
click link=Add Node
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 //form[@id='UIPageSearchForm']/div[2]/input
type //form[@id='UIPageSearchForm']/div[2]/input Community Management
waitForElementPresent searchOption
select searchOption label=group
waitForElementPresent //form[@id='UIPageSearchForm']/div[2]/a
click //form[@id='UIPageSearchForm']/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 //a[contains(text(),'Home')]
clickAndWait //a[contains(text(),'Home')]
waitForTextPresent Test_SNF_PRL_36
verifyTextPresent Test_SNF_PRL_36
echo -- Change application when edit page properties of node --
clickAndWait link=Site
waitForElementPresent //div[@id='UISiteManagement']//a[contains(@href,"classic") and text()="Edit Navigation"]
click //div[@id='UISiteManagement']//a[contains(@href,"classic") and 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
pause 10000
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[contains(text(),"Containers")]
click //div[contains(text(),"Containers")]
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[contains(text(),"Applications")]
click //div[contains(text(),"Applications")]
echo -- Drag & drop application into the container added above--
click link=Gadgets
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[contains(@title,"Hold")]
waitForElementPresent //a[@title="Delete Portlet"]
click //a[@title="Delete Portlet"]
waitForConfirmationPresent
assertConfirmation Are you sure you want to delete this portlet?
echo -- Choose Container tab to delete container --
waitForElementPresent //div[contains(text(),"Containers")]
click //div[contains(text(),"Containers")]
mouseOver //div[contains(@title,"Hold")]
waitForElementPresent //a[@title="Delete Container"]
click //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 -- Delete this node--
waitForElementPresent link=Site
clickAndWait link=Site
waitForElementPresent //div[@id='UISiteManagement']//a[contains(@href,"classic") and text()="Edit Navigation"]
click //div[@id='UISiteManagement']//a[contains(@href,"classic") and text()="Edit Navigation"]
waitForElementPresent //a[@title='Test_SNF_PRL_36']
click //a[@title='Test_SNF_PRL_36']
pause 10000
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
waitForElementPresent link=Sign out
clickAndWait link=Sign out