diff options
-rw-r--r-- | app/views/shared/_delete_label_modal.html.haml | 4 | ||||
-rw-r--r-- | app/views/shared/_label.html.haml | 2 | ||||
-rw-r--r-- | features/steps/project/issues/labels.rb | 5 | ||||
-rw-r--r-- | spec/features/projects/labels/update_prioritization_spec.rb | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/app/views/shared/_delete_label_modal.html.haml b/app/views/shared/_delete_label_modal.html.haml index f29c8f00d52..01effefc34d 100644 --- a/app/views/shared/_delete_label_modal.html.haml +++ b/app/views/shared/_delete_label_modal.html.haml @@ -7,8 +7,8 @@ .modal-body %p - %strong #{label.name} - will be permanently deleted from #{label.group.name}. This cannot be undone. + %strong= label.name + %span will be permanently deleted from #{label.is_a?(ProjectLabel)? label.project.name : label.group.name}. This cannot be undone. .modal-footer %a{ href: '#', data: { dismiss: 'modal' }, class: 'btn btn-default' } Cancel diff --git a/app/views/shared/_label.html.haml b/app/views/shared/_label.html.haml index dd9b4b4db44..9e140cd3f13 100644 --- a/app/views/shared/_label.html.haml +++ b/app/views/shared/_label.html.haml @@ -5,7 +5,7 @@ - show_label_merge_requests_link = show_label_issuables_link?(label, :merge_requests, project: @project) - show_label_issues_link = show_label_issuables_link?(label, :issues, project: @project) -%li{ id: label_css_id, data: { id: label.id } } +%li.label-list-item{ id: label_css_id, data: { id: label.id } } = render "shared/label_row", label: label .visible-xs.visible-sm-inline-block.dropdown diff --git a/features/steps/project/issues/labels.rb b/features/steps/project/issues/labels.rb index 196e0fff63a..4df96e081f9 100644 --- a/features/steps/project/issues/labels.rb +++ b/features/steps/project/issues/labels.rb @@ -15,8 +15,9 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps step 'I delete all labels' do page.within '.labels' do - page.all('.remove-row').each do - accept_confirm { first('.remove-row').click } + page.all('.label-list-item').each do + first('.remove-row').click + first(:link, 'Delete label').click end end end diff --git a/spec/features/projects/labels/update_prioritization_spec.rb b/spec/features/projects/labels/update_prioritization_spec.rb index 85bd776932b..ae8b1364ec7 100644 --- a/spec/features/projects/labels/update_prioritization_spec.rb +++ b/spec/features/projects/labels/update_prioritization_spec.rb @@ -99,7 +99,7 @@ feature 'Prioritize labels' do expect(page).to have_content 'wontfix' # Sort labels - drag_to(selector: '.js-prioritized-labels', from_index: 1, to_index: 2) + drag_to(selector: '.label-list-item', from_index: 1, to_index: 2) page.within('.prioritized-labels') do expect(first('li')).to have_content('feature') |