Test_SNF_KS_02_ksdemo_DragAndDropCategory
open /ksdemo/public/classic/
windowMaximize
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
waitForElementPresent password exo
type password gtn
waitForElementPresent //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /ksdemo/private/classic/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_02_Category 1
waitForElementPresent link=Save
click link=Save
waitForTextPresent SNF_KS_02_Category 1
verifyTextPresent SNF_KS_02_Category 1
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
type eventCategoryName SNF_KS_02_Category 2
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=SNF_KS_02_Category 2
verifyTextPresent SNF_KS_02_Category 2
echo -Drag and Drop-
waitForElementPresent //div[@class='UICategories']/div/div[4]//a
dragAndDropToObject //div[@class='UICategories']/div/div[6]//a //div[@class='UICategories']/div/div[8]//a
waitForElementPresent link=SNF_KS_02_Category 2
click link=SNF_KS_02_Category 2
waitForElementPresent link=SNF_KS_02_Category 1
verifyElementPresent link=SNF_KS_02_Category 1
echo -Delete Test Data-
waitForElementPresent xpath=//div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
click xpath=//div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
waitForElementPresent //div[@id='FAQCategroManager']//div[@class='UIRightPopupMenuContainer']/div[3]
clickAt //div[@id='FAQCategroManager']//div[@class='UIRightPopupMenuContainer']/div[3]
assertConfirmation Are you sure you want to delete this category ?
waitForElementNotPresent link=SNF_KS_02_Category 2
verifyTextNotPresent SNF_KS_02_Category 2
waitForElementPresent link=Sign out
clickAndWait link=Sign out
waitForTextPresent Sign in