Skip to content

Commit

Permalink
Cenário Funcional - PBI 16586
Browse files Browse the repository at this point in the history
  • Loading branch information
AndressaKarla committed Oct 26, 2024
1 parent 4296683 commit b6506e8
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
7 changes: 7 additions & 0 deletions resources/keywords/login_keyword.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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
29 changes: 29 additions & 0 deletions resources/keywords/usuario_keyword.robot
Original file line number Diff line number Diff line change
@@ -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}
17 changes: 17 additions & 0 deletions tests/usuario_test.robot
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit b6506e8

Please sign in to comment.