diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2017-01-21 03:50:14 +0300 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2017-01-21 03:50:14 +0300 |
commit | 3975ee57e34d355e86adf4977feff4fd5ab5d130 (patch) | |
tree | f4b973d2b145894afab8f2808f33f7710d127f9d /spec | |
parent | 2f72d590026798e36c007069f540dbde098239c4 (diff) | |
parent | 3f17f29a22356d9305f981ae2eaac6b30bcfb8d0 (diff) |
Merge branch 'filter-assigned-to-me' into 'master'
Added current user filter to assignee dropdown
Closes #26959 and #26882
See merge request !8653
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/issues/filtered_search/dropdown_assignee_spec.rb | 16 |
1 files changed, 16 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 3ac9b2e0ae0..16dcc487812 100644 --- a/spec/features/issues/filtered_search/dropdown_assignee_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_assignee_spec.rb @@ -43,6 +43,14 @@ describe 'Dropdown assignee', js: true, feature: true do expect(page).to have_css(js_dropdown_assignee, visible: true) end + it 'shows assigned to me link' do + filtered_search.set('assignee:') + + page.within js_dropdown_assignee do + expect(page).to have_content('Assigned to me') + end + end + it 'closes when the search bar is unfocused' do find('body').click() @@ -121,6 +129,14 @@ describe 'Dropdown assignee', js: true, feature: true do filtered_search.set('assignee:') end + it 'filters by current user' do + page.within js_dropdown_assignee do + click_button 'Assigned to me' + end + + expect(filtered_search.value).to eq("assignee:#{user.to_reference}") + end + it 'fills in the assignee username when the assignee has not been filtered' do click_assignee(user_jacob.name) |