don't lookup branch element - it might need to be escaped

This commit is contained in:
Robert Schilling 2014-08-17 17:05:32 +02:00
parent 27cf081e1b
commit 50c2efea03
3 changed files with 18 additions and 3 deletions

View file

@ -1,3 +1 @@
:plain
$(".js-branch-#{@branch_name}").remove();
$('.js-totalbranch-count').html("#{@repository.branches.size}") $('.js-totalbranch-count').html("#{@repository.branches.size}")

View file

@ -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'

View file

@ -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