summaryrefslogtreecommitdiff
path: root/spec/features/issues/filter_issues_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/issues/filter_issues_spec.rb')
-rw-r--r--spec/features/issues/filter_issues_spec.rb23
1 files changed, 15 insertions, 8 deletions
diff --git a/spec/features/issues/filter_issues_spec.rb b/spec/features/issues/filter_issues_spec.rb
index 8d19198efd3..78208aed46d 100644
--- a/spec/features/issues/filter_issues_spec.rb
+++ b/spec/features/issues/filter_issues_spec.rb
@@ -96,9 +96,9 @@ describe 'Filter issues', feature: true do
wait_for_ajax
page.within '.labels-filter' do
- expect(page).to have_content 'No Label'
+ expect(page).to have_content 'Labels'
end
- expect(find('.js-label-select .dropdown-toggle-text')).to have_content('No Label')
+ expect(find('.js-label-select .dropdown-toggle-text')).to have_content('Labels')
end
it 'filters by a label' do
@@ -110,30 +110,37 @@ describe 'Filter issues', feature: true do
end
it "filters by `won't fix` and another label" do
- find('.dropdown-menu-labels a', text: label.title).click
page.within '.labels-filter' do
- expect(page).to have_content wontfix.title
click_link wontfix.title
+ expect(page).to have_content wontfix.title
+ click_link label.title
end
- expect(find('.js-label-select .dropdown-toggle-text')).to have_content(wontfix.title)
+ expect(find('.js-label-select .dropdown-toggle-text')).to have_content("#{wontfix.title} +1 more")
end
it "filters by `won't fix` label followed by another label after page load" do
- find('.dropdown-menu-labels a', text: wontfix.title).click
- # Close label dropdown to load
+ page.within '.labels-filter' do
+ click_link wontfix.title
+ expect(page).to have_content wontfix.title
+ end
+
find('body').click
+
expect(find('.filtered-labels')).to have_content(wontfix.title)
find('.js-label-select').click
wait_for_ajax
find('.dropdown-menu-labels a', text: label.title).click
- # Close label dropdown to load
+
find('body').click
+
+ expect(find('.filtered-labels')).to have_content(wontfix.title)
expect(find('.filtered-labels')).to have_content(label.title)
find('.js-label-select').click
wait_for_ajax
+
expect(find('.dropdown-menu-labels li', text: wontfix.title)).to have_css('.is-active')
expect(find('.dropdown-menu-labels li', text: label.title)).to have_css('.is-active')
end