Test_SNF_KS_04_ksdemo_WatchUnWatchCategory
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 //div[@id='UIPortalLoginFormAction']/div/div/div/a
open /portal/private/intranet/answers
echo -Add Category-
waitForElementPresent //div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
click //div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
waitForElementPresent link=Add category
clickAt link=Add category
waitForElementPresent eventCategoryName
type eventCategoryName SNF_KS_04
waitForElementPresent description
type description SNF_KS_04 des
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=SNF_KS_04
verifyElementPresent link=SNF_KS_04
echo -Watch Category-
waitForElementPresent link=SNF_KS_04
contextMenu link=SNF_KS_04
clickAt link=Watch
waitForText //div[2]/div[3]/div/div/div/div/div[2] You are watching this category, you will be notified about all changes.
verifyText //div[2]/div[3]/div/div/div/div/div[2] You are watching this category, you will be notified about all changes.
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
echo -UnWatch Category-
waitForElementPresent link=SNF_KS_04
contextMenu link=SNF_KS_04
clickAt link=Unwatch
echo -Delete Test Data-
waitForElementPresent link=SNF_KS_04
contextMenu link=SNF_KS_04
clickAt link=Delete
assertConfirmation Are you sure you want to delete this category ?
waitForTextNotPresent SNF_KS_04
verifyTextNotPresent SNF_KS_04
waitForElementPresent link=Logout
clickAndWait link=Logout
waitForTextPresent Sign in