[4917] | 1 | package org.expressolivre.cte.calendar.preferencias; |
---|
| 2 | |
---|
| 3 | import org.expressolivre.cte.common.BaseCalendarTestCase; |
---|
| 4 | import org.expressolivre.cte.pages.calendar.AppointmentCategoryPage; |
---|
| 5 | import org.expressolivre.cte.pages.calendar.EditAppointmentCategoryPage; |
---|
| 6 | import org.testng.Assert; |
---|
| 7 | import org.testng.annotations.Parameters; |
---|
| 8 | import org.testng.annotations.Test; |
---|
| 9 | |
---|
| 10 | /** |
---|
| 11 | * Suite:[FUN03.8] Alterar preferencias da agenda |
---|
| 12 | * |
---|
| 13 | * Caso de Teste: EL-993:Editar categoria |
---|
| 14 | * |
---|
| 15 | * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item= |
---|
| 16 | * testcase&id=EL-993 |
---|
| 17 | * |
---|
| 18 | * @author L.F.Estivalet (Serpro) |
---|
| 19 | * |
---|
| 20 | * Created on Aug 10, 2011 at 2:32:54 PM |
---|
| 21 | * |
---|
| 22 | */ |
---|
| 23 | public class EditarCategoriaTestCase extends BaseCalendarTestCase { |
---|
| 24 | |
---|
| 25 | @Parameters({ "nome", "descricao", "particular", "novoNome", |
---|
| 26 | "novaDescricao", "novoParticular" }) |
---|
| 27 | @Test |
---|
| 28 | public void editarCategoria(String nome, String descricao, |
---|
| 29 | Boolean particular, String novoNome, String novaDescricao, |
---|
| 30 | Boolean novoParticular) { |
---|
| 31 | AppointmentCategoryPage acp = super.openAppointmentCategoryPage(); |
---|
| 32 | Integer catId = acp.findCategory(nome); |
---|
| 33 | |
---|
| 34 | Assert.assertNotNull(catId); |
---|
| 35 | |
---|
| 36 | EditAppointmentCategoryPage eacp = acp.editCategory(nome); |
---|
| 37 | Assert.assertEquals(nome, eacp.getCategoryName()); |
---|
| 38 | Assert.assertEquals(descricao, eacp.getCategoryDescription()); |
---|
| 39 | Assert.assertEquals(particular, eacp.getPrivateAccess()); |
---|
| 40 | |
---|
| 41 | eacp.setCategoryName(novoNome); |
---|
| 42 | eacp.setCategoryDescription(novaDescricao); |
---|
| 43 | eacp.setPrivateAccess(novoParticular); |
---|
| 44 | |
---|
| 45 | eacp.saveCategory(); |
---|
| 46 | } |
---|
| 47 | } |
---|