Test_SNF_KS_26_ksdemo_MoreActionInForum
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 Category for Test-
open /ksdemo/private/classic/forum
waitForElementPresent link=Add Category
click link=Add Category
waitForElementPresent CategoryTitle
type CategoryTitle Cate1_SNF_KS_26
type Description Category 1
waitForElementPresent link=Save
click link=Save
waitForTextPresent Cate1_SNF_KS_26
verifyTextPresent Cate1_SNF_KS_26
echo -Add Forum-
waitForElementPresent //a[contains(text(),'Add Forum')]
click //a[contains(text(),'Add Forum')]
waitForElementPresent ForumTitle
type ForumTitle For_SNF_KS_26
type Description More actions
waitForElementPresent //form[@id='UIForumForm']//a[text()='Save']
click //form[@id='UIForumForm']//a[text()='Save']
waitForTextPresent For_SNF_KS_26
verifyTextPresent For_SNF_KS_26
echo -Lock Forum-
waitForElementPresent //a[contains(text(),'More Actions')]
click //a[contains(text(),'More Actions')]
waitForElementPresent //form[@id='UITopicContainer']//a[contains(@href,'SetLockedForum')]
click //form[@id='UITopicContainer']//a[contains(@href,'SetLockedForum')]
waitForElementPresent //form[@id='UITopicContainer']//div[@title='Forum is closed for posting.']
verifyElementPresent //form[@id='UITopicContainer']//div[@title='Forum is closed for posting.']
echo -Unlock Forum-
waitForElementPresent //a[contains(text(),'More Actions')]
click //a[contains(text(),'More Actions')]
waitForElementPresent //form[@id='UITopicContainer']//a[contains(@href,'SetUnLockForum')]
click //form[@id='UITopicContainer']//a[contains(@href,'SetUnLockForum')]
waitForElementPresent //form[@id='UITopicContainer']//a[contains(@href,'AddTopic')]
verifyElementPresent //form[@id='UITopicContainer']//a[contains(@href,'AddTopic')]
echo -Close Forum-
waitForElementPresent //a[contains(text(),'More Actions')]
click //a[contains(text(),'More Actions')]
waitForElementPresent //form[@id='UITopicContainer']//a[contains(@href,'SetCloseForum')]
click //form[@id='UITopicContainer']//a[contains(@href,'SetCloseForum')]
waitForElementPresent //form[@id='UITopicContainer']//div[@title='Forum is closed for posting.']
verifyElementPresent //form[@id='UITopicContainer']//div[@title='Forum is closed for posting.']
echo -Open Forum-
waitForElementPresent //a[contains(text(),'More Actions')]
click //a[contains(text(),'More Actions')]
waitForElementPresent //form[@id='UITopicContainer']//a[contains(@href,'SetOpenForum')]
click //form[@id='UITopicContainer']//a[contains(@href,'SetOpenForum')]
waitForElementPresent //form[@id='UITopicContainer']//a[contains(@href,'AddTopic')]
verifyElementPresent //form[@id='UITopicContainer']//a[contains(@href,'AddTopic')]
echo -Watch Forum-
waitForElementPresent link=Watch
click link=Watch
waitForElementPresent //div[@id='UIForumPortlet']//a[text()='OK']
click //div[@id='UIForumPortlet']//a[text()='OK']
waitForElementPresent link=Unwatch
verifyElementPresent link=Unwatch
echo -Manage Watch Forum-
waitForElementPresent //a[contains(text(),'More Actions')]
click //a[contains(text(),'More Actions')]
waitForElementPresent link=Watches
click link=Watches
waitForElementPresent css=div.DeleteIcon
click css=div.DeleteIcon
waitForTextPresent No Emails
verifyTextPresent No Emails
waitForElementPresent //form[@id='UIWatchToolsForm']//a[text()='Close']
click //form[@id='UIWatchToolsForm']//a[text()='Close']
echo -Manage IP Ban-
waitForElementPresent link=Banned IPs
click link=Banned IPs
waitForElementPresent newIpBan1
type newIpBan1 192
type newIpBan2 168
type newIpBan3 1
type newIpBan4 64
click link=[Add]
waitForTextPresent 192.168.1.64
verifyTextPresent 192.168.1.64
waitForElementPresent link=X
click link=X
assertConfirmation This IP will no longer be banned. Do you confirm?
waitForTextNotPresent 192.168.1.64
verifyTextNotPresent 192.168.1.64
waitForElementPresent UIBanIPForumManagerForm
waitForElementPresent //form[@id='UIBanIPForumManagerForm']//a[text()='Close']
click //form[@id='UIBanIPForumManagerForm']//a[text()='Close']
echo -Delete Test Data-
waitForElementPresent link=Cate1_SNF_KS_26
click link=Cate1_SNF_KS_26
waitForElementPresent link=Manage Category
click link=Manage Category
waitForElementPresent link=Delete
click link=Delete
assertConfirmation Are you sure to delete this category?
waitForElementNotPresent link=Cate1_SNF_KS_26
verifyTextNotPresent link=Cate1_SNF_KS_26
clickAndWait link=Sign out
waitForTextPresent Sign in