Commit 61d91f64 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'gt-show-primary-button-when-all-labels-are-prioritized' into 'master'

Show primary button when all labels are prioritized

Closes #54467

See merge request gitlab-org/gitlab-ce!23648
parents 25cd8fb5 f8fdf93e
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- subscribed = params[:subscribed] - subscribed = params[:subscribed]
- labels_or_filters = @labels.exists? || @prioritized_labels.exists? || search.present? || subscribed.present? - 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 - content_for(:header_content) do
.nav-controls .nav-controls
= link_to _('New label'), new_project_label_path(@project), class: "btn btn-success qa-label-create-new" = 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 ...@@ -115,6 +115,21 @@ describe 'Prioritize labels' do
end end
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 it 'shows a help message about prioritized labels' do
visit project_labels_path(project) 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