Test_SNF_KS_25_ksdemo_BasicActionsInForum
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']//a[text()="Sign in"]
echo -Go to Forum
open /ksdemo/private/classic/forum
echo -Add Category for Test-
waitForElementPresent //span[text()="Add category"]
click //span[text()="Add category"]
waitForElementPresent CategoryTitle
type CategoryTitle Cate1_SNF_KS_25
type Description Category 1
echo -Save
waitForElementPresent link=Save
click link=Save
echo - Go Home
waitForElementPresent //a[@title="Home"]
click //a[@title="Home"]
waitForTextPresent Cate1_SNF_KS_25
verifyTextPresent Cate1_SNF_KS_25
waitForElementPresent //span[text()="Add category"]
click //span[text()="Add category"]
waitForElementPresent CategoryTitle
type CategoryTitle Cate2_SNF_KS_25
type Description Category 2
waitForElementPresent link=Save
click link=Save
waitForElementPresent //a[@title="Home"]
click //a[@title="Home"]
waitForTextPresent Cate2_SNF_KS_25
verifyTextPresent Cate2_SNF_KS_25
echo -Add Forum-
click link=Cate1_SNF_KS_25
waitForElementPresent //span[text()="Add forum"]
click //span[text()="Add forum"]
waitForElementPresent ForumTitle
type ForumTitle For_SNF_KS_25
type Description Forum actions
waitForElementPresent //form[@id='UIForumForm']//a[text()="Save"]
click //form[@id='UIForumForm']//a[text()="Save"]
waitForTextPresent For_SNF_KS_25
verifyTextPresent For_SNF_KS_25
echo -Edit Forum-
waitForElementPresent //form[@id='UITopicContainer']//div[text()="More actions"]
mouseOver //form[@id='UITopicContainer']//div[text()="More actions"]
click //form[@id='UITopicContainer']//div[text()="More actions"]
waitForElementPresent //a[contains(@href,"EditForum")]
click //a[contains(@href,"EditForum")]
waitForElementPresent ForumTitle
verifyValue ForumTitle For_SNF_KS_25
verifyValue Description Forum actions
type ForumTitle For_SNF_KS_25_Update
type Description Forum actions Update
echo -Save
waitForElementPresent link=Save
click link=Save
verifyElementPresent //div[@id='UIForumDescription']//span[@class='NameForum']
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 //form[@id='UITopicContainer']//div[text()="More actions"]
click //form[@id='UITopicContainer']//div[text()="More actions"]
waitForElementPresent //a[contains(@href,"MoveForum")]
click //a[contains(@href,"MoveForum")]
waitForElementPresent link=Cate2_SNF_KS_25
click link=Cate2_SNF_KS_25
waitForElementNotPresent link=For_SNF_KS_25_Update
verifyElementNotPresent link=For_SNF_KS_25_Update
waitForElementPresent //a[@title="Home"]
click //a[@title="Home"]
waitForElementPresent link=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 //form[@id='UITopicContainer']//div[text()="More actions"]
click //form[@id='UITopicContainer']//div[text()="More actions"]
waitForElementPresent //a[contains(@href,"RemoveForum")]
click //a[contains(@href,"RemoveForum")]
assertConfirmation Are you sure you want to delete this forum?
verifyTextNotPresent Test Forum Actions
echo -Delete Test Data-
waitForElementPresent //a[@title="Home"]
click //a[@title="Home"]
waitForElementPresent link=Cate1_SNF_KS_25
click link=Cate1_SNF_KS_25
echo -Manage Category menu
waitForElementPresent //div[text()="Manage Category"]
click //div[text()="Manage Category"]
echo -Delete: Cate1_SNF_KS_25
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 //div[text()="Manage Category"]
click //div[text()="Manage Category"]
echo -Delete: Cate2_SNF_KS_25
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
echo -- Sign out
waitForElementPresent link=Sign out
clickAndWait link=Sign out