summaryrefslogtreecommitdiff
path: root/spec/features/boards/boards_spec.rb
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-09-27 14:08:45 +0000
committerFatih Acet <acetfatih@gmail.com>2016-09-27 14:08:45 +0000
commit3820ca5876ecb550d4d7eba0db98296f467125d8 (patch)
tree613977d866fd51375c6582a31d6726ae24931c29 /spec/features/boards/boards_spec.rb
parentbc452eafea8dfd32ea1b132c04fc22a38fa71d5c (diff)
parent78839ec0fe146564a4a4a2ab339f479e25a13e5e (diff)
downloadgitlab-ce-3820ca5876ecb550d4d7eba0db98296f467125d8.tar.gz
Merge branch 'issue-boards-label-filter-fix' into 'master'
Fixed issue board label filtering not removing labels ## What does this MR do? When trying to remove a label filter it would actually add it instead making it impossible to remove the label filter without modifying the URL. This fixes that by correctly removing the label from the filter. ## What are the relevant issue numbers? Closes #21417 See merge request !6208
Diffstat (limited to 'spec/features/boards/boards_spec.rb')
-rw-r--r--spec/features/boards/boards_spec.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/features/boards/boards_spec.rb b/spec/features/boards/boards_spec.rb
index 2dcbc4703e1..26ea06e002b 100644
--- a/spec/features/boards/boards_spec.rb
+++ b/spec/features/boards/boards_spec.rb
@@ -466,6 +466,29 @@ describe 'Issue Boards', feature: true, js: true do
end
end
+ it 'removes filtered labels' do
+ wait_for_vue_resource
+
+ page.within '.labels-filter' do
+ click_button('Label')
+ wait_for_ajax
+
+ page.within '.dropdown-menu-labels' do
+ click_link(testing.title)
+ wait_for_vue_resource(spinner: false)
+ end
+
+ expect(page).to have_css('input[name="label_name[]"]', visible: false)
+
+ page.within '.dropdown-menu-labels' do
+ click_link(testing.title)
+ wait_for_vue_resource(spinner: false)
+ end
+
+ expect(page).not_to have_css('input[name="label_name[]"]', visible: false)
+ end
+ end
+
it 'infinite scrolls list with label filter' do
50.times do
create(:labeled_issue, project: project, labels: [testing])