Test_SNF_KS_01_ksdemo_ManageCategory
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
waitForElementPresent password
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/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_01
waitForElementPresent //img[@title='Select a user ']
click //img[@title='Select a user ']
waitForElementPresent demo
click demo
waitForElementPresent //form[@id='UIUserSelector']/div[2]/div[2]/table/tbody/tr/td/a[1]/div/div/div
click //form[@id='UIUserSelector']/div[2]/div[2]/table/tbody/tr/td/a[1]/div/div/div
click moderatequestions
click ViewAuthorInfor
click moderateAnswers
type description SNF_KS_01
click link=Save
waitForElementPresent link=SNF_KS_01
verifyElementPresent link=SNF_KS_01
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_02
type description SNF_KS_02
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=SNF_KS_02
verifyElementPresent link=SNF_KS_02
echo -Edit Category-
click link=SNF_KS_01
waitForElementPresent //div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
click //div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
waitForElementPresent //div[@id='FAQCategroManager']//div[@class='MenuItem']
clickAt //div[@id='FAQCategroManager']//div[@class='MenuItem']
waitForElementPresent eventCategoryName SNF_KS_01
type eventCategoryName SNF_KS_01 Update
type index 4
type description SNF_KS_01 Desc
waitForElementPresent //form[@id='UICategoryForm']/div[2]/div/div/table//div[1]/div/div/div
click //form[@id='UICategoryForm']/div[2]/div/div/table//div[1]/div/div/div
echo -Verify the edit category-
waitForElementPresent //div[@id='UIBreadcumbs']/div/table/tbody/tr/td/div/a
click //div[@id='UIBreadcumbs']/div/table/tbody/tr/td/div/a
waitForTextPresent SNF_KS_01 Update
verifyTextPresent SNF_KS_01 Update
echo -Move Category-
contextMenu //div[@id='AnswersContainer']//a[@title='SNF_KS_01 Update']
waitForElementPresent //div[@id='AnswersContainer']/div/div/div[6]/div/div/div/div/div[7]/a
mouseDownRight //div[@id='AnswersContainer']/div/div/div[6]/div/div/div/div/div[7]/a
waitForElementPresent //a[contains(text(),'SNF_KS_02')]
doubleClick //a[contains(text(),'SNF_KS_02')]
waitForElementNotPresent link=SNF_KS_01 Update
verifyElementNotPresent link=SNF_KS_01 Update
waitForElementPresent //a/span
click //a/span
waitForElementPresent link=SNF_KS_01 Update
verifyElementPresent link=SNF_KS_01 Update
echo -Delete Category-
waitForElementPresent //img[@alt='categories']
click //img[@alt='categories']
contextMenu //div[@id='AnswersContainer']//a[@title='SNF_KS_02']
waitForElementPresent //div[@id='AnswersContainer']/div/div/div[4]/div/div/div/div/div[6]/a
mouseDownRight //div[@id='AnswersContainer']/div/div/div[4]/div/div/div/div/div[6]/a
assertConfirmation Are you sure you want to delete this category ?
waitForTextNotPresent SNF_KS_02
verifyTextNotPresent SNF_KS_02
waitForElementPresent link=Logout
clickAndWait link=Logout