diff options
author | Phil Hughes <me@iamphill.com> | 2016-07-21 14:42:37 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-07-21 14:42:37 +0300 |
commit | 94e0ca004959196d0c8481f8f8eb28084ae021ae (patch) | |
tree | 51967530ec583ea524b65f6f4f7ea8d36c23e091 /spec/features/issues/gfm_autocomplete_spec.rb | |
parent | 8ed97054835a28ead703c32d9c2ab79a15412c88 (diff) |
Allow GFM autocomplete to be trigger without the preceding space
Closes #19975
Diffstat (limited to 'spec/features/issues/gfm_autocomplete_spec.rb')
-rw-r--r-- | spec/features/issues/gfm_autocomplete_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/features/issues/gfm_autocomplete_spec.rb b/spec/features/issues/gfm_autocomplete_spec.rb new file mode 100644 index 00000000000..000b190de77 --- /dev/null +++ b/spec/features/issues/gfm_autocomplete_spec.rb @@ -0,0 +1,24 @@ +require 'rails_helper' + +feature 'GFM autocomplete', feature: true, js: true do + let(:user) { create(:user) } + let(:project) { create(:project) } + let(:issue) { create(:issue, project: project) } + + before do + project.team << [user, :master] + login_as(user) + visit namespace_project_issue_path(project.namespace, project, issue) + end + + it 'opens autocomplete menu when doesnt starts with space' do + sleep 2 + + page.within '.timeline-content-form' do + find('#note_note').native.send_keys('testing') + find('#note_note').native.send_keys('@') + end + + expect(page).to have_selector('.atwho-view') + end +end |