Test_SNF_KS_35_ksdemo_ViewCategoryForumTopic
echo - Sign in as an administrator
open /portal/public/intranet/
windowMaximize
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /portal/private/intranet/forum
echo - Add category
waitForElementPresent //a/span
click //a/span
waitForElementPresent CategoryTitle
type CategoryTitle Cate1_SNF_KS_35
type Description Category 1
click link=Save
waitForTextPresent Cate1_SNF_KS_35
verifyTextPresent Cate1_SNF_KS_35
echo - Add forum
waitForElementPresent //div[3]/div/div/div/div/a/span
click //div[3]/div/div/div/div/a/span
waitForElementPresent ForumTitle
type ForumTitle For1_SNF_KS_35
type Description prepare forum data
waitForElementPresent //form[@id='UIForumForm']/div[4]/table//div[1]/div/div/div
click //form[@id='UIForumForm']/div[4]/table//div[1]/div/div/div
waitForElementPresent link=Cate1_SNF_KS_35
click link=Cate1_SNF_KS_35
waitForTextPresent For1_SNF_KS_35
verifyTextPresent For1_SNF_KS_35
echo - Add topic
waitForElementPresent link=For1_SNF_KS_35
click link=For1_SNF_KS_35
waitForElementPresent UITopicContainer
click link=Start topic
waitForElementPresent ThreadTitle
type ThreadTitle Top1_SNF_KS_35
waitForElementPresent //iframe[@id='messageContent___Frame']
selectFrame //iframe[@id='messageContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Top1_SNF_KS_35_Content
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForTextPresent Top1_SNF_KS_35
verifyTextPresent Top1_SNF_KS_35
echo - Sign in as a normal user
waitForElementPresent link=Logout
click link=Logout
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username demo
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /portal/private/intranet/forum
echo - Take a tour around category, forum and topic
pause 2000
click link=Cate1_SNF_KS_35
pause 1000
click link=For1_SNF_KS_35
pause 1000
click link=Top1_SNF_KS_35
waitForElementPresent //div[@id='UIBreadcumbs']//div[1]/a[1]
click //div[@id='UIBreadcumbs']//div[1]/a[1]
waitForElementPresent link=For1_SNF_KS_35
click link=For1_SNF_KS_35
waitForElementPresent //div[@id='UIBreadcumbs']//div[1]/a[1]
click //div[@id='UIBreadcumbs']//div[1]/a[1]
waitForElementPresent link=Top1_SNF_KS_35
click link=Top1_SNF_KS_35
echo - Sign in as an administrator
waitForElementPresent link=Logout
click link=Logout
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /portal/private/intranet/forum
echo - Take a tour around category, forum and topic
pause 2000
click link=Cate1_SNF_KS_35
pause 1000
click link=For1_SNF_KS_35
pause 1000
click link=Top1_SNF_KS_35
waitForElementPresent //div[@id='UIBreadcumbs']//div[1]/a[1]
click //div[@id='UIBreadcumbs']//div[1]/a[1]
waitForElementPresent link=For1_SNF_KS_35
click link=For1_SNF_KS_35
waitForElementPresent //div[@id='UIBreadcumbs']//div[1]/a[1]
click //div[@id='UIBreadcumbs']//div[1]/a[1]
waitForElementPresent link=Top1_SNF_KS_35
click link=Top1_SNF_KS_35
echo - Delete data
waitForElementPresent link=Cate1_SNF_KS_35
click link=Cate1_SNF_KS_35
waitForElementPresent //form[@id='UICategory']//div[@class='ManageCategoryButton']
click //form[@id='UICategory']//div[@class='ManageCategoryButton']
waitForElementPresent link=Delete
click link=Delete
assertConfirmation Are you sure you want to delete this category?
waitForTextNotPresent Cate1_SNF_KS_35
verifyTextNotPresent Cate1_SNF_KS_35
echo - Sign out and finish
clickAndWait link=Logout
waitForTextPresent Sign in