Test_SNF_KS_31_ksdemo_RateTopic
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']
open /ksdemo/private/classic/forum
echo -Add Category for Test-
waitForElementPresent link=Add Category
click link=Add Category
waitForElementPresent CategoryTitle
type CategoryTitle Cate1_SNF_KS_31
type Description Category 1
click link=Save
waitForTextPresent Cate1_SNF_KS_31
verifyTextPresent Cate1_SNF_KS_31
echo -Add Forum-
waitForElementPresent //a[contains(text(),'Add Forum')]
click //a[contains(text(),'Add Forum')]
waitForElementPresent ForumTitle
type ForumTitle For1_SNF_KS_31
type Description prepare forum data
waitForElementPresent //form[@id='UIForumForm']//a[text()='Save']
click //form[@id='UIForumForm']//a[text()='Save']
waitForElementPresent link=Cate1_SNF_KS_31
click link=Cate1_SNF_KS_31
waitForTextPresent For1_SNF_KS_31
verifyTextPresent For1_SNF_KS_31
echo -Add topic for rate-
waitForElementPresent link=For1_SNF_KS_31
click link=For1_SNF_KS_31
waitForElementPresent //a[contains(text(),'Start Topic')]
click //a[contains(text(),'Start Topic')]
waitForElementPresent ThreadTitle
type ThreadTitle Top1_SNF_KS_31
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 Topic for Rate
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForTextPresent Top1_SNF_KS_31
verifyTextPresent Top1_SNF_KS_31
echo -Rate Topic-
waitForElementPresent link=Top1_SNF_KS_31
click link=Top1_SNF_KS_31
waitForElementPresent link=Rate
clickAt link=Rate 1,1
waitForElementPresent //form[@id='UIRatingForm']//div[@title='Excellent']
click //form[@id='UIRatingForm']//div[@title='Excellent']
waitForElementPresent link=For1_SNF_KS_31
click link=For1_SNF_KS_31
waitForElementPresent //div[@title='Rated 5/5.']
verifyElementPresent //div[@title='Rated 5/5.']
echo -Rate again-
waitForElementPresent link=Top1_SNF_KS_31
click link=Top1_SNF_KS_31
waitForElementPresent link=Rate
clickAt link=Rate 1,1
waitForTextPresent Root Root has already rated this topic.
verifyTextPresent Root Root has already rated this topic.
waitForElementPresent //div[@id='UIForumPortlet']//a[text()='OK']
click //div[@id='UIForumPortlet']//a[text()='OK']
echo -More check on Rate-
waitForElementPresent link=Sign out
click link=Sign out
open /ksdemo/public/classic/forun
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username demo
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/forum
waitForElementPresent link=For1_SNF_KS_31
click link=For1_SNF_KS_31
waitForElementPresent //div[@title='Rated 5/5.']
verifyElementPresent //div[@title='Rated 5/5.']
waitForElementPresent link=Top1_SNF_KS_31
click link=Top1_SNF_KS_31
waitForElementPresent link=Rate
clickAt link=Rate 1,1
waitForElementPresent //div[@class='VoteFormContainer']
waitForElementPresent //form[@id='UIRatingForm']//div[@title='Average']
click //form[@id='UIRatingForm']//div[@title='Average']
waitForElementPresent link=For1_SNF_KS_31
click link=For1_SNF_KS_31
waitForElementPresent //div[@title='Rated 4/5.']
verifyElementPresent //div[@title='Rated 4/5.']
echo -Delete test data-
waitForElementPresent link=Sign out
click link=Sign out
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/forum
waitForElementPresent link=Cate1_SNF_KS_31
click link=Cate1_SNF_KS_31
waitForElementPresent link=Manage Category
click link=Manage Category
waitForElementPresent link=Delete
click link=Delete
assertConfirmation Are you sure to delete this category?
waitForTextNotPresent Cate1_SNF_KS_31
verifyTextNotPresent Cate1_SNF_KS_31
waitForElementPresent link=Sign out
clickAndWait link=Sign out
waitForTextPresent Sign in