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.AppointmentEditPage; |
---|
6 | import org.expressolivre.cte.pages.calendar.AppointmentViewPage; |
---|
7 | import org.expressolivre.cte.pages.calendar.CalendarTodayViewPage; |
---|
8 | import org.testng.Assert; |
---|
9 | import org.testng.annotations.Parameters; |
---|
10 | import org.testng.annotations.Test; |
---|
11 | |
---|
12 | /** |
---|
13 | * Suite:[FUN03.7] Compartilhar agenda |
---|
14 | * |
---|
15 | * Caso de Teste: EL-983:Editar agenda compartilhada com acesso somente leitura |
---|
16 | * e edicao |
---|
17 | * |
---|
18 | * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item= |
---|
19 | * testcase&id=EL-983 |
---|
20 | * |
---|
21 | * @author L.F.Estivalet (Serpro) |
---|
22 | * |
---|
23 | * Created on Aug 23, 2011 at 2:20:19 PM |
---|
24 | * |
---|
25 | */ |
---|
26 | public class EditarAgendaCompartilhadaSomenteLeituraEEdicaoTestCase extends |
---|
27 | BaseCalendarTestCase { |
---|
28 | |
---|
29 | @Parameters({ "owner", "titulo", "novaHoraInicio", "novoMinutoInicio", |
---|
30 | "novaHoraFim", "novoMinutoFim" }) |
---|
31 | @Test |
---|
32 | public void editarAgendaCompartilhadaSomenteLeituraEEdicao(String owner, |
---|
33 | String titulo, String novaHoraInicio, String novoMinutoInicio, |
---|
34 | String novaHoraFim, String novoMinutoFim) { |
---|
35 | CalendarTodayViewPage ctvp = super.openTodayView(); |
---|
36 | |
---|
37 | // Busca o nome do usuario do arquivo de confirguracao. |
---|
38 | String userName = Config.getInstance().getConfig(owner + ".name"); |
---|
39 | ctvp.setOwner(userName); |
---|
40 | |
---|
41 | String id = ctvp.getAppointmentId(titulo); |
---|
42 | AppointmentViewPage avp = cp.openAppointmentViewPage(id); |
---|
43 | Assert.assertEquals(avp.getTitle(), titulo); |
---|
44 | |
---|
45 | AppointmentEditPage aep = avp.editAppointment(); |
---|
46 | aep.setStartHour(novaHoraInicio); |
---|
47 | aep.setStartMinute(novoMinutoInicio); |
---|
48 | aep.setEndHour(novaHoraFim); |
---|
49 | aep.setEndMinute(novoMinutoFim); |
---|
50 | aep.saveAppointment(); |
---|
51 | |
---|
52 | } |
---|
53 | } |
---|