Test_SNF_KS_56_ksdemo_SettingFAQPortlet
open /portal/public/intranet/
windowMaximize
waitForElementPresent //div[2]/div[2]/div[1]/div/div/div[1]
click //div[2]/div[2]/div[1]/div/div/div[1]
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /portal/private/intranet/answers
echo --Add new category/sub-category
waitForElementPresent xpath=//div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
click xpath=//div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
waitForElementPresent link=Add category
clickAt link=Add category
waitForElementPresent eventCategoryName SNF_KS_56_Parent
type eventCategoryName SNF_KS_56_Parent
waitForElementPresent link=Save
click link=Save
waitForTextPresent SNF_KS_56_Parent
verifyTextPresent SNF_KS_56_Parent
waitForElementPresent link=SNF_KS_56_Parent
click link=SNF_KS_56_Parent
waitForElementPresent xpath=//div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
click xpath=//div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
waitForElementPresent link=Add category
clickAt link=Add category
waitForElementPresent eventCategoryName SNF_KS_56_Sub
type eventCategoryName SNF_KS_56_Sub
waitForElementPresent link=Save
click link=Save
waitForTextPresent SNF_KS_56_Sub
verifyTextPresent SNF_KS_56_Sub
echo --Hide category from Edit mode
open /portal/private/intranet/faq
waitForTextPresent SNF_KS_56_Parent
verifyTextPresent SNF_KS_56_Parent
verifyTextPresent SNF_KS_56_Sub
waitForElementPresent link=Edit Page
click link=Edit Page
pause 1000
mouseOver //div[@id='UIPage']/div/div/div/div/div/div/div
waitForElementPresent //div/div/div[2]/div/div/div/div/div/div/a[1]
click //div/div/div[2]/div/div/div/div/div/div/a[1]
waitForElementPresent //div[@id='FAQCate2']/div[1]/input
click //div[@id='FAQCate2']/div[1]/input
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=Close
click link=Close
waitForElementPresent //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
click //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
waitForTextNotPresent SNF_KS_56_Sub
verifyTextNotPresent SNF_KS_56_Sub
echo --Show hiding categories from Edit mode
waitForElementPresent link=Edit Page
click link=Edit Page
pause 1000
mouseOver //div[@id='UIPage']/div/div/div/div/div/div/div
waitForElementPresent //div/div/div[2]/div/div/div/div/div/div/a[1]
click //div/div/div[2]/div/div/div/div/div/div/a[1]
waitForElementPresent //div[@id='FAQCate2']/div[1]/input
click //div[@id='FAQCate2']/div[1]/input
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=Close
click link=Close
waitForElementPresent //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
click //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
waitForTextPresent SNF_KS_56_Sub
verifyTextPresent SNF_KS_56_Sub
echo --Delete added categories
open /portal/private/intranet/answers
waitForElementPresent //div[@id='UIBreadcumbs']/div/table/tbody/tr/td/div/a
click //div[@id='UIBreadcumbs']/div/table/tbody/tr/td/div/a
waitForElementPresent link=SNF_KS_56_Parent
click link=SNF_KS_56_Parent
waitForElementPresent xpath=//div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
click xpath=//div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
waitForElementPresent //div[@id='FAQCategroManager']/div/div/div/div/div[3]
clickAt //div[@id='FAQCategroManager']/div/div/div/div/div[3]
assertConfirmation Are you sure you want to delete this category ?
waitForTextNotPresent SNF_KS_56_Parent
verifyTextNotPresent SNF_KS_56_Parent
clickAndWait link=Logout