Commit 3b364513 authored by Luke Bennett's avatar Luke Bennett

Fix update_prioritization_spec

parent 35b5c830
......@@ -14,14 +14,13 @@
- if controller.is_a?(Projects::LabelsController)
%li.inline
.label-badge.label-badge-gray= label.model_name.human.capitalize
- if can?(current_user, :admin_label, label)
- if @project.present?
%li.inline.js-toggle-priority{ data: { url: remove_priority_project_label_path(@project, label),
dom_id: dom_id(label), type: label.type } }
%button.label-action.add-priority.btn.btn-transparent.has-tooltip{ title: _('Prioritize'), type: 'button', :'data-placement' => 'top' }
= sprite_icon('star-o')
%button.label-action.remove-priority.btn.btn-transparent.has-tooltip{ title: _('Remove priority'), type: 'button', :'data-placement' => 'top' }
= sprite_icon('star')
- if can?(current_user, :admin_label, @project)
%li.inline.js-toggle-priority{ data: { url: remove_priority_project_label_path(@project, label),
dom_id: dom_id(label), type: label.type } }
%button.label-action.add-priority.btn.btn-transparent.has-tooltip{ title: _('Prioritize'), type: 'button', :'data-placement' => 'top' }
= sprite_icon('star-o')
%button.label-action.remove-priority.btn.btn-transparent.has-tooltip{ title: _('Remove priority'), type: 'button', :'data-placement' => 'top' }
= sprite_icon('star')
%li.inline
= link_to edit_label_path(label), class: 'btn btn-transparent label-action' do
= sprite_icon('pencil')
......
......@@ -102,16 +102,16 @@ feature 'Prioritize labels' do
drag_to(selector: '.label-list-item', from_index: 1, to_index: 2)
page.within('.prioritized-labels') do
expect(first('li')).to have_content('feature')
expect(page.all('li').last).to have_content('bug')
expect(first('.label-list-item')).to have_content('feature')
expect(page.all('.label-list-item').last).to have_content('bug')
end
refresh
wait_for_requests
page.within('.prioritized-labels') do
expect(first('li')).to have_content('feature')
expect(page.all('li').last).to have_content('bug')
expect(first('.label-list-item')).to have_content('feature')
expect(page.all('.label-list-item').last).to have_content('bug')
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