From: Tom Hughes Date: Sun, 11 Feb 2024 18:47:52 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/4513' X-Git-Tag: live~1270 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/90fd22e2a35cea1e4bc55185f93267c49fb37b6e?hp=8ecb2c79f7146ecbb69d08cd38954836dc6d1b4c Merge remote-tracking branch 'upstream/pull/4513' --- diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb index b170e74b1..7931546d4 100644 --- a/test/application_system_test_case.rb +++ b/test/application_system_test_case.rb @@ -24,6 +24,15 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase private + def sign_in_as(user) + visit login_path + within "form", :text => "Email Address or Username" do + fill_in "username", :with => user.email + fill_in "password", :with => "test" + click_on "Login" + end + end + def within_sidebar(&block) within "#sidebar_content", &block end diff --git a/test/test_helper.rb b/test/test_helper.rb index e1bc91917..60edf6e0c 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -242,15 +242,6 @@ module ActiveSupport end end - def sign_in_as(user) - visit login_path - within "form", :text => "Email Address or Username" do - fill_in "username", :with => user.email - fill_in "password", :with => "test" - click_on "Login" - end - end - def session_for(user) get login_path post login_path, :params => { :username => user.display_name, :password => "test" }