From 92cd207c5083e60074e0ce123bb5b848a58e7417 Mon Sep 17 00:00:00 2001 From: Chad Pytel Date: Fri, 14 Apr 2017 19:21:02 -0400 Subject: Introduce capybara and first feature spec (#1801) This commit introduces Capybara and the first feature spec. I focused on coverage for log in for the first feature spec because that would have prevented 624a9a7136159d460228a0c2f5df18a9ead3b7f2 causing #1236. --- spec/features/log_in_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 spec/features/log_in_spec.rb (limited to 'spec/features') diff --git a/spec/features/log_in_spec.rb b/spec/features/log_in_spec.rb new file mode 100644 index 000000000..4a634f6b8 --- /dev/null +++ b/spec/features/log_in_spec.rb @@ -0,0 +1,16 @@ +require "rails_helper" + +feature "Log in" do + scenario "A valid email and password user is able to log in" do + email = "test@example.com" + password = "password" + Fabricate(:user, email: email, password: password) + + visit new_user_session_path + fill_in "user_email", with: email + fill_in "user_password", with: password + click_on "Log in" + + expect(page).to have_css "div.app-holder[data-react-class=Mastodon]" + end +end -- cgit