summaryrefslogtreecommitdiff
path: root/spec/features/issues/filter_by_labels_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/issues/filter_by_labels_spec.rb')
-rw-r--r--spec/features/issues/filter_by_labels_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/features/issues/filter_by_labels_spec.rb b/spec/features/issues/filter_by_labels_spec.rb
index 16c619c9288..5ea02b8d39c 100644
--- a/spec/features/issues/filter_by_labels_spec.rb
+++ b/spec/features/issues/filter_by_labels_spec.rb
@@ -56,8 +56,9 @@ feature 'Issue filtering by Labels', feature: true do
end
it 'should remove label "bug"' do
- first('.js-label-filter-remove').click
- expect(find('.filtered-labels')).to have_no_content "bug"
+ find('.js-label-filter-remove').click
+ wait_for_ajax
+ expect(find('.filtered-labels', visible: false)).to have_no_content "bug"
end
end
@@ -142,7 +143,8 @@ feature 'Issue filtering by Labels', feature: true do
end
it 'should remove label "enhancement"' do
- first('.js-label-filter-remove').click
+ find('.js-label-filter-remove', match: :first).click
+ wait_for_ajax
expect(find('.filtered-labels')).to have_no_content "enhancement"
end
end
@@ -179,6 +181,7 @@ feature 'Issue filtering by Labels', feature: true do
before do
page.within '.labels-filter' do
click_button 'Label'
+ wait_for_ajax
click_link 'bug'
find('.dropdown-menu-close').click
end
@@ -189,14 +192,11 @@ feature 'Issue filtering by Labels', feature: true do
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
+ first('.js-label-filter-remove').click
+ wait_for_ajax
- page.within '.labels-filter' do
- expect(page).not_to have_content 'bug'
- end
+ expect(find('.filtered-labels', visible: false)).not_to have_content 'bug'
+ expect(find('.labels-filter')).not_to have_content 'bug'
end
end