Skip to content

Commit 18f0d65

Browse files
committed
Running first Scenario
1 parent 6b861bd commit 18f0d65

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
# ruby-cucumber-rspec-selenium-capybara
22
Cucumber example
3+
4+
- bundle init
5+
- Generate Gemfile, add `gem 'cucumber'`
6+
- bundle install
7+
- cucumber --init
8+
- inside `features` folder, create a `.feature` file
9+
- If you run `cucumber`command at this momment you're going to get the steps definition scaffold

features/login.feature

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Feature: Login
2+
Feature Description
3+
4+
Scenario: login
5+
Given entro com as informacoes
6+
When submeto o formulario
7+
Then mensagem de sucesso
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Given("entro com as informacoes") do
2+
visit "https://seubarriga.wcaquino.me/login"
3+
sleep(5)
4+
end
5+
6+
When("submeto o formulario") do
7+
puts "passo 2" # Write code here that turns the phrase above into concrete actions
8+
end
9+
10+
Then("mensagem de sucesso") do
11+
puts "passo 3" # Write code here that turns the phrase above into concrete actions
12+
end
13+

features/support/env.rb

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
require 'capybara'
2+
require 'capybara/cucumber'
3+
require 'selenium-webdriver'
4+
5+
Capybara.configure do |config|
6+
config.default_driver = :selenium
7+
end

0 commit comments

Comments
 (0)