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_author_spec.rb
parent5cb8ad6c57bc8588add7ae47a82842a707ab2298 (diff)
Show current user immediately in issuable filters
Diffstat (limited to 'spec/features/issues/filtered_search/dropdown_author_spec.rb')
-rw-r--r--spec/features/issues/filtered_search/dropdown_author_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/features/issues/filtered_search/dropdown_author_spec.rb b/spec/features/issues/filtered_search/dropdown_author_spec.rb
index 358b244fb5b..6b707c4be4a 100644
--- a/spec/features/issues/filtered_search/dropdown_author_spec.rb
+++ b/spec/features/issues/filtered_search/dropdown_author_spec.rb
@@ -135,6 +135,25 @@ describe 'Dropdown author', js: true, feature: true do
end
end
+ describe 'selecting from dropdown without Ajax call' do
+ before do
+ Gitlab::Testing::RequestBlockerMiddleware.block_requests!
+ filtered_search.set('author:')
+ end
+
+ after do
+ Gitlab::Testing::RequestBlockerMiddleware.allow_requests!
+ end
+
+ it 'selects current user' do
+ find('#js-dropdown-author .filter-dropdown-item', text: user.username).click
+
+ expect(page).to have_css(js_dropdown_author, visible: false)
+ expect_tokens([{ name: 'author', value: user.username }])
+ expect_filtered_search_input_empty
+ end
+ end
+
describe 'input has existing content' do
it 'opens author dropdown with existing search term' do
filtered_search.set('searchTerm author:')