Commit f8fdf93e authored by George Tsiolis's avatar George Tsiolis Committed by Phil Hughes

Show primary button when all labels are prioritized

parent 25cd8fb5
......@@ -5,7 +5,7 @@
- subscribed = params[:subscribed]
- labels_or_filters = @labels.exists? || @prioritized_labels.exists? || search.present? || subscribed.present?
- if @labels.present? && can_admin_label
- if labels_or_filters && can_admin_label
- content_for(:header_content) do
.nav-controls
= link_to _('New label'), new_project_label_path(@project), class: "btn btn-success qa-label-create-new"
......
---
title: Show primary button when all labels are prioritized
merge_request: 23648
author: George Tsiolis
type: other
......@@ -115,6 +115,21 @@ describe 'Prioritize labels' do
end
end
it 'user can see a primary button when there are only prioritized labels', :js do
visit project_labels_path(project)
page.within('.other-labels') do
all('.js-toggle-priority').each do |el|
el.click
end
wait_for_requests
end
page.within('.breadcrumbs-container') do
expect(page).to have_link('New label')
end
end
it 'shows a help message about prioritized labels' do
visit project_labels_path(project)
......
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