Test_SNF_KS_53_ksdemo_SettingForumPortlet
open /portal/public/intranet/
windowMaximize
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
waitForElementPresent password
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /portal/private/intranet/forum
echo - Add Data 1
waitForElementPresent //div[@id='AddCategory']//a[contains(text(),'Add Category')]
clickAt //div[@id='AddCategory']//a[contains(text(),'Add Category')] 1,1
waitForElementPresent CategoryTitle
type CategoryTitle Knowledge Suite
type Description Category Knowledge Suite1
waitForElementPresent link=Save
click link=Save
waitForTextPresent Knowledge Suite
verifyTextPresent Knowledge Suite
echo - Add forum for Search
waitForElementPresent //a[contains(text(),'Add Forum')]
click //a[contains(text(),'Add Forum')]
waitForElementPresent ForumTitle
type ForumTitle Live demo
type Description Live demo
waitForElementPresent //form[@id='UIForumForm']//a[text()='Save']
click //form[@id='UIForumForm']//a[text()='Save']
waitForTextPresent Live demo
verifyTextPresent Live demo
echo - Add Topic for Search
waitForElementPresent UITopicContainer
click //a[contains(text(),'Start Topic')]
waitForElementPresent ThreadTitle
type ThreadTitle Demo data policy
waitForElementPresent //iframe[@id='messageContent___Frame']
selectFrame //iframe[@id='messageContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Welcome to eXo Knowledge Suite live demo!   We hope you enjoy discovering eXo Forum and FAQ applications features. You don't need to be logged in to see the applications in action. But the power of KS lies in the rich set of admin/moderation features.  We didn't want you to miss them so, when you create a demo account, you will be granted full permissions. Anybody can become an administrator or a moderator and play in the sandbox! As a consequence, the data for this forum (including the accounts) is not meant to stay.  WE MAY RESET FORUMS AND FAQS ANYTIME   Enjoy and don't forget to send feedback at ks@exoplatform.com
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForTextPresent Demo data policy
verifyTextPresent Demo data policy
echo - Add data 2
waitForElementPresent //div[@id='UIBreadcumbs']//a[@title='Home']
click //div[@id='UIBreadcumbs']//a[@title='Home']
waitForElementPresent link=Add Category
click link=Add Category
waitForElementPresent CategoryTitle
type CategoryTitle Cate1_SNF_KS_53
waitForElementPresent //div[@id='DetailTab']//textarea[@id='Description']
type //div[@id='DetailTab']//textarea[@id='Description'] Description of Cate1_SNF_KS_53
waitForElementPresent //form[@id='UICategoryForm']//a[text()='Save']
click //form[@id='UICategoryForm']//a[text()='Save']
waitForTextPresent Cate1_SNF_KS_53
verifyTextPresent Cate1_SNF_KS_53
echo - Setting portlet
waitForElementPresent //ul[@id='PortalNavigationTopContainer']//a[text()='Edit']
mouseOver //ul[@id='PortalNavigationTopContainer']//a[text()='Edit']
waitForElementPresent //ul[@id='PortalNavigationTopContainer']//a[text()='Page']
mouseOver //ul[@id='PortalNavigationTopContainer']//a[text()='Page']
waitForElementPresent //ul[@id='PortalNavigationTopContainer']//a[text()='Layout']
click //ul[@id='PortalNavigationTopContainer']//a[text()='Layout']
echo - Edit Answer portlet
waitForElementPresent //div[@id='UIPage']
mouseOver //div[@id='UIPage']
waitForElementPresent //div[@id='UIPage']//a[@title='Edit Portlet']
click //div[@id='UIPage']//a[@title='Edit Portlet']
echo - Uncheck Knowledge Suite checkbox
waitForElementPresent //div[@id='UITabContent']/div[2]/div/div/div/input
click //div[@id='UITabContent']/div[2]/div/div/div/input
waitForElementPresent link=Save
click link=Save
waitForElementPresent //div[@id='UIPortalApplication']//a[text()='OK']
click //div[@id='UIPortalApplication']//a[text()='OK']
waitForElementPresent link=Close
click link=Close
waitForElementPresent //div[@id='UIPageEditor']//a[@title='Finish']
click //div[@id='UIPageEditor']//a[@title='Finish']
waitForElementNotPresent link=Knowledge Suite
verifyElementNotPresent link=Knowledge Suite
echo -Set default settings-
waitForElementPresent //ul[@id='PortalNavigationTopContainer']//a[text()='Edit']
mouseOver //ul[@id='PortalNavigationTopContainer']//a[text()='Edit']
waitForElementPresent //ul[@id='PortalNavigationTopContainer']//a[text()='Page']
mouseOver //ul[@id='PortalNavigationTopContainer']//a[text()='Page']
waitForElementPresent //ul[@id='PortalNavigationTopContainer']//a[text()='Layout']
click //ul[@id='PortalNavigationTopContainer']//a[text()='Layout']
echo - Edit Answer portlet
waitForElementPresent //div[@id='UIPage']
mouseOver //div[@id='UIPage']
waitForElementPresent //div[@id='UIPage']//a[@title='Edit Portlet']
click //div[@id='UIPage']//a[@title='Edit Portlet']
echo - Check Knowledge Suite checkbox
waitForElementPresent //div[@id='UITabContent']/div[2]/div/div/div/input
click //div[@id='UITabContent']/div[2]/div/div/div/input
waitForElementPresent link=Save
click link=Save
waitForElementPresent //div[@id='UIPortalApplication']//a[text()='OK']
click //div[@id='UIPortalApplication']//a[text()='OK']
waitForElementPresent link=Close
click link=Close
waitForElementPresent //div[@id='UIPageEditor']//a[@title='Finish']
click //div[@id='UIPageEditor']//a[@title='Finish']
waitForElementPresent link=Knowledge Suite
verifyElementPresent link=Knowledge Suite
echo --Delete test data 1 -
waitForElementPresent //div[@id='UICategories']//a[text()='Knowledge Suite']
click //div[@id='UICategories']//a[text()='Knowledge Suite']
waitForElementPresent link=Manage Category
click link=Manage Category
waitForElementPresent link=Delete
click link=Delete
assertConfirmation Are you sure to delete this category?
waitForTextNotPresent Knowledge Suite
verifyTextNotPresent Knowledge Suite
echo -Delete test data 2-
waitForElementPresent link=Cate1_SNF_KS_53
click link=Cate1_SNF_KS_53
waitForElementPresent link=Manage Category
click link=Manage Category
waitForElementPresent link=Delete
click link=Delete
verifyConfirmation Are you sure to delete this category?
waitForTextNotPresent Cate1_SNF_KS_53
verifyTextNotPresent Cate1_SNF_KS_53
waitForElementPresent link=Logout
clickAndWait link=Logout
verifyTextPresent Sign in