Test_SNF_CS36_ManageFilter
open /portal
windowMaximize
echo -Manage Filter-
waitForElementPresent //b[contains(text(),'Sign in')]
click //b[contains(text(),'Sign in')]
waitForElementPresent username
type username mary
type password gtn
clickAndWait id=UIPortalLoginFormAction
pause 5000
waitForElementPresent link=Mail
click link=Mail
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