Test_SNF_KS_50_ksdemo_AutoPrune
open /portal/public/intranet/
windowMaximize
waitForElementPresent //div[2]/div[2]/div[1]/div/div/div[1]
click //div[2]/div[2]/div[1]/div/div/div[1]
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 for Test-
waitForElementPresent //a/span
click //a/span
waitForElementPresent CategoryTitle
type CategoryTitle Cate1_SNF_KS_50
type Description Category 1
click link=Save
waitForTextPresent Cate1_SNF_KS_50
verifyTextPresent Cate1_SNF_KS_50
echo -Add Forum for Sorting-
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_50
type Description Test forum sorting
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_50
click link=Cate1_SNF_KS_50
waitForTextPresent For1_SNF_KS_50
verifyTextPresent For1_SNF_KS_50
echo -Setting Auto Prune-
waitForElementPresent //div[@id='Administrations']/div/div[1]/div/div/div/div
click //div[@id='Administrations']/div/div[1]/div/div/div/div
waitForElementPresent //div[@id='Administrations']/div/div[2]/div/div/div/div[2]/div/div/div[5]/a/span
click //div[@id='Administrations']/div/div[2]/div/div/div/div[2]/div/div/div[5]/a/span
waitForElementPresent //td[3]/div/input
click //td[3]/div/input
waitForElementPresent inActiveDay
type inActiveDay 1
type jobDay 1
waitForElementPresent link=Dry Run
click link=Dry Run
waitForElementPresent link=Save
click link=Save
waitForElementPresent //table[@id='UIGrid']/tbody/tr[2]/td[5]/div/div[2]/div
click //table[@id='UIGrid']/tbody/tr[2]/td[5]/div/div[2]/div
pause 2000
click link=Run
echo --Reset setting prune
waitForElementPresent //td[3]/div/input
click //td[3]/div/input
waitForElementPresent //table[@id='UIGrid']/tbody/tr[2]/td[5]/div/div[1]/div
click //table[@id='UIGrid']/tbody/tr[2]/td[5]/div/div[1]/div
pause 2000
type inActiveDay 0
type jobDay 0
waitForElementPresent link=Save
click link=Save
waitForElementPresent //form/div[3]/table/tbody/tr/td/div/div/div/div/a
click //form/div[3]/table/tbody/tr/td/div/div/div/div/a
echo -Delete test data-
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_50
verifyTextNotPresent Cate1_SNF_KS_50
waitForElementPresent link=Logout
clickAndWait link=Logout