Test_SNF_KS_30_ksdemo_TagTopic
open /ksdemo/public/classic/
windowMaximize
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /ksdemo/private/classic/forum
echo -Add Category for Test-
waitForElementPresent link=Add category
click link=Add category
waitForElementPresent CategoryTitle
type CategoryTitle Cate1_SNF_KS_30
type Description Category 1
click link=Save
waitForTextPresent Cate1_SNF_KS_30
verifyTextPresent Cate1_SNF_KS_30
echo -Add Forum-
waitForElementPresent link=Add forum
click link=Add forum
waitForElementPresent ForumTitle
type ForumTitle For1_SNF_KS_30
type Description prepare forum data
waitForElementPresent //form[@id='UIForumForm']/div[4]/table//div[1]/div/div/div
click //form[@id='UIForumForm']/div[4]/table//div[1]/div/div/div
waitForElementPresent link=Cate1_SNF_KS_30
click link=Cate1_SNF_KS_30
waitForTextPresent For1_SNF_KS_30
verifyTextPresent For1_SNF_KS_30
echo -Add topic-
waitForElementPresent link=For1_SNF_KS_30
click link=For1_SNF_KS_30
waitForElementPresent link=Start topic
click link=Start topic
waitForElementPresent ThreadTitle
type ThreadTitle Top1_SNF_KS_30
waitForElementPresent //iframe[@id='messageContent___Frame']
selectFrame //iframe[@id='messageContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body topic1 for tag
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForTextPresent Top1_SNF_KS_30
verifyTextPresent Top1_SNF_KS_30
echo --Add tag for topic
waitForElementPresent link=Top1_SNF_KS_30
click link=Top1_SNF_KS_30
waitForElementPresent link=Tag
click link=Tag
type AddTag toto titi tata
waitForElementPresent //div[@id='AddTagId']/div/div/div/div/div[2]/div/div/div[2]/div/div/div/div/div
click //div[@id='AddTagId']/div/div/div/div/div[2]/div/div/div[2]/div/div/div/div/div
waitForElementPresent link=toto
verifyElementPresent link=toto
verifyElementPresent link=titi
verifyElementPresent link=tata
echo -- Untag from Manage tag
waitForElementPresent link=toto
click link=toto
waitForElementPresent //div[@id='UITopicContent']/div/table/tbody/tr/td[9]/input
click //div[@id='UITopicContent']/div/table/tbody/tr/td[9]/input
waitForElementPresent //form[@id='UITopicsTag']/div[2]/div[3]/div/div[1]/div/div/div/div[4]/div[1]/div/div/div/div
click //form[@id='UITopicsTag']/div[2]/div[3]/div/div[1]/div/div/div/div[4]/div[1]/div/div/div/div
waitForElementPresent link=Untag
click link=Untag
assertConfirmation Are you sure you want to remove this tag from the topic?
echo -- Untag by click on icon
waitForElementPresent link=Top1_SNF_KS_30
click link=Top1_SNF_KS_30
waitForElementPresent //div[@id='TagContainer']/div[1]/div[1]
click //div[@id='TagContainer']/div[1]/div[1]
echo --Check existing of tag in topic after untag
waitForTextNotPresent toto
verifyTextNotPresent toto
waitForTextNotPresent titi
verifyTextNotPresent titi
echo -Delete Test Data
waitForElementPresent link=Cate1_SNF_KS_30
click link=Cate1_SNF_KS_30
waitForElementPresent //form[@id='UICategory']/div[3]/div/div/div/div[4]/div[1]/div/div/div/div/div
click //form[@id='UICategory']/div[3]/div/div/div/div[4]/div[1]/div/div/div/div/div
waitForElementPresent link=Delete
click link=Delete
assertConfirmation Are you sure you want to delete this category?
waitForTextNotPresent Cate1_SNF_KS_30
verifyTextNotPresent Cate1_SNF_KS_30
waitForElementPresent link=Sign out
clickAndWait link=Sign out
waitForTextPresent Sign in