diff options
Diffstat (limited to 'spec/features/groups/merge_requests_spec.rb')
-rw-r--r-- | spec/features/groups/merge_requests_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/features/groups/merge_requests_spec.rb b/spec/features/groups/merge_requests_spec.rb index f79c93157dc..077f680629f 100644 --- a/spec/features/groups/merge_requests_spec.rb +++ b/spec/features/groups/merge_requests_spec.rb @@ -75,4 +75,29 @@ RSpec.describe 'Group merge requests page' do 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 |