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
path: root/spec
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-06-02 12:40:42 +0300
committerPhil Hughes <me@iamphill.com>2016-06-08 13:45:17 +0300
commitd3ff691d768fcb40171c11cade8a659a62534160 (patch)
tree0eacf53b178402935831ad31180f48e8b28b079a /spec
parentf4eb55724f9eef401283f11fb617261a390e42a5 (diff)
Fixed issue with dropdown toggle not updating
Added tests
Diffstat (limited to 'spec')
-rw-r--r--spec/features/issues/filter_by_labels_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/features/issues/filter_by_labels_spec.rb b/spec/features/issues/filter_by_labels_spec.rb
index 2015b0434fb..0ec8b6b180a 100644
--- a/spec/features/issues/filter_by_labels_spec.rb
+++ b/spec/features/issues/filter_by_labels_spec.rb
@@ -174,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