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.Parameters; |
---|
7 | import org.testng.annotations.Test; |
---|
8 | |
---|
9 | /** |
---|
10 | * Suite:[FUN03.7] Compartilhar agenda |
---|
11 | * |
---|
12 | * Caso de Teste: EL-979:Permitir acesso somente leitura e exclusao a agenda |
---|
13 | * |
---|
14 | * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item= |
---|
15 | * testcase&id=EL-979 |
---|
16 | * |
---|
17 | * @author L.F.Estivalet (Serpro) |
---|
18 | * |
---|
19 | * Created on Aug 23, 2011 at 3:25:24 PM |
---|
20 | * |
---|
21 | */ |
---|
22 | public class PermitirAcessoSomenteLeituraEExclusaoAgendaTestCase extends |
---|
23 | BaseCalendarTestCase { |
---|
24 | |
---|
25 | @Parameters({ "nomeUsuario", "organizacao", "setor" }) |
---|
26 | @Test |
---|
27 | public void permitirAcessoSomenteLeituraEExclusaoAgenda(String nomeUsuario, |
---|
28 | String organizacao, String setor) { |
---|
29 | AgendaPermissionPage app = super.openAgendaPermissionPage(); |
---|
30 | |
---|
31 | // Se usuario nao estiver na lista de permissoes abrir popup para |
---|
32 | // procurar e adicionar. |
---|
33 | if (!app.isUserInList(nomeUsuario)) { |
---|
34 | // TODO verificar essa implementacao pois, algumas vezes nao |
---|
35 | // funciona... |
---|
36 | AgendaAddACLUserPage aaaup = app.addUserACL(); |
---|
37 | aaaup.setOrganization(organizacao); |
---|
38 | aaaup.setSector(setor); |
---|
39 | aaaup.selectUser(nomeUsuario); |
---|
40 | aaaup.addUser(); |
---|
41 | aaaup.close(); |
---|
42 | } |
---|
43 | |
---|
44 | app.clearPemissions(); |
---|
45 | app.setReadPermission(true); |
---|
46 | app.setRemovePermission(true); |
---|
47 | app.apply(); |
---|
48 | } |
---|
49 | |
---|
50 | } |
---|