Last active
May 20, 2020 19:31
-
-
Save doamaral/ffd7a9cf31e51c56ff67021b30879389 to your computer and use it in GitHub Desktop.
Problema ao executar meus testes com o Cucumber. Exemplo para post no Medium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
gem 'rspec', '~> 3.9' | |
gem 'capybara', '~> 3.31' | |
gem 'selenium-webdriver', '~> 3.142', '>= 3.142.7' | |
gem 'cucumber', '~> 3.1', '>= 3.1.2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Login | |
Como usuário | |
desejo acessar o sistema a partir das minhas credenciais | |
a fim de controlar minhas contas | |
Scenario: login realizado com sucesso | |
Given entro com as informacoes de login e senha validos | |
When solicito acesso ao sistema | |
Then visualizo a pagina inicial | |
And mensagem de boas vindas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given("entro com as informacoes de login e senha validos") do | |
visit "https://xxxxxx.xxxxxx.xxx/login" | |
fill_in 'email', with: 'xxxx@xxxxx.com.br' | |
fill_in 'senha', with: 'xxxxxx' | |
click_button 'Entrar' | |
sleep 5 | |
end | |
When("solicito acesso ao sistema") do | |
pending # Write code here that turns the phrase above into concrete actions | |
end | |
Then("visualizo a pagina inicial") do | |
pending # Write code here that turns the phrase above into concrete actions | |
end | |
Then("mensagem de boas vindas") do | |
pending # Write code here that turns the phrase above into concrete actions | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment