diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2025-05-14 17:36:11 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2025-05-14 17:36:11 +0000 |
commit | e78e1e29fdf89061d67aa246ec61a4a47aee9343 (patch) | |
tree | aa0c9d5bd3388212053d31ebf569549671478395 | |
parent | fdf78e9e14d7cd6fd640064fb93cddc17424e39f (diff) | |
download | redmine-e78e1e29fdf89061d67aa246ec61a4a47aee9343.tar.gz redmine-e78e1e29fdf89061d67aa246ec61a4a47aee9343.zip |
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
-rw-r--r-- | test/application_system_test_case.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb index 0bb0de944..040667c39 100644 --- a/test/application_system_test_case.rb +++ b/test/application_system_test_case.rb @@ -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 |