예제 #1
0
        public void Test_tentaResolverTarefaSucesso()
        {
            DataBaseSteps  db      = new DataBaseSteps();
            PreTestMethods preTest = new PreTestMethods();

            string projeto   = "Teste";
            string categoria = "[Todos os Projetos] General";
            string resumo    = "Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);
            string descricao = "Descricao Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);
            string status    = "resolvido";
            string resolucao = "corrigido";

            loginStep.fazLogin(usuario, senha);
            string idTarefa = preTest.PreTestCriarTarefa(projeto, categoria, resumo, descricao);
            int    bugIdInt = Convert.ToInt32(idTarefa);

            homePage.preenchePesquisaTarefa(idTarefa);
            verTarefasPage.clicaBtnAtualizarTarefa();
            verTarefasPage.selecionaStatusTarefa(status);
            verTarefasPage.selecionaComboResolucao(resolucao);
            verTarefasPage.clicaBntConfirmaAtualizacaoTarefa();

            List <string> tarefaBD = db.retornaTarefaCriadaPorId(Convert.ToString(bugIdInt));

            Assert.IsTrue(tarefaBD[9] == "20");
        }
예제 #2
0
        public void Test_atribuiTarefaUsuario()
        {
            DataBaseSteps  db      = new DataBaseSteps();
            PreTestMethods preTest = new PreTestMethods();

            string projeto   = "Teste";
            string categoria = "[Todos os Projetos] General";
            string resumo    = "Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);
            string descricao = "Descricao Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);


            loginStep.fazLogin(usuario, senha);
            string idTarefa = preTest.PreTestCriarTarefa(projeto, categoria, resumo, descricao);
            int    bugIdInt = Convert.ToInt32(idTarefa);

            homePage.preenchePesquisaTarefa(idTarefa);
            verTarefasPage.clicaBtnAtualizarTarefa();
            verTarefasPage.selecinaComboAtribuicao(usuario);
            verTarefasPage.clicaBntConfirmaAtualizacaoTarefa();

            string        idUsuario = db.retornaidUsuario(usuario);
            List <string> tarefaBD  = db.retornaTarefaCriadaPorId(Convert.ToString(bugIdInt));

            Assert.IsTrue(tarefaBD[3] == idUsuario);
        }
예제 #3
0
        public void Test_adicionaRelacaoPossuiDuplicidadeSucesso()
        {
            DataBaseSteps  db      = new DataBaseSteps();
            PreTestMethods preTest = new PreTestMethods();

            string projeto     = "Teste";
            string categoria   = "[Todos os Projetos] General";
            string resumo      = "Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);
            string descricao   = "Descricao Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);
            string tipoRelacao = "possui duplicado";

            loginStep.fazLogin(usuario, senha);
            string idTarefa = preTest.PreTestCriarTarefa(projeto, categoria, resumo, descricao);
            int    relacao  = Convert.ToInt32(idTarefa);

            homePage.preenchePesquisaTarefa(idTarefa);
            verTarefasPage.selecionaComboTipoRelacao(tipoRelacao);
            verTarefasPage.preencheRelacaoTarefa(Convert.ToString(relacao - 1));
            verTarefasPage.clicaBtnAddRelacao();

            List <string> relacaoTarefaBD = db.retornaRelacaoTarefa(relacao - 1);

            Assert.IsTrue(relacaoTarefaBD[1] == Convert.ToString(relacao - 1));
            Assert.IsTrue(relacaoTarefaBD[3] == "0");
        }
예제 #4
0
        public void Test_removeMarcadorTarefa()
        {
            DataBaseSteps  db      = new DataBaseSteps();
            PreTestMethods preTest = new PreTestMethods();

            string projeto   = "Teste";
            string categoria = "[Todos os Projetos] General";
            string resumo    = "Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);
            string descricao = "Descricao Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);
            string tag       = "tag";

            loginStep.fazLogin(usuario, senha);
            string idTarefa = preTest.PreTestCriarTarefa(projeto, categoria, resumo, descricao);

            homePage.preenchePesquisaTarefa(idTarefa);
            verTarefasPage.preencheTag(tag);
            verTarefasPage.clicaAplicarTag();

            List <string> tagTarefaBD = db.retornaTagTarefa(Convert.ToInt32(idTarefa));

            verTarefasPage.clicaBtnRemoverTag();

            List <string> tagTarefaAposDeletarBD = db.retornaTagTarefa(Convert.ToInt32(idTarefa));

            Assert.IsNotNull(tagTarefaBD);
            Assert.IsNull(tagTarefaAposDeletarBD);
        }
예제 #5
0
        public void Test_verificaTarefaCriadaEmMinhaVisao()
        {
            DataBaseSteps  db      = new DataBaseSteps();
            PreTestMethods preTest = new PreTestMethods();

            string projeto   = "Teste";
            string categoria = "[Todos os Projetos] General";
            string resumo    = "Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);
            string descricao = "Descricao Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);

            loginStep.fazLogin(usuario, senha);
            string idTarefa = preTest.PreTestCriarTarefa(projeto, categoria, resumo, descricao);

            minhaVisaoPage.abrirMenuMinhaVisao();
            bool tarefaExiste = minhaVisaoPage.verificaExistenciaTarefaMinhaVisao(idTarefa);

            Assert.IsTrue(tarefaExiste);
        }
예제 #6
0
        public void Test_verificaFiltroTarefa()
        {
            DataBaseSteps  db      = new DataBaseSteps();
            PreTestMethods preTest = new PreTestMethods();

            string projeto   = "Teste";
            string categoria = "[Todos os Projetos] General";
            string resumo    = "Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);
            string descricao = "Descricao Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);

            loginStep.fazLogin(usuario, senha);
            string idTarefa = preTest.PreTestCriarTarefa(projeto, categoria, resumo, descricao);

            verTarefasPage.abrirMenuVerTarefas();
            verTarefasPage.preencheFiltroTarefa(idTarefa);
            verTarefasPage.clicarFiltrarTarefa();
            string idRetornadoGrid = verTarefasPage.retornaIdGridTarefa();

            Assert.IsTrue(idTarefa == idRetornadoGrid);
        }
예제 #7
0
        public void Test_adicionaRelacaoInvalida()
        {
            DataBaseSteps  db      = new DataBaseSteps();
            PreTestMethods preTest = new PreTestMethods();

            string projeto   = "Teste";
            string categoria = "[Todos os Projetos] General";
            string resumo    = "Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);
            string descricao = "Descricao Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);
            string relacao   = "relacaoIvalida";

            loginStep.fazLogin(usuario, senha);
            string idTarefa = preTest.PreTestCriarTarefa(projeto, categoria, resumo, descricao);

            homePage.preenchePesquisaTarefa(idTarefa);
            verTarefasPage.preencheRelacaoTarefa(relacao);
            verTarefasPage.clicaBtnAddRelacao();
            bool msgErro = verTarefasPage.retornaMsgErro();

            Assert.IsTrue(msgErro);
        }
예제 #8
0
        public void Test_tentaResolverTarefaComStatusNovo()
        {
            DataBaseSteps  db      = new DataBaseSteps();
            PreTestMethods preTest = new PreTestMethods();

            string projeto   = "Teste";
            string categoria = "[Todos os Projetos] General";
            string resumo    = "Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);
            string descricao = "Descricao Tarefa " + Utilitarios.GetRandomIDNumber().Substring(1, 4);
            string resolucao = "corrigido";

            loginStep.fazLogin(usuario, senha);
            string idTarefa = preTest.PreTestCriarTarefa(projeto, categoria, resumo, descricao);
            int    bugIdInt = Convert.ToInt32(idTarefa);

            homePage.preenchePesquisaTarefa(idTarefa);
            verTarefasPage.clicaBtnAtualizarTarefa();
            verTarefasPage.selecionaComboResolucao(resolucao);
            verTarefasPage.clicaBntConfirmaAtualizacaoTarefa();
            bool msgErro = verTarefasPage.retornaMsgErro();

            Assert.IsTrue(msgErro);
        }