40 |
40 |
log_user('admin', 'admin')
|
41 |
41 |
visit 'projects/ecookbook/issues/new'
|
42 |
42 |
|
43 |
|
fill_in 'Description', :with => '##Closed'
|
|
43 |
fill_in 'Description', :with => '##Cl'
|
44 |
44 |
|
|
45 |
assert_selector '.tribute-container li', count: 3
|
45 |
46 |
within('.tribute-container') do
|
46 |
47 |
assert page.has_text? 'Bug #12: Closed issue on a locked version'
|
47 |
48 |
assert page.has_text? 'Bug #11: Closed issue on a closed version'
|
... | ... | |
57 |
58 |
log_user('jsmith', 'jsmith')
|
58 |
59 |
visit 'issues/new'
|
59 |
60 |
|
60 |
|
fill_in 'Description', :with => '#Closed'
|
|
61 |
fill_in 'Description', :with => '#Cl'
|
61 |
62 |
|
|
63 |
assert_selector '.tribute-container li', count: 3
|
62 |
64 |
within('.tribute-container') do
|
63 |
65 |
assert page.has_text? 'Bug #12: Closed issue on a locked version'
|
64 |
66 |
assert page.has_text? 'Bug #11: Closed issue on a closed version'
|
65 |
|
assert_not page.has_text? 'Bug #1: Cannot print recipes'
|
|
67 |
assert page.has_text? 'Bug #8: Closed issue'
|
66 |
68 |
end
|
67 |
69 |
end
|
68 |
70 |
|
... | ... | |
152 |
154 |
assert page.has_text? 'Page_with_sections'
|
153 |
155 |
end
|
154 |
156 |
|
155 |
|
fill_in 'Description', :with => '[[page'
|
|
157 |
fill_in 'Description', :with => '[[p'
|
|
158 |
|
|
159 |
assert_selector '.tribute-container li', count: 3
|
156 |
160 |
within('.tribute-container') do
|
157 |
161 |
assert page.has_text? 'Page_with_sections'
|
|
162 |
assert page.has_text? 'Page_with_an_inline_image'
|
158 |
163 |
assert page.has_text? 'Another_page'
|
|
164 |
|
159 |
165 |
assert_not page.has_text? 'Child_1_1'
|
160 |
166 |
|
161 |
167 |
first('li').click
|
... | ... | |
169 |
175 |
log_user('jsmith', 'jsmith')
|
170 |
176 |
visit 'projects/1/issues/new'
|
171 |
177 |
|
172 |
|
fill_in 'Description', :with => '#This'
|
|
178 |
fill_in 'Description', :with => '#Th'
|
173 |
179 |
|
|
180 |
assert_selector '.tribute-container li', count: 1
|
174 |
181 |
within('.tribute-container') do
|
175 |
182 |
assert page.has_text? "Bug ##{issue.id}: This issue has a <select> element"
|
176 |
183 |
end
|
... | ... | |
181 |
188 |
visit '/issues/1/edit'
|
182 |
189 |
|
183 |
190 |
find('#issue_notes').click
|
184 |
|
fill_in 'issue[notes]', :with => '@lopper'
|
|
191 |
fill_in 'issue[notes]', :with => '@'
|
185 |
192 |
|
186 |
|
within('.tribute-container') do
|
187 |
|
assert page.has_text? "Dave Lopper"
|
188 |
|
end
|
|
193 |
assert_selector '.tribute-container li', minimum: 1
|
189 |
194 |
|
190 |
195 |
page.find('#issue_status_id').select('Feedback')
|
191 |
196 |
|
192 |
197 |
find('#issue_notes').click
|
193 |
|
fill_in 'issue[notes]', :with => '@lopper'
|
|
198 |
fill_in 'issue[notes]', :with => '@j'
|
194 |
199 |
|
|
200 |
assert_selector '.tribute-container li', count: 1
|
195 |
201 |
within('.tribute-container') do
|
196 |
|
assert page.has_text? "Dave Lopper"
|
|
202 |
assert page.has_text? 'John Smith'
|
197 |
203 |
end
|
198 |
204 |
end
|
199 |
205 |
|
... | ... | |
202 |
208 |
visit '/issues/bulk_edit?ids[]=1&ids[]=2'
|
203 |
209 |
|
204 |
210 |
find('#notes').click
|
205 |
|
fill_in 'notes', :with => '@lopper'
|
|
211 |
fill_in 'notes', :with => '@j'
|
206 |
212 |
|
|
213 |
assert_selector '.tribute-container li', count: 1
|
207 |
214 |
within('.tribute-container') do
|
208 |
|
assert page.has_text? 'Dave Lopper'
|
|
215 |
assert page.has_text? 'John Smith'
|
209 |
216 |
first('li').click
|
210 |
217 |
end
|
211 |
218 |
|
212 |
|
assert_equal '@dlopper ', find('#notes').value
|
|
219 |
assert_equal '@jsmith ', find('#notes').value
|
213 |
220 |
end
|
214 |
221 |
|
215 |
222 |
def test_inline_autocomplete_for_users_on_issues_without_edit_issue_permission
|