Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2017-06-02 10:42:18 +0300
committerPhil Hughes <me@iamphill.com>2017-06-02 10:42:18 +0300
commitf2b34fb208020706a5b5a73b2e50473bfda2c745 (patch)
treec28564658ff45cbb1078911e08afb5493e16ca16 /spec/features/issues/filtered_search/dropdown_assignee_spec.rb
parent5cb8ad6c57bc8588add7ae47a82842a707ab2298 (diff)
Show current user immediately in issuable filters
Diffstat (limited to 'spec/features/issues/filtered_search/dropdown_assignee_spec.rb')
-rw-r--r--spec/features/issues/filtered_search/dropdown_assignee_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/features/issues/filtered_search/dropdown_assignee_spec.rb b/spec/features/issues/filtered_search/dropdown_assignee_spec.rb
index 4d38df05928..44353d880c2 100644
--- a/spec/features/issues/filtered_search/dropdown_assignee_spec.rb
+++ b/spec/features/issues/filtered_search/dropdown_assignee_spec.rb
@@ -157,6 +157,25 @@ describe 'Dropdown assignee', :feature, :js do
end
end
+ describe 'selecting from dropdown without Ajax call' do
+ before do
+ Gitlab::Testing::RequestBlockerMiddleware.block_requests!
+ filtered_search.set('assignee:')
+ end
+
+ after do
+ Gitlab::Testing::RequestBlockerMiddleware.allow_requests!
+ end
+
+ it 'selects current user' do
+ find('#js-dropdown-assignee .filter-dropdown-item', text: user.username).click
+
+ expect(page).to have_css(js_dropdown_assignee, visible: false)
+ expect_tokens([{ name: 'assignee', value: user.username }])
+ expect_filtered_search_input_empty
+ end
+ end
+
describe 'input has existing content' do
it 'opens assignee dropdown with existing search term' do
filtered_search.set('searchTerm assignee:')