Browse Source

more steps to finilize the feature

cucumber-rails
JG 3 years ago
parent
commit
8454753ddc
  1. 1
      features/sign_in.feature
  2. 5
      features/step_definitions/sign_in_steps.rb

1
features/sign_in.feature

@ -1,6 +1,5 @@
Feature: Sign in
@wip
Scenario: Signing in
Given There is a user in the database
When I visit the sign in page

5
features/step_definitions/sign_in_steps.rb

@ -3,13 +3,18 @@ Given('There is a user in the database') do
end
When('I visit the sign in page') do
visit("/account/sign-in")
end
When('I fill in the sign in form') do
fill_in("user[email]", with: @user.email)
fill_in("user[password]", with: @user.password)
end
When('I click the sign in button') do
click_button("Sign in")
end
Then('I should see the logs page') do
expect(page).to have_current_path("/logs")
end

Loading…
Cancel
Save