diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-07-11 01:21:58 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-07-11 01:21:58 +0000 |
commit | 2f19b1eaa74c13ecfafb719cd40bc28370d63991 (patch) | |
tree | b7d9b5d7e180ded95db8683f291387c033f562a5 /test/system/issues_test.rb | |
parent | 1de92538c5a5fb64c5aed5e366f481277dc1c825 (diff) | |
download | redmine-2f19b1eaa74c13ecfafb719cd40bc28370d63991.tar.gz redmine-2f19b1eaa74c13ecfafb719cd40bc28370d63991.zip |
add bulk copy issues system test
git-svn-id: http://svn.redmine.org/redmine/trunk@19884 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/system/issues_test.rb')
-rw-r--r-- | test/system/issues_test.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/system/issues_test.rb b/test/system/issues_test.rb index a84e95963..590445eee 100644 --- a/test/system/issues_test.rb +++ b/test/system/issues_test.rb @@ -403,6 +403,33 @@ class IssuesSystemTest < ApplicationSystemTestCase assert_equal 4, issue4.status.id end + def test_bulk_copy + log_user('jsmith', 'jsmith') + visit '/issues' + 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 'Copy' + end + assert_current_path '/issues/bulk_edit', :ignore_query => true + submit_buttons = page.all('input[type=submit]') + assert_equal 'Copy', submit_buttons[0].value + + page.find('#issue_priority_id').select('Low') + assert_difference 'Issue.count', 2 do + submit_buttons[0].click + 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 + assert_equal 4, copies[1].priority.id + end + def test_issue_list_with_default_totalable_columns log_user('admin', 'admin') with_settings :issue_list_default_totals => ['estimated_hours'] do |