summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorFilipa Lacerda <lacerda.filipa@gmail.com>2017-02-17 10:41:46 +0000
committerFilipa Lacerda <lacerda.filipa@gmail.com>2017-02-17 10:41:46 +0000
commit2e66ef48264d61ca1f472e4a157d9e4940e2db55 (patch)
tree06f61ab378da65f44511f45042943d5e8dc26ad0 /spec/features
parent63330af84fb6ecdce4611af238af4233a436e260 (diff)
parent1536109ccd297924474da3e46019b191013c55d4 (diff)
downloadgitlab-ce-2e66ef48264d61ca1f472e4a157d9e4940e2db55.tar.gz
Merge branch '27883-autocomplete-seems-to-not-trigger-when-at-character-is-part-of-an-autocompleted-text' into 'master'
Trigger at.js after selecting slash commands with autocomplete suffix Closes #27883 See merge request !9117
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/issues/gfm_autocomplete_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/features/issues/gfm_autocomplete_spec.rb b/spec/features/issues/gfm_autocomplete_spec.rb
index 93139dc9e94..7135565294b 100644
--- a/spec/features/issues/gfm_autocomplete_spec.rb
+++ b/spec/features/issues/gfm_autocomplete_spec.rb
@@ -182,6 +182,20 @@ feature 'GFM autocomplete', feature: true, js: true do
expect(page).not_to have_selector('.atwho-view')
end
+ it 'triggers autocomplete after selecting a slash command' do
+ note = find('#note_note')
+ page.within '.timeline-content-form' do
+ note.native.send_keys('')
+ note.native.send_keys('/as')
+ note.click
+ end
+
+ find('.atwho-view li', text: '/assign').native.send_keys(:tab)
+
+ user_item = find('.atwho-view li', text: user.username)
+ expect(user_item).to have_content(user.username)
+ end
+
def expect_to_wrap(should_wrap, item, note, value)
expect(item).to have_content(value)
expect(item).not_to have_content("\"#{value}\"")