Sign in by clicking login in the same form as username/password

This commit is contained in:
Anton Khorev 2024-01-19 21:14:35 +03:00
parent 523bb3169a
commit ba7b12807c

View file

@ -243,9 +243,11 @@ module ActiveSupport
def sign_in_as(user)
visit login_path
fill_in "username", :with => user.email
fill_in "password", :with => "test"
click_on "Login", :match => :first
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)