Commit 8f6707cc authored by Kushal Pandya's avatar Kushal Pandya

Show category tabs on list even when no epics exist in the group

parent 4669161e
- has_filters_applied = params[:label_name].present? || params[:author_username].present? || params[:search].present?
- page_title "Epics"
- if has_filters_applied || @epics.to_a.any?
.top-area
= render 'shared/issuable/epic_nav', type: :epics
.nav-controls
- if can?(current_user, :create_epic, @group)
#new-epic-app{ data: { endpoint: request.url, 'align-right' => true } }
.top-area
= render 'shared/issuable/epic_nav', type: :epics
.nav-controls
- if can?(current_user, :create_epic, @group)
#new-epic-app{ data: { endpoint: request.url, 'align-right' => true } }
= render 'shared/epic/search_bar', type: :epics
= render 'shared/epic/search_bar', type: :epics
- if @epics.to_a.any?
= render 'shared/epics'
......
......@@ -119,13 +119,23 @@ describe 'epics list', :js do
end
context 'when no epics exist for the group' do
it 'renders the empty list page' do
before do
visit group_epics_path(group)
end
it 'renders the empty list page' do
within('#content-body') do
expect(find('.empty-state h4'))
.to have_content('Epics let you manage your portfolio of projects more efficiently and with less effort')
end
end
it 'shows epics tabs for each status type' do
page.within('.epics-state-filters') do
expect(page).to have_selector('li > a#state-opened')
expect(page).to have_selector('li > a#state-closed')
expect(page).to have_selector('li > a#state-all')
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