From 1536109ccd297924474da3e46019b191013c55d4 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Thu, 9 Feb 2017 22:35:32 -0500 Subject: Retrigger at.js for slash commands with autocomplete suffix --- spec/features/issues/gfm_autocomplete_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'spec/features/issues') 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}\"") -- cgit v1.2.1