package org.expressolivre.cte.email.pastas; import org.expressolivre.cte.common.BaseEmailTestCase; import org.openqa.selenium.Alert; import org.testng.annotations.Test; /** * Suite:[FUN02.6] Gerenciar Pastas * * Caso de Teste: EL-611:Criar pasta * * Caso de Teste: EL-612:Criar pasta com caracter especial no nome * * Caso de Teste: EL-613:Criar sub pasta * * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item= * testcase&id=EL-611 * * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item= * testcase&id=EL-612 * * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item= * testcase&id=EL-613 * * @author L.F.Estivalet (Serpro) * * Created on Jan 19, 2011 at 11:10:33 AM * */ public class CriarPastaTestCase extends BaseEmailTestCase { /** * Cria uma pasta padrao para teste. * */ @Test public void criarPasta() { mp.createNewFolder(EMAIL_PASTA_TESTE); } @Test public void criarSubPasta() { mp.createSubFolder(EMAIL_PASTA_TESTE, "subfolder"); } /** * TODO Criar array com nomes invalidos e repetir o teste n vezes. */ @Test public void criarPastaComCaracterEspecial() { mp.createNewFolder("pasta1/pasta2"); Alert newFolder = driver.switchTo().alert(); assert "Erro ao criar a pasta. Certifique-se de que não tentou criá-la com um nome que contém a palavra \"local_\" ou que possui algum caractere especial." .equals(newFolder.getText()); newFolder.accept(); } }