Test_SNF_KS_22_ksdemo_BasicActionsInCategory
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
echo -Add Category-
open /portal/private/intranet/forum
waitForElementPresent //a/span
click //a/span
waitForElementPresent CategoryTitle
type CategoryTitle SNF_KS_22
type Description SNF_KS_22 Desc
waitForElementPresent link=Save
click link=Save
pause 1000
click //div[2]/div/div/div/div[1]/a
waitForTextPresent SNF_KS_22
verifyTextPresent SNF_KS_22
echo -Edit Category-
pause 1000
click link=SNF_KS_22
waitForElementPresent //form[@id='UICategory']//div[@class='ManageCategoryButton']
click //form[@id='UICategory']//div[@class='ManageCategoryButton']
waitForElementPresent //div[@class='ItemIcon EditCategoryIcon']//a[text()='Edit']
click //div[@class='ItemIcon EditCategoryIcon']//a[text()='Edit']
waitForElementPresent CategoryTitle
verifyValue CategoryTitle SNF_KS_22
verifyValue Description SNF_KS_22 Desc
type CategoryTitle SNF_KS_22 Update
type Description SNF_KS_22 Desc Update
type UserPrivate root
waitForElementPresent //form[@id='UICategoryForm']/div[2]//div[1]//div[2]/div/div/div/div/div
click //form[@id='UICategoryForm']/div[2]//div[1]//div[2]/div/div/div/div/div
waitForElementPresent Topicable
type Topicable root
type Postable root
waitForElementPresent link=Save
click link=Save
pause 1000
click //div[2]/div/div/div/div[1]/a
waitForTextPresent SNF_KS_22 Update
verifyTextPresent SNF_KS_22 Update
echo -Delete Category-
click link=SNF_KS_22 Update
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 SNF_KS_22 Update
verifyTextNotPresent SNF_KS_22 Update
clickAndWait link=Logout
waitForTextPresent Sign in