Test_SNF_KS_47_ksdemo_CensorKeyword
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 censor keyword-
open /portal/private/intranet/forum
waitForElementPresent //div[@id='Administrations']/div/div[1]/div/div/div/div
click //div[@id='Administrations']/div/div[1]/div/div/div/div
waitForElementPresent //div[@id='Administrations']/div/div[2]/div/div/div/div[2]/div/div/div[2]/a/span
click //div[@id='Administrations']/div/div[2]/div/div/div/div[2]/div/div/div[2]/a/span
waitForElementPresent censorKeyword
type censorKeyword censor
waitForElementPresent link=Save
click link=Save
echo -Add Category for Test-
waitForElementPresent //a/span
click //a/span
waitForElementPresent CategoryTitle
type CategoryTitle SNF_KS_47
type Description test data
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 SNF_KS_47
verifyTextPresent SNF_KS_47
echo -Add Forum-
click link=SNF_KS_47
waitForElementPresent //div[3]/div/div/div/div/a/span
click //div[3]/div/div/div/div/a/span
waitForElementPresent ForumTitle
type ForumTitle SNF_KS_47_For
type Description Desc forum
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 SNF_KS_47_For
verifyTextPresent SNF_KS_47_For
echo -Add topics and check topic and post censor-
clickAndWait link=Logout
open /portal/public/intranet/
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 demo
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /portal/private/intranet/forum
waitForElementPresent link=SNF_KS_47_For
click link=SNF_KS_47_For
waitForElementPresent link=Start topic
click link=Start topic
waitForElementPresent ThreadTitle
type ThreadTitle Censor Topic
waitForElementPresent //iframe[@id='messageContent___Frame']
selectFrame //iframe[@id='messageContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Censor Topic Content
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForElementPresent //div[@class='ExoMessageDecorator']
verifyTextPresent The content of this post may contain offending content. It will be displayed after moderation.
waitForElementPresent //div[@id='UIForumPortlet']//a[text()='OK']
click //div[@id='UIForumPortlet']//a[text()='OK']
echo -Add normal topic for censor post test-
waitForElementPresent link=Start topic
click link=Start topic
waitForElementPresent ThreadTitle
type ThreadTitle Topic for CTest
waitForElementPresent //iframe[@id='messageContent___Frame']
selectFrame //iframe[@id='messageContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Topic for CTest
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForTextPresent Topic for CTest
verifyTextPresent Topic for CTest
click link=Topic for CTest
waitForElementPresent Message
type Message censor post
click //form[@id='UITopicDetail']/div[6]/table//div[2]/div[2]/div[2]/div/div/div
waitForElementPresent //div[@class='ExoMessageDecorator']
verifyTextPresent The content of this post may contain offending content. It will be displayed after moderation.
waitForElementPresent //div[@id='UIForumPortlet']//a[text()='OK']
click //div[@id='UIForumPortlet']//a[text()='OK']
echo -Approve Censor post-
clickAndWait link=Logout
open /portal/public/intranet/
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
open /portal/private/intranet/forum
waitForElementPresent link=SNF_KS_47_For
click link=SNF_KS_47_For
waitForElementPresent //tr[2]/td[9]/input
click //tr[2]/td[9]/input
waitForElementPresent //form[@id='UITopicContainer']/div[4]/div/div[1]/div/div/div/div[2]/div[1]/div/div/div/div/div
click //form[@id='UITopicContainer']/div[4]/div/div[1]/div/div/div/div[2]/div[1]/div/div/div/div/div
waitForElementPresent link=Censor
click link=Censor
waitForElementPresent link=Topic for CTest
click link=Topic for CTest
waitForElementPresent //div[3]/input
click //div[3]/input
waitForElementPresent //form[@id='UITopicDetail']/div[4]/div[1]/div/div/div/div/div[1]/div[1]/div/div/div/div/div
click //form[@id='UITopicDetail']/div[4]/div[1]/div/div/div/div/div[1]/div[1]/div/div/div/div/div
waitForElementPresent link=Show
click link=Show
echo -View approved posts by normal user
clickAndWait link=Logout
open /portal/public/intranet/
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 demo
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /portal/private/intranet/forum
waitForElementPresent link=SNF_KS_47_For
click link=SNF_KS_47_For
waitForTextPresent Censor Topic
verifyTextPresent Censor Topic
waitForElementPresent link=Topic for CTest
click link=Topic for CTest
waitForTextPresent censor post
verifyTextPresent censor post
echo -Delete Test Data-
clickAndWait link=Logout
open /portal/public/intranet/
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
open /portal/private/intranet/forum
waitForElementPresent link=SNF_KS_47
click link=SNF_KS_47
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 SNF_KS_47
verifyTextNotPresent SNF_KS_47
echo -- Reset censor value
waitForElementPresent //div[@id='Administrations']/div/div[1]/div/div/div/div
click //div[@id='Administrations']/div/div[1]/div/div/div/div
waitForElementPresent //div[@id='Administrations']/div/div[2]/div/div/div/div[2]/div/div/div[2]/a/span
click //div[@id='Administrations']/div/div[2]/div/div/div/div[2]/div/div/div[2]/a/span
waitForElementPresent censorKeyword
type censorKeyword
waitForElementPresent link=Save
click link=Save
clickAndWait link=Logout