Test_SNF_PRL_20_ExpandAllCollapseAll
open /portal/public/intranet/
echo -CollapseAll-
windowMaximize
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo -- Add new page have sitemap portlet --
waitForElementPresent link=Add New Page
click link=Add New Page
waitForElementPresent pageName
type pageName Test_SNF_PRL_20
type pageDisplayName Test_SNF_PRL_20
echo -- Click Next to move 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 step 3 --
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 -- Choose web's category --
waitForElementPresent link=web
click link=web
waitForElementPresent //div[@id='web/SiteMapPortlet']/div/div/img //div[2]/div/div/div[1]/div/div[2]/div/div/div/div
dragAndDropToObject //div[@id='web/SiteMapPortlet']/div/div/img //div[2]/div/div/div[1]/div/div[2]/div/div/div/div
waitForElementPresent //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
clickAndWait //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
pause 30000
echo -- Click on link to move to another page--
clickAndWait link=Test_SNF_PRL_20
echo --Expand SiteMap tree
waitForElementPresent //div[@id='UISiteMap']/div[1]/div[2]
click //div[@id='UISiteMap']/div[1]/div[2]
waitForTextPresent Home
verifyTextPresent Home
waitForTextPresent Test_SNF_PRL_20
verifyTextPresent Forums
verifyTextPresent Documents
verifyTextPresent Sites Explorer
verifyTextPresent Newsletter Manager
verifyTextPresent Form Generator
verifyTextPresent Sites Administration
verifyTextPresent Form Generator
verifyTextPresent Portal Administration
verifyTextPresent Applications Registry
verifyTextPresent Manage Pages
verifyTextPresent Add new Users
verifyTextPresent Manage Users and Group
verifyTextPresent IDE
echo --Collapse SiteMap Tree
waitForElementPresent //div[@id='UISiteMap']/div[1]/div[1]
click //div[@id='UISiteMap']/div[1]/div[1]
echo -- verify Test_SNF_PRL_20 disappear
verifyElementNotPresent //a[@class='NodeIcon DefaultPageIcon' and @title='Test_SNF_PRL_20']
echo -- verify  Appkication Registry disappear
verifyElementNotPresent //a[@class='NodeIcon DefaultPageIcon' and @title='Applications Registry']
echo -- verify  Page Management disappear
verifyElementNotPresent //a[@class='NodeIcon DefaultPageIcon' and @title='Manage Pages']
echo -- verify  New Staff disappear
verifyElementNotPresent //a[@class='NodeIcon DefaultPageIcon' and @title='Add new Users']
echo -- verify Manage Users and Groups disappear
verifyElementNotPresent //a[@class='NodeIcon DefaultPageIcon' and @title='Manage Users and Groups']
echo -- Delete page ( node)--
waitForElementPresent link=Manage sites
clickAndWait link=Manage sites
waitForElementPresent //div[@id='UISiteManagement']/table[3]/tbody/tr/td[3]/a[2]
click //div[@id='UISiteManagement']/table[3]/tbody/tr/td[3]/a[2]
waitForElementPresent //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div[2]/div/div/a
click //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div[2]/div/div/a
waitForElementPresent //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div[1]/a
click //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div[1]/a
waitForElementPresent //a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Test_SNF_PRL_20']
mouseDownRight //a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Test_SNF_PRL_20']
waitForElementPresent link=Delete Node
click link=Delete Node
assertConfirmation Are you sure you want to delete this node?
waitForElementPresent link=Save
click link=Save
pause 30000
echo -- Delete page in manage page --
waitForElementPresent link=Manage Pages
clickAndWait link=Manage Pages
waitForElementPresent searchTerm
type searchTerm Test_SNF_PRL_20
waitForElementPresent searchOption
select searchOption label=Title
waitForElementPresent //form[@id='UIPageSearch']/div[2]/a
click //form[@id='UIPageSearch']/div[2]/a
waitForElementPresent //img[@title='Delete Page']
click //img[@title='Delete Page']
assertConfirmation Do you want to delete this page?
waitForTextPresent No result found.
verifyTextPresent No result found.
waitForElementPresent //div[5]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
click //div[5]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
waitForElementPresent link=Logout
clickAndWait link=Logout