Commit a563065f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #7523 from Razer6/fix_branch_delete

Fix branch remove for branches containing a '/'
parents c1b31dee 50c2efea
:plain $('.js-totalbranch-count').html("#{@repository.branches.size}")
$(".js-branch-#{@branch_name}").remove();
$('.js-totalbranch-count').html("#{@repository.branches.size}")
...@@ -17,3 +17,9 @@ Feature: Project Browse branches ...@@ -17,3 +17,9 @@ Feature: Project Browse branches
And I click new branch link And I click new branch link
When I submit new branch form When I submit new branch form
Then I should see new branch created Then I should see new branch created
@javascript
Scenario: I delete a branch
Given I visit project branches page
And I click branch 'improve/awesome' delete link
Then I should not see branch 'improve/awesome'
...@@ -43,4 +43,15 @@ class ProjectBrowseBranches < Spinach::FeatureSteps ...@@ -43,4 +43,15 @@ class ProjectBrowseBranches < Spinach::FeatureSteps
page.should have_content 'deploy_keys' page.should have_content 'deploy_keys'
end end
end end
step "I click branch 'improve/awesome' delete link" do
within '.js-branch-improve\/awesome' do
find('.btn-remove').click
sleep 0.05
end
end
step "I should not see branch 'improve/awesome'" do
page.all(visible: true).should_not have_content 'improve/awesome'
end
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