Test_SMOKE_KS_01_BasicActionsOnForum
echo Step 1: Login
open /ksdemo/public/classic/
windowMaximize
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username root
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo Step 2: Add category
open /ksdemo/private/classic/forum
waitForElementPresent //div[@id='AddCategory']/div/div/div/div/a/span
click //div[@id='AddCategory']/div/div/div/div/a/span
waitForElementPresent CategoryTitle Smoke_01_Category
type CategoryTitle Smoke_01_Category
type Description Add category for smoke test 01
waitForElementPresent link=Save
click link=Save
waitForElementPresent //div[@id='UIBreadcumbs']/div/div/div/div[1]/a
click //div[@id='UIBreadcumbs']/div/div/div/div[1]/a
waitForElementPresent link=Smoke_01_Category
verifyElementPresent link=Smoke_01_Category
echo Step 3: Add Forum
waitForElementPresent link=Smoke_01_Category
click link=Smoke_01_Category
waitForElementPresent //div[@id='AddForum']/div/div/div/div/a/span
click //div[@id='AddForum']/div/div/div/div/a/span
waitForElementPresent ForumTitle Smoke_01_Forum
type ForumTitle Smoke_01_Forum
type Description Add forum for smoke test 01
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=Smoke_01_Category
click link=Smoke_01_Category
waitForElementPresent link=Smoke_01_Forum
verifyElementPresent link=Smoke_01_Forum
echo Step 4: Add Topic
waitForElementPresent link=Smoke_01_Forum
click link=Smoke_01_Forum
waitForElementPresent link=Start topic
click link=Start topic
waitForElementPresent ThreadTitle Smoke_01_topic
type ThreadTitle Smoke_01_topic
waitForElementPresent //iframe[@id='messageContent___Frame']
selectFrame //iframe[@id='messageContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Topic content for smoke 01
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForElementPresent link=Smoke_01_topic
verifyElementPresent link=Smoke_01_topic
echo Step 5: Post Reply
waitForElementPresent link=Smoke_01_topic
click link=Smoke_01_topic
waitForElementPresent //form[@id='UITopicDetail']/div[5]/div[1]/div/div/div/div/div/div/div/span
click //form[@id='UITopicDetail']/div[5]/div[1]/div/div/div/div/div/div/div/span
waitForElementPresent //iframe[@id='MessageContent___Frame']
selectFrame //iframe[@id='MessageContent___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Post reply for smoke 01
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForTextPresent Re: Smoke_01_topic
verifyTextPresent Re: Smoke_01_topic
echo -Delete test data-
waitForElementPresent link=Smoke_01_Category
click link=Smoke_01_Category
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?
verifyElementNotPresent link=Smoke_01_Category
echo Step 6: Logout
waitForElementPresent link=Sign out
clickAndWait link=Sign out
waitForElementPresent link=Sign in