File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -1831,9 +1831,7 @@ def heads_for_auto_complete(project)
1831
1831
1832
1832
def update_data_sources_for_auto_complete ( data_sources )
1833
1833
javascript_tag (
1834
- "const currentDataSources = rm.AutoComplete.dataSources;" \
1835
- "const newDataSources = JSON.parse('#{ data_sources . to_json } '); " \
1836
- "rm.AutoComplete.dataSources = Object.assign(currentDataSources, newDataSources);"
1834
+ "rm.AutoComplete.dataSources = Object.assign(rm.AutoComplete.dataSources, JSON.parse('#{ data_sources . to_json } '));"
1837
1835
)
1838
1836
end
1839
1837
Original file line number Diff line number Diff line change @@ -165,4 +165,26 @@ def test_inline_autocomplete_for_issues_should_escape_html_elements
165
165
assert page . has_text? "Bug ##{ issue . id } : This issue has a <select> element"
166
166
end
167
167
end
168
+
169
+ def test_inline_autocomplete_for_users_should_work_after_status_change
170
+ log_user ( 'jsmith' , 'jsmith' )
171
+ visit '/issues/1/edit'
172
+
173
+ find ( '#issue_notes' ) . click
174
+ fill_in 'issue[notes]' , :with => '@lopper'
175
+
176
+ within ( '.tribute-container' ) do
177
+ assert page . has_text? "Dave Lopper"
178
+ end
179
+
180
+ page . find ( '#issue_status_id' ) . select ( 'Feedback' )
181
+
182
+ find ( '#issue_notes' ) . click
183
+ fill_in 'issue[notes]' , :with => '@lopper'
184
+
185
+ within ( '.tribute-container' ) do
186
+ assert page . has_text? "Dave Lopper"
187
+ end
188
+
189
+ end
168
190
end
You can’t perform that action at this time.
0 commit comments