diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2017-03-20 23:27:12 +0000 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-03-20 23:27:12 +0000 |
commit | f01ce0913de679986aa8623dc04f2c87f8fb7e9d (patch) | |
tree | ef14a04824649c114e4f4576d4f8fe2abc6542df /spec/features/merge_requests | |
parent | 87b9cee3c20b9069cff5cac4eb1040d2c678006e (diff) | |
download | gitlab-ce-f01ce0913de679986aa8623dc04f2c87f8fb7e9d.tar.gz |
Reset filters after click
Diffstat (limited to 'spec/features/merge_requests')
-rw-r--r-- | spec/features/merge_requests/reset_filters_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/features/merge_requests/reset_filters_spec.rb b/spec/features/merge_requests/reset_filters_spec.rb index 6fed1568fcf..14511707af4 100644 --- a/spec/features/merge_requests/reset_filters_spec.rb +++ b/spec/features/merge_requests/reset_filters_spec.rb @@ -49,6 +49,26 @@ feature 'Merge requests filter clear button', feature: true, js: true do end end + context 'when multiple label filters have been applied' do + let!(:label) { create(:label, project: project, name: 'Frontend') } + let(:filter_dropdown) { find("#js-dropdown-label .filter-dropdown") } + + before do + visit_merge_requests(project) + init_label_search + end + + it 'filters bug label' do + filtered_search.set('~bug') + + filter_dropdown.find('.filter-dropdown-item', text: bug.title).click + init_label_search + + expect(filter_dropdown.find('.filter-dropdown-item', text: bug.title)).to be_visible + expect(filter_dropdown.find('.filter-dropdown-item', text: label.title)).to be_visible + end + end + context 'when a text search has been conducted' do it 'resets the text search filter' do visit_merge_requests(project, search: 'Bug') |