Sign in by clicking login in the same form as username/password
This commit is contained in:
parent
523bb3169a
commit
ba7b12807c
1 changed files with 5 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue