From b6506e8673285abed96b8be398c98a56cd44cee6 Mon Sep 17 00:00:00 2001 From: AndressaKarla Date: Sat, 26 Oct 2024 20:45:52 -0300 Subject: [PATCH] =?UTF-8?q?Cen=C3=A1rio=20Funcional=20-=20PBI=2016586?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/keywords/login_keyword.robot | 7 ++++++ resources/keywords/usuario_keyword.robot | 29 ++++++++++++++++++++++++ tests/usuario_test.robot | 17 ++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 resources/keywords/usuario_keyword.robot create mode 100644 tests/usuario_test.robot diff --git a/resources/keywords/login_keyword.robot b/resources/keywords/login_keyword.robot index dfe9a8b..86a37c5 100644 --- a/resources/keywords/login_keyword.robot +++ b/resources/keywords/login_keyword.robot @@ -42,3 +42,10 @@ Clicar no botão "ENTRAR" Apresentar a tela Home Sleep ${TIMEOUT} Location Should Be ${URL}/home + +Realizar login (ADMIN) + Acessar a tela de Login do ERP do Qa.Coders Academy + Gerar e obter dados usuario admin dinâmico + Informar os campos de email e senha de um usuário ADMIN email_admin=${EMAIL_ADMIN} senha_admin=${SENHA_CONFIRME_A_SENHA} + Clicar no botão "ENTRAR" + Apresentar a tela Home diff --git a/resources/keywords/usuario_keyword.robot b/resources/keywords/usuario_keyword.robot new file mode 100644 index 0000000..b68d982 --- /dev/null +++ b/resources/keywords/usuario_keyword.robot @@ -0,0 +1,29 @@ +*** Settings *** +Documentation Arquivo com variáveis locais e palavras-chave da funcionalidade de usuário + +Resource ../../resources/base.resource + +*** Variables *** +${menu_cadastros} id=Cadastros +${menu_usuarios} id=Usuários +${botao_editar} (//button[@id='edit'])[1] +${modal_editar_cadastro} css=div.css-g7173l > div > form > h5 + + +*** Keywords *** +Clicar no menu "Cadastros > Usuários" + Wait Until Element Is Visible ${menu_cadastros} + Click Element ${menu_cadastros} + + Wait Until Element Is Visible ${menu_usuarios} + Click Element ${menu_usuarios} + + Sleep ${TIMEOUT} + Location Should Be ${URL}/user + +Clicar no botão "Editar" + Wait Until Element Is Visible ${botao_editar} + Click Element ${botao_editar} + +Apresentar o modal "Editar Cadastro" + Wait Until Element Is Visible ${modal_editar_cadastro} \ No newline at end of file diff --git a/tests/usuario_test.robot b/tests/usuario_test.robot new file mode 100644 index 0000000..3a6741c --- /dev/null +++ b/tests/usuario_test.robot @@ -0,0 +1,17 @@ +*** Settings *** +Documentation Arquivo com os casos de testes da funcionalidade de usuário + +Resource ../resources/base.resource +Resource ../resources/keywords/login_keyword.robot +Resource ../resources/keywords/usuario_keyword.robot + +Test Teardown Encerrar sessão + + +*** Test Cases *** +Editar Cadastro Usuário (ADMIN) - Validar apresentar o modal "Editar Cadastro" + [Tags] editar_admin regressao + Realizar login (ADMIN) + Clicar no menu "Cadastros > Usuários" + Clicar no botão "Editar" + Apresentar o modal "Editar Cadastro" \ No newline at end of file