Test_SNF_KS_25_ksdemo_BasicActionsInForum
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
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
echo -Add Category for Test-
open /portal/private/intranet/forum
waitForElementPresent //a/span
click //a/span
waitForElementPresent CategoryTitle
type CategoryTitle Cate1_SNF_KS_25
type Description Category 1
waitForElementPresent link=Save
click link=Save
waitForElementPresent //div[2]/div/div/div/div[1]/a
click //div[2]/div/div/div/div[1]/a
waitForTextPresent Cate1_SNF_KS_25
verifyTextPresent Cate1_SNF_KS_25
waitForElementPresent //a/span
click //a/span
waitForElementPresent CategoryTitle
type CategoryTitle Cate2_SNF_KS_25
type Description Category 2
waitForElementPresent link=Save
click link=Save
waitForElementPresent //div[2]/div/div/div/div[1]/a
click //div[2]/div/div/div/div[1]/a
waitForTextPresent Cate2_SNF_KS_25
verifyTextPresent Cate2_SNF_KS_25
echo -Add Forum-
click link=Cate1_SNF_KS_25
waitForElementPresent //div[3]/div/div/div/div/a/span
click //div[3]/div/div/div/div/a/span
waitForElementPresent ForumTitle
type ForumTitle For_SNF_KS_25
type Description Forum actions
waitForElementPresent //form[@id='UIForumForm']/div[4]/table//div[1]/div/div/div
click //form[@id='UIForumForm']/div[4]/table//div[1]/div/div/div
waitForTextPresent For_SNF_KS_25
verifyTextPresent For_SNF_KS_25
echo -Edit Forum-
waitForElementPresent //form[@id='UITopicContainer']/div[4]//div[1]//div[6]/div[1]/div/div
click //form[@id='UITopicContainer']/div[4]//div[1]//div[6]/div[1]/div/div
waitForElementPresent //form[@id='UITopicContainer']//div[@class='ItemIcon EditForumIcon']/a
click //form[@id='UITopicContainer']//div[@class='ItemIcon EditForumIcon']/a
waitForElementPresent ForumTitle
verifyValue ForumTitle For_SNF_KS_25
verifyValue Description Forum actions
type ForumTitle For_SNF_KS_25_Update
type Description Forum actions Update
waitForElementPresent link=Save
click link=Save
waitForElementPresent UITopicContainer
verifyElementPresent //div[@id='UIForumDescription']//span[@class='NameForum'] For_SNF_KS_25_Update
waitForElementPresent //div[@id='UIForumDescription']//span[@class='Description']
verifyElementPresent //div[@id='UIForumDescription']//span[@class='Description'] Forum actions Update
echo -Move Forum-
waitForElementPresent //div[@class='ForumToolbar']//div[@class='CenterBar']/div[6]//div[@class='ItemIcon MoveForumIcon']/a
click //div[@class='ForumToolbar']//div[@class='CenterBar']/div[6]//div[@class='ItemIcon MoveForumIcon']/a
waitForTextPresent Cate2_SNF_KS_25
click link=Cate2_SNF_KS_25
waitForTextPresent Cate2_SNF_KS_25
click link=Cate2_SNF_KS_25
waitForElementPresent link=For_SNF_KS_25_Update
verifyElementPresent link=For_SNF_KS_25_Update
echo -Delete Forum-
waitForElementPresent link=For_SNF_KS_25_Update
click link=For_SNF_KS_25_Update
waitForElementPresent //div[@class='ForumToolbar']//div[@class='CenterBar']/div[6]//div[@class='ItemIcon RemoveForumIcon']/a
click //div[@class='ForumToolbar']//div[@class='CenterBar']/div[6]//div[@class='ItemIcon RemoveForumIcon']/a
assertConfirmation Are you sure you want to delete this forum?
verifyTextNotPresent Test Forum Actions
echo -Delete Test Data-
waitForElementPresent //div[2]/div/div/div/div[1]/a
click //div[2]/div/div/div/div[1]/a
waitForElementPresent link=Cate1_SNF_KS_25
click link=Cate1_SNF_KS_25
waitForElementPresent UICategory
click //form[@id='UICategory']//div[@class='ManageCategoryButton']
waitForElementPresent link=Delete
click link=Delete
assertConfirmation Are you sure you want to delete this category?
waitForElementNotPresent link=Cate1_SNF_KS_25
verifyTextNotPresent link=Cate1_SNF_KS_25
waitForElementPresent link=Cate2_SNF_KS_25
click link=Cate2_SNF_KS_25
waitForElementPresent UICategory
click //form[@id='UICategory']//div[@class='ManageCategoryButton']
waitForElementPresent link=Delete
click link=Delete
assertConfirmation Are you sure you want to delete this category?
waitForElementNotPresent link=Cate2_SNF_KS_25
verifyTextNotPresent link=Cate2_SNF_KS_25
waitForElementPresent link=Logout
clickAndWait link=Logout