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 //a[@id='UIPortalLoginFormAction']
echo Step 2: Add category
open /ksdemo/private/classic/forum
waitForElementPresent //div[@id='FAQCategroManager']//a[text()='Add Category']
click //div[@id='FAQCategroManager']//a[text()='Add Category']
waitForElementPresent CategoryTitle
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 //a[contains(text(),'Add Forum')]
click //a[contains(text(),'Add Forum')]
waitForElementPresent ForumTitle
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 //a[contains(text(),'Start Topic')]
click //a[contains(text(),'Start Topic')]
waitForElementPresent ThreadTitle
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]/a
click //form[@id='UITopicDetail']/div[5]/div[1]/a
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 link=Manage Category
click link=Manage Category
waitForElementPresent link=Delete
click link=Delete
assertConfirmation Are you sure you want to delete this category?
waitForElementNotPresent link=Smoke_01_Category
verifyElementNotPresent link=Smoke_01_Category
echo Step 6: Logout
clickAndWait link=Sign out
waitForElementPresent link=Sign in