Test_SNF_KS_47_ksdemo_CensorKeyword
open /ksdemo/public/classic/
windowMaximize
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
echo -Add censor keyword-
open /ksdemo/private/classic/forum
waitForElementPresent //div[@id='Administrations']//a[text()='Administration']
click //div[@id='Administrations']//a[text()='Administration']
waitForElementPresent //div[@id='Administrations']//span[text()='Censor Keywords']
click //div[@id='Administrations']//span[text()='Censor Keywords']
waitForElementPresent censorKeyword
type censorKeyword censor
waitForElementPresent link=Save
click link=Save
echo -Add Category for Test-
waitForElementPresent link=Add Category
click link=Add Category
waitForElementPresent CategoryTitle
type CategoryTitle SNF_KS_47
type Description test data
waitForElementPresent link=Save
click link=Save
waitForElementPresent //div[@id='UIBreadcumbs']//a[@title='Home']
click //div[@id='UIBreadcumbs']//a[@title='Home']
waitForTextPresent SNF_KS_47
verifyTextPresent SNF_KS_47
echo -Add Forum-
click link=SNF_KS_47
waitForElementPresent link=Add Forum
click link=Add Forum
waitForElementPresent ForumTitle
type ForumTitle SNF_KS_47_For
type Description Desc forum
waitForElementPresent //form[@id='UIForumForm']//a[text()='Save']
click //form[@id='UIForumForm']//a[text()='Save']
waitForTextPresent SNF_KS_47_For
verifyTextPresent SNF_KS_47_For
echo -Add topics and check topic and post censor-
clickAndWait link=Sign out
waitForElementPresent link=Sign in
echo - Sign in as demo
click link=Sign in
waitForElementPresent username
type username demo
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/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
waitForTextPresent This post may contain offensive content. It will be displayed after moderation.
verifyTextPresent This post may contain offensive 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 link=Quick Reply
waitForTextPresent This post may contain offensive content. It will be displayed after moderation.
verifyTextPresent This post may contain offensive 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=Sign out
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/forum
waitForElementPresent link=SNF_KS_47_For
click link=SNF_KS_47_For
echo - Select checkbox
waitForElementPresent //tr[2]/td[9]/input
click //tr[2]/td[9]/input
waitForElementPresent //form[@id='UITopicContainer']//a[text()='Moderation']
click //form[@id='UITopicContainer']//a[text()='Moderation']
waitForElementPresent link=Censor
click link=Censor
waitForElementPresent link=Topic for CTest
click link=Topic for CTest
echo - Select checkbox
waitForElementPresent //td[2]/div/input
click //td[2]/div/input
waitForElementPresent //form[@id='UITopicDetail']//a[text()='Moderation']
click //form[@id='UITopicDetail']//a[text()='Moderation']
waitForElementPresent link=Show
click link=Show
echo -View approved posts by normal user
clickAndWait link=Sign out
click link=Sign in
waitForElementPresent username
type username demo
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/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=Sign out
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/forum
waitForElementPresent link=SNF_KS_47
click link=SNF_KS_47
waitForElementPresent UICategory
waitForElementPresent //form[@id='UICategory']//a[text()='Manage Category']
click //form[@id='UICategory']//a[text()='Manage Category']
waitForElementPresent link=Delete
click link=Delete
assertConfirmation Are you sure to delete this category?
waitForElementNotPresent SNF_KS_47
verifyTextNotPresent SNF_KS_47
echo -- Reset censor value
waitForElementPresent //div[@id='Administrations']//a[text()='Administration']
click //div[@id='Administrations']//a[text()='Administration']
waitForElementPresent //div[@id='Administrations']//span[text()='Censor Keywords']
click //div[@id='Administrations']//span[text()='Censor Keywords']
waitForElementPresent censorKeyword
type censorKeyword
waitForElementPresent link=Save
click link=Save
clickAndWait link=Sign out
waitForTextPresent Sign in