Test_SNF_KS_56_ksdemo_SettingFAQPortlet
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/answers
echo --Add new category 1
waitForElementPresent link=Category
click link=Category
waitForElementPresent //div[@id='FAQCategroManager']//a[text()='Add Category']
clickAt //div[@id='FAQCategroManager']//a[text()='Add Category']
waitForElementPresent eventCategoryName
type eventCategoryName General questions
waitForElementPresent link=Save
click link=Save
waitForTextPresent General questions
verifyTextPresent General questions
echo --Add new category/sub-category
waitForElementPresent link=Category
click link=Category
waitForElementPresent //div[@id='FAQCategroManager']//a[text()='Add Category']
clickAt //div[@id='FAQCategroManager']//a[text()='Add Category'] 1,1
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 link=Category
click link=Category
waitForElementPresent //div[@id='FAQCategroManager']//a[text()='Add Category']
clickAt //div[@id='FAQCategroManager']//a[text()='Add Category'] 1,1
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 -- Unhide category from Edit mode
open /portal/public/intranet/faq
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 - Check SNF_KS_56 checkbox
waitForElementPresent //div[contains(text(),'SNF_KS_56')]/preceding-sibling::div/input
clickAt //div[contains(text(),'SNF_KS_56')]/preceding-sibling::div/input 1,1
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=Close
click link=Close
waitForElementPresent //div[@id='UIPageEditor']//a[@title='Finish']
click //div[@id='UIPageEditor']//a[@title='Finish']
waitForTextNotPresent General Questions
verifyTextNotPresent General Questions
waitForTextPresent SNF_KS_56_Parent
verifyTextPresent SNF_KS_56_Parent
verifyTextPresent SNF_KS_56_Sub
echo -- Hiding categories from Edit mode
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 General Questions checkbox
waitForElementPresent //div[contains(text(),'General questions')]/preceding-sibling::div/input
check //div[contains(text(),'General questions')]/preceding-sibling::div/input
echo - Check SNF_KS_56 checkbox
waitForElementPresent //div[contains(text(),'SNF_KS_56')]/preceding-sibling::div/input
uncheck //div[contains(text(),'SNF_KS_56')]/preceding-sibling::div/input
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=Close
click link=Close
waitForElementPresent //div[@id='UIPageEditor']//a[@title='Finish']
click //div[@id='UIPageEditor']//a[@title='Finish']
waitForTextPresent General questions
verifyTextPresent General questions
verifyTextNotPresent SNF_KS_56_Parent
echo --Delete added categories
open /portal/public/intranet/answers
waitForElementPresent link=Category
click link=Category
waitForElementPresent //div[@id='FAQCategroManager']//a[text()='Delete']
clickAt //div[@id='FAQCategroManager']//a[text()='Delete'] 1,1
verifyConfirmation Are you sure to delete this category?
waitForTextNotPresent SNF_KS_56_Parent
verifyTextNotPresent SNF_KS_56_Parent
echo - delete General questions
waitForElementPresent link=General questions
click link=General questions
waitForElementPresent link=Category
click link=Category
waitForElementPresent //div[@id='FAQCategroManager']//a[text()='Delete']
clickAt //div[@id='FAQCategroManager']//a[text()='Delete'] 1,1
verifyConfirmation Are you sure to delete this category?
waitForTextNotPresent General questions
verifyTextNotPresent General questions
waitForElementPresent link=Logout
clickAndWait link=Logout
waitForTextPresent Sign in