wait for ajax response to prevent random failure in IssuesSystemTest#test_bulk_copy

git-svn-id: http://svn.redmine.org/redmine/trunk@19890 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2020-07-11 16:22:01 +00:00
parent 258ba9b88b
commit 0d15a93d22

View File

@@ -421,9 +421,10 @@ class IssuesSystemTest < ApplicationSystemTestCase
page.find('#issue_priority_id').select('Low')
assert_difference 'Issue.count', 2 do
submit_buttons[0].click
# wait for ajax response
assert page.has_css?('#flash_notice')
assert_current_path '/issues', :ignore_query => true
end
assert_current_path '/issues', :ignore_query => true
assert page.has_css?('#flash_notice')
copies = Issue.order('id DESC').limit(2)
assert_equal 4, copies[0].priority.id