Merged r23505 from trunk to 5.1-stable (#42200).

git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@23511 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2025-02-13 07:53:56 +00:00
parent c1b8c57d6e
commit 97e585519f

View File

@@ -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