Test_SNF_CS36_ManageFilter
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 mary
waitForElementPresent password
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /portal/private/intranet/mail
pause 10000
echo -Manage Filter-
echo -- Create new filter
waitForElementPresent //div[@id='MailWorkingWorkspace']/div[1]/div/div/div/div/div/div[6]/div
click //div[@id='MailWorkingWorkspace']/div[1]/div/div/div/div/div/div[6]/div
pause 10000
waitForElementPresent link=Click here to add a new filter
click link=Click here to add a new filter
pause 10000
waitForElementPresent filter-name
type filter-name eXo_Test
type filter-from Test_Account
select folder label=Sent
click apply-all-messages
click link=Save
waitForElementPresent //div[@class='SelectedItem'] eXo_Test
click //a/div/div/div
echo -- Verify filtered messages --
click link=Sent
waitForElementPresent link=exotest4@gmail.com
verifyElementPresent link=exotest4@gmail.com
echo -- Edit filter
waitForElementPresent //div[@id='MailWorkingWorkspace']/div[1]/div/div/div/div/div/div[6]/div
click //div[@id='MailWorkingWorkspace']/div[1]/div/div/div/div/div/div[6]/div
waitForElementPresent link=Abort
click link=Abort
click //form[@id='UIMessageFilter']/div[2]/div[1]/div[1]/div[1]/a[2]/div
waitForElementPresent filter-name
type filter-name eXo_Test_Edited
select folder label=Inbox
click //form[@id='UIAddMessageFilter']/div[2]/div/div/div/div[3]/table/tbody/tr/td/div[1]/div/div/div
echo -- Verify edit filter--
click //form[@id='UIMessageFilter']/div[2]/div[2]/table/tbody/tr/td/a/div/div/div
waitForElementPresent //div[@id='UIFolderContainer']
click //div[@id='UIFolderContainer']/div[2]/div[1]/div[1]/a
waitForElementPresent link=Test_Account
pause 5000
echo -- Delete filter --
waitForElementPresent //div[@id='MailWorkingWorkspace']/div[1]/div/div/div/div/div/div[6]/div
click //div[@id='MailWorkingWorkspace']/div[1]/div/div/div/div/div/div[6]/div
waitForElementPresent //div[1]/div[1]/div[1]/a[1]/div
click //div[1]/div[1]/div[1]/a[1]/div
assertConfirmation Are you sure you want to delete this filter ?
click link=Logout
close