Commit 55cd2e79 authored by Jacob Schatz's avatar Jacob Schatz

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

Destroy branch delete tooltip when row is removed

## What does this MR do?

Destroys the tooltip when the branch row is deleted.

## What are the relevant issue numbers?

Closes #19528

See merge request !5120
parents 937d770a 25465751
...@@ -153,7 +153,9 @@ ...@@ -153,7 +153,9 @@
}); });
}); });
$('.remove-row').bind('ajax:success', function() { $('.remove-row').bind('ajax:success', function() {
return $(this).closest('li').fadeOut(); $(this).tooltip('destroy')
.closest('li')
.fadeOut();
}); });
$('.js-remove-tr').bind('ajax:before', function() { $('.js-remove-tr').bind('ajax:before', function() {
return $(this).hide(); return $(this).hide();
......
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