summaryrefslogtreecommitdiffstats
path: root/test/system
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-02-25 04:07:37 +0000
committerGo MAEDA <maeda@farend.jp>2021-02-25 04:07:37 +0000
commit2f3222e0bdaacae4a2d17224d61a18cb060e9031 (patch)
tree7a2cd47e7fad3318cb71674db1e9d81dd975e7b7 /test/system
parent3fd832f14ceb728896bcc31293197a790298be01 (diff)
downloadredmine-2f3222e0bdaacae4a2d17224d61a18cb060e9031.tar.gz
redmine-2f3222e0bdaacae4a2d17224d61a18cb060e9031.zip
Auto complete wiki page links (#33820).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@20755 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/system')
-rw-r--r--test/system/inline_autocomplete_test.rb24
1 files changed, 23 insertions, 1 deletions
diff --git a/test/system/inline_autocomplete_test.rb b/test/system/inline_autocomplete_test.rb
index 7d557f4c6..f3c7daef6 100644
--- a/test/system/inline_autocomplete_test.rb
+++ b/test/system/inline_autocomplete_test.rb
@@ -24,7 +24,7 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase
:trackers, :projects_trackers, :enabled_modules, :issue_statuses, :issues,
:enumerations, :custom_fields, :custom_values, :custom_fields_trackers,
:watchers, :journals, :journal_details, :versions,
- :workflows
+ :workflows, :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions
def test_inline_autocomplete_for_issues
log_user('jsmith', 'jsmith')
@@ -129,4 +129,26 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase
page.has_css?('.tribute-container li', minimum: 1)
end
+
+ def test_inline_autocompletion_of_wiki_page_links
+ log_user('jsmith', 'jsmith')
+ visit 'issues/new'
+
+ fill_in 'Description', :with => '[['
+
+ within('.tribute-container') do
+ assert page.has_text? 'Child_1_1'
+ assert page.has_text? 'Page_with_sections'
+ end
+
+ fill_in 'Description', :with => '[[page'
+ within('.tribute-container') do
+ assert page.has_text? 'Page_with_sections'
+ assert page.has_text? 'Another_page'
+ assert_not page.has_text? 'Child_1_1'
+
+ first('li').click
+ end
+ assert_equal '[[Page_with_sections]] ', find('#issue_description').value
+ end
end