summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2025-02-13 07:51:41 +0000
committerGo MAEDA <maeda@farend.jp>2025-02-13 07:51:41 +0000
commitee4466213e854ec85325e1f94100ec9c7ad805c4 (patch)
tree851c652054a6737af4a2711cd4f759e8fc695792 /test
parent95e4145c1e12512490b2544432aa9a5bf0026250 (diff)
downloadredmine-ee4466213e854ec85325e1f94100ec9c7ad805c4.tar.gz
redmine-ee4466213e854ec85325e1f94100ec9c7ad805c4.zip
Merged r23505 from trunk to 6.0-stable (#42200).
git-svn-id: https://svn.redmine.org/redmine/branches/6.0-stable@23509 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/system/inline_autocomplete_test.rb35
1 files changed, 21 insertions, 14 deletions
diff --git a/test/system/inline_autocomplete_test.rb b/test/system/inline_autocomplete_test.rb
index 4b2271b79..286ea90a7 100644
--- a/test/system/inline_autocomplete_test.rb
+++ b/test/system/inline_autocomplete_test.rb
@@ -40,8 +40,9 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase
log_user('admin', 'admin')
visit 'projects/ecookbook/issues/new'
- fill_in 'Description', :with => '##Closed'
+ fill_in 'Description', :with => '##Cl'
+ assert_selector '.tribute-container li', count: 3
within('.tribute-container') 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'
@@ -57,12 +58,13 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase
log_user('jsmith', 'jsmith')
visit 'issues/new'
- fill_in 'Description', :with => '#Closed'
+ fill_in 'Description', :with => '#Cl'
+ assert_selector '.tribute-container li', count: 3
within('.tribute-container') 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'
- assert_not page.has_text? 'Bug #1: Cannot print recipes'
+ assert page.has_text? 'Bug #8: Closed issue'
end
end
@@ -152,10 +154,14 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase
assert page.has_text? 'Page_with_sections'
end
- fill_in 'Description', :with => '[[page'
+ fill_in 'Description', :with => '[[p'
+
+ assert_selector '.tribute-container li', count: 3
within('.tribute-container') do
assert page.has_text? 'Page_with_sections'
+ assert page.has_text? 'Page_with_an_inline_image'
assert page.has_text? 'Another_page'
+
assert_not page.has_text? 'Child_1_1'
first('li').click
@@ -169,8 +175,9 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase
log_user('jsmith', 'jsmith')
visit 'projects/1/issues/new'
- fill_in 'Description', :with => '#This'
+ fill_in 'Description', :with => '#Th'
+ assert_selector '.tribute-container li', count: 1
within('.tribute-container') do
assert page.has_text? "Bug ##{issue.id}: This issue has a <select> element"
end
@@ -181,19 +188,18 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase
visit '/issues/1/edit'
find('#issue_notes').click
- fill_in 'issue[notes]', :with => '@lopper'
+ fill_in 'issue[notes]', :with => '@'
- within('.tribute-container') do
- assert page.has_text? "Dave Lopper"
- end
+ assert_selector '.tribute-container li', minimum: 1
page.find('#issue_status_id').select('Feedback')
find('#issue_notes').click
- fill_in 'issue[notes]', :with => '@lopper'
+ fill_in 'issue[notes]', :with => '@j'
+ assert_selector '.tribute-container li', count: 1
within('.tribute-container') do
- assert page.has_text? "Dave Lopper"
+ assert page.has_text? 'John Smith'
end
end
@@ -202,14 +208,15 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase
visit '/issues/bulk_edit?ids[]=1&ids[]=2'
find('#notes').click
- fill_in 'notes', :with => '@lopper'
+ fill_in 'notes', :with => '@j'
+ assert_selector '.tribute-container li', count: 1
within('.tribute-container') do
- assert page.has_text? 'Dave Lopper'
+ assert page.has_text? 'John Smith'
first('li').click
end
- assert_equal '@dlopper ', find('#notes').value
+ assert_equal '@jsmith ', find('#notes').value
end
def test_inline_autocomplete_for_users_on_issues_without_edit_issue_permission