summaryrefslogtreecommitdiffstats
path: root/test/system
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-12-25 02:31:55 +0000
committerGo MAEDA <maeda@farend.jp>2020-12-25 02:31:55 +0000
commitcde271e79e4c7ae1087797ffe1250f2d8aac6902 (patch)
treee371a3a0f1cd4271920fe39485e6d1507c598ad3 /test/system
parent30e80d82ce189b4232e143b054f78870afd076da (diff)
downloadredmine-cde271e79e4c7ae1087797ffe1250f2d8aac6902.tar.gz
redmine-cde271e79e4c7ae1087797ffe1250f2d8aac6902.zip
Allow issue relation autocomplete to select multiple values (#33418).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@20690 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/system')
-rw-r--r--test/system/issues_test.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/system/issues_test.rb b/test/system/issues_test.rb
index 94d39c158..f1f355d0d 100644
--- a/test/system/issues_test.rb
+++ b/test/system/issues_test.rb
@@ -540,4 +540,35 @@ class IssuesSystemTest < ApplicationSystemTestCase
assert !page.has_css?('#trackers_description')
assert_equal "2", page.find('select#issue_tracker_id').value
end
+
+ def test_edit_should_allow_adding_multiple_relations_from_autocomplete
+ log_user('admin', 'admin')
+
+ visit '/issues/1'
+ page.find('#relations .contextual a').click
+ page.fill_in 'relation[issue_to_id]', :with => 'issue'
+
+ within('ul.ui-autocomplete') do
+ assert page.has_text? 'Bug #12: Closed issue on a locked version'
+ assert page.has_text? 'Bug #11: Closed issue on a closed version'
+
+ first('li.ui-menu-item').click
+ end
+ assert_equal '12, ', find('#relation_issue_to_id').value
+
+ find('#relation_issue_to_id').click.send_keys('issue due')
+ within('ul.ui-autocomplete') do
+ assert page.has_text? 'Bug #7: Issue due today'
+
+ find('li.ui-menu-item').click
+ end
+ assert_equal '12, 7, ', find('#relation_issue_to_id').value
+
+ find('#relations').click_button('Add')
+
+ within('#relations table.issues') do
+ assert page.has_text? 'Related to Bug #12'
+ assert page.has_text? 'Related to Bug #7'
+ end
+ end
end