1 | package org.expressolivre.cte.calendar.pesquisar; |
---|
2 | |
---|
3 | import org.expressolivre.cte.common.BaseCalendarTestCase; |
---|
4 | import org.expressolivre.cte.pages.calendar.AppointmentSearchResultPage; |
---|
5 | import org.expressolivre.cte.pages.calendar.AppointmentViewPage; |
---|
6 | import org.testng.Assert; |
---|
7 | import org.testng.annotations.Parameters; |
---|
8 | import org.testng.annotations.Test; |
---|
9 | |
---|
10 | /** |
---|
11 | * Caso de Teste: EL-1266:Pesquisar pelo titulo e apagar um compromisso |
---|
12 | * |
---|
13 | * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item= |
---|
14 | * testcase&id=EL-1266 |
---|
15 | * |
---|
16 | * @author L.F.Estivalet (Serpro) |
---|
17 | * |
---|
18 | * Created on Aug 3, 2011 at 10:15:36 AM |
---|
19 | * |
---|
20 | */ |
---|
21 | public class PesquisarCompromissoPeloTituloEApagarTestCase extends |
---|
22 | BaseCalendarTestCase { |
---|
23 | |
---|
24 | /** |
---|
25 | * Pesquisa um compromisso que exista na agenda. |
---|
26 | * |
---|
27 | * @param titulo |
---|
28 | * Titulo a ser pesquisado. |
---|
29 | */ |
---|
30 | @Parameters({ "titulo", "descricao", "local", "data", "horaInicio", |
---|
31 | "horaFim" }) |
---|
32 | @Test |
---|
33 | public void pesquisarCompromissoPeloTituloEApagar(String titulo, |
---|
34 | String descricao, String local, String data, String horaInicio, |
---|
35 | String horaFim) { |
---|
36 | cp.setSearchText(titulo); |
---|
37 | AppointmentSearchResultPage asrp = cp.searchAppointment(); |
---|
38 | Assert.assertEquals(asrp.getResultsNumber(), "1 ocorrência encontrada."); |
---|
39 | Assert.assertEquals(asrp.getAppointmentSchedule(1), data + " - " |
---|
40 | + horaInicio); |
---|
41 | String fullDescription = horaInicio + "-" + horaFim + " (A)\n" + titulo |
---|
42 | + "\n" + descricao + "\nLocal: " + local; |
---|
43 | Assert.assertEquals(asrp.getAppointmentDescription(1), fullDescription); |
---|
44 | |
---|
45 | AppointmentViewPage avp = asrp.editAppointment(1); |
---|
46 | avp.removeAppointment(); |
---|
47 | } |
---|
48 | |
---|
49 | } |
---|