Commit 2c1fd83a authored by Alfredo Sumaran's avatar Alfredo Sumaran

Merge branch 'delete-branch-remove-tooltip' into 'master'

Removed delete branch tooltip

## What does this MR do?

Removed the tooltip on the delete branch button & add `aria-label`

## What are the relevant issue numbers?

Closes #23253

See merge request !6954
parents 7abcb29d 3812f0dc
......@@ -10,6 +10,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)
......
......@@ -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
......
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
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