]> source.dussan.org Git - redmine.git/commitdiff
add bulk update issues test to IssuesSystemTest
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 15 Jun 2020 18:46:18 +0000 (18:46 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 15 Jun 2020 18:46:18 +0000 (18:46 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19822 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/system/issues_test.rb

index 613aedaee7a48ba9f1a1e3fc20f8b8acad27647a..e213b690eb500437da0936c720769f7e75f68229 100644 (file)
@@ -306,6 +306,27 @@ class IssuesSystemTest < ApplicationSystemTestCase
     assert Issue.find(4).watched_by?(User.find_by_login('jsmith'))
   end
 
+  def test_bulk_update_issues
+    log_user('jsmith', 'jsmith')
+    visit '/issues'
+    issue1 = Issue.find(1)
+    issue4 = Issue.find(4)
+    assert_equal 1, issue1.reload.status.id
+    assert_equal 1, issue4.reload.status.id
+    assert page.has_css?('tr#issue-1')
+    assert page.has_css?('tr#issue-4')
+    find('tr#issue-1 input[type=checkbox]').click
+    find('tr#issue-4 input[type=checkbox]').click
+    find('tr#issue-1 td.updated_on').right_click
+    within('#context-menu') do
+      click_link 'Status'
+      click_link 'Closed'
+    end
+    assert page.has_css?('#flash_notice')
+    assert_equal 5, issue1.reload.status.id
+    assert_equal 5, issue4.reload.status.id
+  end
+
   def test_issue_list_with_default_totalable_columns
     log_user('admin', 'admin')
     with_settings :issue_list_default_totals => ['estimated_hours'] do