1 | package org.expressolivre.cte.calendar.compartilhar; |
---|
2 | |
---|
3 | import org.expressolivre.cte.common.BaseCalendarTestCase; |
---|
4 | import org.expressolivre.cte.pages.calendar.AgendaAddACLUserPage; |
---|
5 | import org.expressolivre.cte.pages.calendar.AgendaPermissionPage; |
---|
6 | import org.testng.annotations.Optional; |
---|
7 | import org.testng.annotations.Parameters; |
---|
8 | import org.testng.annotations.Test; |
---|
9 | |
---|
10 | /** |
---|
11 | * Suite:[FUN03.7] Compartilhar agenda |
---|
12 | * |
---|
13 | * Caso de Teste: EL-977:Permitir acesso somente leitura a agenda |
---|
14 | * |
---|
15 | * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item= |
---|
16 | * testcase&id=EL-977 |
---|
17 | * |
---|
18 | * @author L.F.Estivalet (Serpro) |
---|
19 | * |
---|
20 | * Created on Aug 17, 2011 at 9:13:24 AM |
---|
21 | * |
---|
22 | */ |
---|
23 | public class PermitirAcessoSomenteLeituraAgendaTestCase extends |
---|
24 | BaseCalendarTestCase { |
---|
25 | |
---|
26 | @Parameters({ "nomeUsuario", "organizacao", "setor" }) |
---|
27 | @Test |
---|
28 | public void permitirAcessoSomenteLeituraAgenda(String nomeUsuario, |
---|
29 | String organizacao, @Optional("") String setor) { |
---|
30 | AgendaPermissionPage app = super.openAgendaPermissionPage(); |
---|
31 | |
---|
32 | if (!app.isUserInList(nomeUsuario)) { |
---|
33 | AgendaAddACLUserPage aaaup = app.addUserACL(); |
---|
34 | aaaup.setOrganization(organizacao); |
---|
35 | aaaup.setSector(setor); |
---|
36 | aaaup.selectUser(nomeUsuario); |
---|
37 | aaaup.addUser(); |
---|
38 | aaaup.close(); |
---|
39 | } |
---|
40 | app.clearPemissions(); |
---|
41 | app.setReadPermission(true); |
---|
42 | app.apply(); |
---|
43 | } |
---|
44 | |
---|
45 | } |
---|