source: devel/testlink/automation/src/test/java/br/gov/serpro/cte/email/compor/EnviarEmailAnexoTestCase.java @ 3532

Revision 3532, 1.1 KB checked in by luiz-fernando, 13 years ago (diff)

Ticket #1402 - Adicionado suporte para entrar com o conteudo do email

Line 
1package br.gov.serpro.cte.email.compor;
2
3import org.junit.Test;
4
5import br.gov.serpro.cte.common.ExpressoMailTestCase;
6
7/**
8 * @author L.F.Estivalet (Serpro)
9 *
10 *         Created on Nov 16, 2010 at 3:28:37 PM
11 *
12 */
13public class EnviarEmailAnexoTestCase extends ExpressoMailTestCase {
14        private boolean apagarEmail;
15
16        /**
17         *
18         */
19        public EnviarEmailAnexoTestCase() {
20                this.apagarEmail = true;
21        }
22
23        /**
24         * @param apagarEmail
25         */
26        public EnviarEmailAnexoTestCase(boolean apagarEmail) {
27                this.apagarEmail = apagarEmail;
28        }
29
30        @Test
31        public void testa() throws Exception {
32                super.composeEmail(Valor.EMAIL_TESTE_1.getValue(),
33                                Valor.ASSUNTO_ANEXO.getValue(),
34                                Valor.TEXTO_EMAIL_ANEXO.getValue());
35                selenium.click(Campo.ADICIONAR_ANEXO.getValue());
36                selenium.type(Campo.ANEXO_1.getValue(), Valor.ANEXO_1.getValue());
37                super.sendEmail();
38                super.assertMessage(Campo.MENSAGEM.getValue(),
39                                Mensagem.EMAIL_ENVIADO.getValue());
40
41                if (this.apagarEmail) {
42                        // Remove email da Caixa de Entrada, itens enviados e lixeira.
43                        super.removeEmail(Valor.ASSUNTO_ANEXO.getValue());
44                }
45        }
46}
Note: See TracBrowser for help on using the repository browser.