diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-06-08 14:56:47 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2016-06-08 14:56:47 +0000 |
commit | 53498e42868f258a5e0cda7894fa4de8e8d4f8e9 (patch) | |
tree | 74ce036c1e55139c3bf8fe05bae5c04597707110 /spec | |
parent | fadf791519fe4f917c575160d107b0dafeec4d87 (diff) | |
parent | d3ff691d768fcb40171c11cade8a659a62534160 (diff) | |
download | gitlab-ce-53498e42868f258a5e0cda7894fa4de8e8d4f8e9.tar.gz |
Merge branch 'remove-labels-from-filter' into 'master'
Removable labels from filtered issuables label bar
When filtering by labels, a remove button appears next to each label. This then removes that label & refreshes the issuable filter form
![Screen_Shot_2016-05-17_at_12.07.47](/uploads/b21e86247aa1bbfd347bef1eb21f1562/Screen_Shot_2016-05-17_at_12.07.47.png)
Closes #15474
See merge request !4178
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/issues/filter_by_labels_spec.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/spec/features/issues/filter_by_labels_spec.rb b/spec/features/issues/filter_by_labels_spec.rb index 7f654684143..0ec8b6b180a 100644 --- a/spec/features/issues/filter_by_labels_spec.rb +++ b/spec/features/issues/filter_by_labels_spec.rb @@ -54,6 +54,11 @@ feature 'Issue filtering by Labels', feature: true do expect(find('.filtered-labels')).not_to have_content "feature" expect(find('.filtered-labels')).not_to have_content "enhancement" end + + it 'should remove label "bug"' do + first('.js-label-filter-remove').click + expect(find('.filtered-labels')).to have_no_content "bug" + end end context 'filter by label feature', js: true do @@ -135,6 +140,11 @@ feature 'Issue filtering by Labels', feature: true do it 'should not show label "bug" in filtered-labels' do expect(find('.filtered-labels')).not_to have_content "bug" end + + it 'should remove label "enhancement"' do + first('.js-label-filter-remove').click + expect(find('.filtered-labels')).to have_no_content "enhancement" + end end context 'filter by label enhancement and bug in issues list', js: true do @@ -164,4 +174,29 @@ feature 'Issue filtering by Labels', feature: true do expect(find('.filtered-labels')).not_to have_content "feature" end end + + context 'remove filtered labels', js: true do + before do + page.within '.labels-filter' do + click_button 'Label' + click_link 'bug' + find('.dropdown-menu-close').click + end + + page.within '.filtered-labels' do + expect(page).to have_content 'bug' + end + end + + it 'should allow user to remove filtered labels' do + page.within '.filtered-labels' do + first('.js-label-filter-remove').click + expect(page).not_to have_content 'bug' + end + + page.within '.labels-filter' do + expect(page).not_to have_content 'bug' + end + end + end end |