[4527] | 1 | package org.expressolivre.cte.email.pesquisar; |
---|
| 2 | |
---|
| 3 | import java.text.SimpleDateFormat; |
---|
| 4 | import java.util.Calendar; |
---|
| 5 | |
---|
| 6 | import org.expressolivre.cte.common.BaseEmailTestCase; |
---|
| 7 | import org.expressolivre.cte.common.Config; |
---|
[4620] | 8 | import org.expressolivre.cte.pages.email.MailSearchPage; |
---|
[4527] | 9 | import org.testng.annotations.Test; |
---|
| 10 | |
---|
| 11 | /** |
---|
| 12 | * Suite:[FUN02.8] Pesquisar Mensagens |
---|
| 13 | * |
---|
| 14 | * Caso de Teste: EL-618:Pesquisa avancada de mensagens |
---|
| 15 | * |
---|
| 16 | * Caso de Teste: EL-1201:Pesquisar mensagens sem retornar resultado |
---|
| 17 | * |
---|
| 18 | * Caso de Teste: EL-626:Pesquisar por intervalos de data |
---|
| 19 | * |
---|
| 20 | * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item= |
---|
| 21 | * testcase&id=EL-618 |
---|
| 22 | * |
---|
| 23 | * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item= |
---|
| 24 | * testcase&id=EL-626 |
---|
| 25 | * |
---|
| 26 | * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item= |
---|
| 27 | * testcase&id=EL-618 |
---|
| 28 | * |
---|
| 29 | * @author L.F.Estivalet (Serpro) |
---|
| 30 | * |
---|
| 31 | * Created on May 25, 2011 at 10:06:57 AM |
---|
| 32 | * |
---|
| 33 | */ |
---|
[4675] | 34 | public class PesquisarEmailPorIntervaloDataComResultadoTestCase extends |
---|
| 35 | BaseEmailTestCase { |
---|
[4527] | 36 | |
---|
| 37 | @Test |
---|
| 38 | public void pesquisaEmailPorIntervaloDataComResultado() { |
---|
| 39 | Calendar cal = Calendar.getInstance(); |
---|
| 40 | SimpleDateFormat sdf = new SimpleDateFormat("ddMMyyyy"); |
---|
| 41 | String today = sdf.format(cal.getTime()); |
---|
| 42 | cal.add(Calendar.DATE, -7); |
---|
| 43 | String lastWeek = sdf.format(cal.getTime()); |
---|
| 44 | |
---|
[4620] | 45 | MailSearchPage msp = mp.openSearchMessageWindow(); |
---|
| 46 | msp.setSearchFolders("lINBOX_folders_tree_search"); |
---|
| 47 | msp.setSearchSinceDate(lastWeek); |
---|
| 48 | msp.setSearchBeforeDate(today); |
---|
| 49 | msp.doSearch(); |
---|
[4527] | 50 | mp.assertMessage(Config.getInstance().getMensagem("resultado.pesquisa", |
---|
[4675] | 51 | "1")); |
---|
[4527] | 52 | } |
---|
| 53 | |
---|
| 54 | } |
---|