source: devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/visualizar/ExibirCompromissoTestCase.java @ 5025

Revision 5025, 1.7 KB checked in by luiz-fernando, 13 years ago (diff)

Ticket #1771 - Adicionado testes automatizados para modulo da agenda

Line 
1package org.expressolivre.cte.calendar.visualizar;
2
3import java.text.SimpleDateFormat;
4import java.util.Calendar;
5
6import org.expressolivre.cte.common.BaseCalendarTestCase;
7import org.expressolivre.cte.pages.calendar.AppointmentViewPage;
8import org.expressolivre.cte.pages.calendar.CalendarTodayViewPage;
9import org.testng.Assert;
10import org.testng.annotations.Parameters;
11import org.testng.annotations.Test;
12
13/**
14 * Caso de Teste: EL-964:Exibir compromisso
15 *
16 * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item=
17 * testcase&id=EL-964
18 *
19 * @author L.F.Estivalet (Serpro)
20 *
21 *         Created on Jul 25, 2011 at 10:37:43 AM
22 *
23 */
24public class ExibirCompromissoTestCase extends BaseCalendarTestCase {
25
26        /**
27         * Exibe um compromisso da data corrente.
28         *
29         * @param tipo
30         * @param titulo
31         * @param inicio
32         * @param fim
33         * @param prioridade
34         */
35        @Parameters({ "tipo", "titulo", "inicio", "fim", "prioridade" })
36        @Test
37        public void exibirCompromissoDataCorrente(String tipo, String titulo,
38                        String inicio, String fim, String prioridade) {
39                CalendarTodayViewPage ctvp = super.openTodayView();
40                String id = ctvp.getAppointmentId(titulo);
41
42                Calendar cal = Calendar.getInstance();
43                SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
44                String today = sdf.format(cal.getTime());
45
46                AppointmentViewPage avp = cp.openAppointmentViewPage(id);
47                Assert.assertEquals(avp.getTitle(), titulo);
48                Assert.assertEquals(avp.getAppointmentInfo(AppointmentViewPage.START),
49                                today + " - " + inicio);
50                Assert.assertEquals(avp.getAppointmentInfo(AppointmentViewPage.END),
51                                today + " - " + fim);
52                Assert.assertEquals(
53                                avp.getAppointmentInfo(AppointmentViewPage.PRIORITY),
54                                prioridade);
55
56                avp.ready();
57        }
58}
Note: See TracBrowser for help on using the repository browser.