summaryrefslogtreecommitdiffstats
path: root/test/system/issues_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-07-12 11:36:06 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-07-12 11:36:06 +0000
commit575403413a7548c39b64e0515f1885cf9f38c41f (patch)
treec3b0aadcaaed029a8dfd251211680c06fb339d83 /test/system/issues_test.rb
parent373b5f4d047a12745de9c76e9592f592e22b62fc (diff)
downloadredmine-575403413a7548c39b64e0515f1885cf9f38c41f.tar.gz
redmine-575403413a7548c39b64e0515f1885cf9f38c41f.zip
add "Copy and follow" flow to bulk_copy system test
git-svn-id: http://svn.redmine.org/redmine/trunk@19898 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/system/issues_test.rb')
-rw-r--r--test/system/issues_test.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/system/issues_test.rb b/test/system/issues_test.rb
index e6f70ef15..733f644c3 100644
--- a/test/system/issues_test.rb
+++ b/test/system/issues_test.rb
@@ -431,6 +431,36 @@ class IssuesSystemTest < ApplicationSystemTestCase
copies = Issue.order('id DESC').limit(2)
assert_equal 4, copies[0].priority.id
assert_equal 4, copies[1].priority.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 'Copy'
+ end
+ assert_current_path '/issues/bulk_edit', :ignore_query => true
+
+ page.find('#issue_project_id').select('OnlineStore')
+ # wait for ajax response
+ assert page.has_select?('issue_project_id', {:selected => 'OnlineStore'})
+
+ submit_buttons = page.all('input[type=submit]')
+ assert_equal 2, submit_buttons.size
+ assert_equal 'Copy', submit_buttons[0].value
+ assert_equal 'Copy and follow', submit_buttons[1].value
+ page.find('#issue_priority_id').select('High')
+ assert_difference 'Issue.count', 2 do
+ submit_buttons[1].click
+ # wait for ajax response
+ assert page.has_css?('#flash_notice')
+ assert_current_path '/projects/onlinestore/issues', :ignore_query => true
+ end
+
+ copies = Issue.order('id DESC').limit(2)
+ assert_equal 6, copies[0].priority.id
+ assert_equal 6, copies[1].priority.id
end
def test_issue_list_with_default_totalable_columns