From 3812f0dc6de190b57e8e0437e0d2d5c4beb02ce4 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Tue, 18 Oct 2016 09:19:18 +0100 Subject: Removed delete branch tooltip and tests Closes #23253 --- CHANGELOG.md | 1 + app/views/projects/branches/_branch.html.haml | 7 ++++++- spec/features/projects/branches/delete_spec.rb | 24 ------------------------ 3 files changed, 7 insertions(+), 25 deletions(-) delete mode 100644 spec/features/projects/branches/delete_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 1049551239c..1eab3b25c8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Please view this file on the master branch, on stable branches it's out of date. - Fix HipChat notifications rendering (airatshigapov, eisnerd) - Add hover to trash icon in notes !7008 (blackst0ne) - Fix sidekiq stats in admin area (blackst0ne) + - Removed delete branch tooltip !6954 - Escape ref and path for relative links !6050 (winniehell) - Fixed link typo on /help/ui to Alerts section. !6915 (Sam Rose) - Fix filtering of milestones with quotes in title (airatshigapov) diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 4480b2f22c3..99f3e1167d1 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -31,7 +31,12 @@ = render 'projects/buttons/download', project: @project, ref: branch.name - if can?(current_user, :push_code, @project) - = link_to namespace_project_branch_path(@project.namespace, @project, branch.name), class: "btn btn-remove remove-row has-tooltip #{can_remove_branch?(@project, branch.name) ? '' : 'disabled'}", title: "Delete branch", method: :delete, data: { confirm: "Deleting the '#{branch.name}' branch cannot be undone. Are you sure?", container: 'body' }, remote: true do + = link_to namespace_project_branch_path(@project.namespace, @project, branch.name), + class: "btn btn-remove remove-row #{can_remove_branch?(@project, branch.name) ? '' : 'disabled'}", + method: :delete, + data: { confirm: "Deleting the '#{branch.name}' branch cannot be undone. Are you sure?" }, + remote: true, + "aria-label" => "Delete branch" do = icon("trash-o") - if branch.name != @repository.root_ref diff --git a/spec/features/projects/branches/delete_spec.rb b/spec/features/projects/branches/delete_spec.rb deleted file mode 100644 index 63878c55421..00000000000 --- a/spec/features/projects/branches/delete_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'spec_helper' - -feature 'Delete branch', feature: true, js: true do - include WaitForAjax - - let(:project) { create(:project) } - let(:user) { create(:user) } - - before do - project.team << [user, :master] - login_as user - visit namespace_project_branches_path(project.namespace, project) - end - - it 'destroys tooltip' do - first('.remove-row').hover - expect(page).to have_selector('.tooltip') - - first('.remove-row').click - wait_for_ajax - - expect(page).not_to have_selector('.tooltip') - end -end -- cgit v1.2.1