summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorFilipa Lacerda <lacerda.filipa@gmail.com>2017-02-02 13:40:04 +0000
committerJames Lopez <james@jameslopez.es>2017-02-02 14:46:02 +0100
commitf0558e873dcc3c3b6b745b656a89e64ffa6f593c (patch)
tree0c74eb4513a8aa93f0ead9e576bd8ff6fb8cedfd /spec
parent773a066cbbed52ba3ef7d7d91b840d55a76148bd (diff)
downloadgitlab-ce-f0558e873dcc3c3b6b745b656a89e64ffa6f593c.tar.gz
Merge branch '27067-mention-user-dropdown-does-not-suggest-by-non-ascii-characters-in-name' into 'master'
Resolve "Mention @user dropdown does not suggest by non-ASCII characters in name" Closes #27067 See merge request !8729
Diffstat (limited to 'spec')
-rw-r--r--spec/features/issues/gfm_autocomplete_spec.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/features/issues/gfm_autocomplete_spec.rb b/spec/features/issues/gfm_autocomplete_spec.rb
index 31156fcf994..93139dc9e94 100644
--- a/spec/features/issues/gfm_autocomplete_spec.rb
+++ b/spec/features/issues/gfm_autocomplete_spec.rb
@@ -2,7 +2,7 @@ require 'rails_helper'
feature 'GFM autocomplete', feature: true, js: true do
include WaitForAjax
- let(:user) { create(:user, username: 'someone.special') }
+ let(:user) { create(:user, name: '💃speciąl someone💃', username: 'someone.special') }
let(:project) { create(:project) }
let(:label) { create(:label, project: project, title: 'special+') }
let(:issue) { create(:issue, project: project) }
@@ -59,6 +59,19 @@ feature 'GFM autocomplete', feature: true, js: true do
expect(find('#at-view-64')).to have_selector('.cur:first-of-type')
end
+ it 'includes items for assignee dropdowns with non-ASCII characters in name' do
+ page.within '.timeline-content-form' do
+ find('#note_note').native.send_keys('')
+ find('#note_note').native.send_keys("@#{user.name[0...8]}")
+ end
+
+ expect(page).to have_selector('.atwho-container')
+
+ wait_for_ajax
+
+ expect(find('#at-view-64')).to have_content(user.name)
+ end
+
it 'selects the first item for non-assignee dropdowns if a query is entered' do
page.within '.timeline-content-form' do
find('#note_note').native.send_keys('')