Test_SNF_KS_56_ksdemo_SettingFAQPortlet
open /ksdemo/public/classic/
windowMaximize
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/answers
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']
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']
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 /ksdemo/private/classic/faq
waitForTextPresent SNF_KS_56_Parent
verifyTextPresent SNF_KS_56_Parent
verifyTextPresent SNF_KS_56_Sub
waitForElementPresent link=Edit Page
click link=Edit Page
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 General Questions checkbox
waitForElementPresent //div[contains(text(),'General Questions')]/preceding-sibling::div/input
click //div[contains(text(),'General Questions')]/preceding-sibling::div/input
echo - Uncheck SNF_KS_56_Subs checkbox
waitForElementPresent //div[contains(text(),'SNF_KS_56_Subs')]/preceding-sibling::div/input
click //div[contains(text(),'SNF_KS_56_Subs')]/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']
waitForTextNotPresent General Questions
verifyTextNotPresent General Questions
waitForElementNotPresent SNF_KS_56_Subs
verifyTextNotPresent SNF_KS_56_Subs
echo --Show hiding categories from Edit mode
waitForElementPresent link=Edit Page
click link=Edit Page
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
click //div[contains(text(),'General Questions')]/preceding-sibling::div/input
echo - Check SNF_KS_56_Subs checkbox
waitForElementPresent //div[contains(text(),'SNF_KS_56_Subs')]/preceding-sibling::div/input
click //div[contains(text(),'SNF_KS_56_Subs')]/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
verifyTextPresent SNF_KS_56_Sub
echo --Delete added categories
open /ksdemo/private/classic/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 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
clickAndWait link=Sign out
waitForTextPresent Sign in
verifyTextPresent Sign in