From 8454753ddccc975416efea0b9c48fe0f1c5f5df8 Mon Sep 17 00:00:00 2001 From: JG Date: Mon, 23 May 2022 08:01:28 +0100 Subject: [PATCH] more steps to finilize the feature --- features/sign_in.feature | 1 - features/step_definitions/sign_in_steps.rb | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/features/sign_in.feature b/features/sign_in.feature index bb6d4d5f2..7555d7312 100644 --- a/features/sign_in.feature +++ b/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 diff --git a/features/step_definitions/sign_in_steps.rb b/features/step_definitions/sign_in_steps.rb index a56362353..78c741594 100644 --- a/features/step_definitions/sign_in_steps.rb +++ b/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