mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-01 03:57:15 +00:00
Use Capybara's @assert_current_path@ in "log_user" steps to wait for page in ApplicationSystemTestCase (#42422).
Patch by Takuya Kodama (user:otegami). git-svn-id: https://svn.redmine.org/redmine/trunk@23761 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
fdf78e9e14
commit
e78e1e29fd
@ -72,14 +72,14 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
|
||||
# Should not depend on locale since Redmine displays login page
|
||||
# using default browser locale which depend on system locale for "real" browsers drivers
|
||||
def log_user(login, password)
|
||||
visit '/my/page'
|
||||
assert_current_path '/login', :ignore_query => true
|
||||
assert_equal '/login', current_path
|
||||
within('#login-form form') do
|
||||
fill_in 'username', :with => login
|
||||
fill_in 'password', :with => password
|
||||
find('input[name=login]').click
|
||||
end
|
||||
assert_equal '/my/page', current_path
|
||||
assert_current_path '/my/page', :ignore_query => true
|
||||
end
|
||||
|
||||
def wait_for_ajax
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user