1 | package org.expressolivre.cte.calendar.compartilhar; |
---|
2 | |
---|
3 | import org.expressolivre.cte.common.BaseCalendarTestCase; |
---|
4 | import org.expressolivre.cte.common.Config; |
---|
5 | import org.expressolivre.cte.pages.calendar.AppointmentViewPage; |
---|
6 | import org.expressolivre.cte.pages.calendar.CalendarTodayViewPage; |
---|
7 | import org.testng.Assert; |
---|
8 | import org.testng.annotations.Parameters; |
---|
9 | import org.testng.annotations.Test; |
---|
10 | |
---|
11 | /** |
---|
12 | * Suite:[FUN03.7] Compartilhar agenda |
---|
13 | * |
---|
14 | * Caso de Teste: EL-984:Editar agenda compartilhada com acesso somente leitura |
---|
15 | * e exclusao |
---|
16 | * |
---|
17 | * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item= |
---|
18 | * testcase&id=EL-984 |
---|
19 | * |
---|
20 | * @author L.F.Estivalet (Serpro) |
---|
21 | * |
---|
22 | * Created on Aug 24, 2011 at 2:29:19 PM |
---|
23 | * |
---|
24 | */ |
---|
25 | public class EditarAgendaCompartilhadaSomenteLeituraEExclusaoTestCase extends |
---|
26 | BaseCalendarTestCase { |
---|
27 | |
---|
28 | @Parameters({ "owner", "titulo", "novaHoraInicio", "novoMinutoInicio", |
---|
29 | "novaHoraFim", "novoMinutoFim" }) |
---|
30 | @Test |
---|
31 | public void editarAgendaCompartilhadaSomenteLeituraEExclusao(String owner, |
---|
32 | String titulo, String novaHoraInicio, String novoMinutoInicio, |
---|
33 | String novaHoraFim, String novoMinutoFim) { |
---|
34 | CalendarTodayViewPage ctvp = super.openTodayView(); |
---|
35 | |
---|
36 | // Busca o nome do usuario do arquivo de confirguracao. |
---|
37 | String userName = Config.getInstance().getConfig(owner + ".name"); |
---|
38 | ctvp.setOwner(userName); |
---|
39 | |
---|
40 | String id = ctvp.getAppointmentId(titulo); |
---|
41 | AppointmentViewPage avp = cp.openAppointmentViewPage(id); |
---|
42 | Assert.assertEquals(avp.getTitle(), titulo); |
---|
43 | |
---|
44 | // Tenta remover o compromisso. |
---|
45 | avp.removeAppointment(); |
---|
46 | } |
---|
47 | } |
---|