Commit a8407791 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch...

Merge branch '334039-filer-navigation-disappears-in-the-merge-request-list-if-there-are-no-results' into 'master'

Revert to use merge requests count for group view

See merge request gitlab-org/gitlab!64640
parents b929874f 6ac12241
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- page_title _("Merge requests") - page_title _("Merge requests")
- if @merge_requests&.size == 0 - if issuables_count_for_state(:merge_requests, :all) == 0
= render 'shared/empty_states/merge_requests', project_select_button: true = render 'shared/empty_states/merge_requests', project_select_button: true
- else - else
.top-area .top-area
......
...@@ -75,4 +75,29 @@ RSpec.describe 'Group merge requests page' do ...@@ -75,4 +75,29 @@ RSpec.describe 'Group merge requests page' do
end end
end end
end end
context 'empty state with no merge requests' do
before do
MergeRequest.delete_all
end
it 'shows an empty state, button to create merge request and no filters bar', :aggregate_failures, :js do
visit path
expect(page).to have_selector('.empty-state')
expect(page).to have_link('Select project to create merge request')
expect(page).not_to have_selector('.issues-filters')
end
context 'with no open merge requests' do
it 'shows an empty state, button to create merge request and filters bar', :aggregate_failures, :js do
create(:merge_request, :closed, source_project: project, target_project: project)
visit path
expect(page).to have_selector('.empty-state')
expect(page).to have_link('Select project to create merge request')
expect(page).to have_selector('.issues-filters')
end
end
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment