Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/projects/branches/destroy.js.haml4
-rw-r--r--features/project/commits/branches.feature6
-rw-r--r--features/steps/project/browse_branches.rb11
3 files changed, 18 insertions, 3 deletions
diff --git a/app/views/projects/branches/destroy.js.haml b/app/views/projects/branches/destroy.js.haml
index ec1661c0aaa..882a4d0c5e2 100644
--- a/app/views/projects/branches/destroy.js.haml
+++ b/app/views/projects/branches/destroy.js.haml
@@ -1,3 +1 @@
-:plain
- $(".js-branch-#{@branch_name}").remove();
- $('.js-totalbranch-count').html("#{@repository.branches.size}")
+$('.js-totalbranch-count').html("#{@repository.branches.size}")
diff --git a/features/project/commits/branches.feature b/features/project/commits/branches.feature
index abebef04fcd..d657bd4951f 100644
--- a/features/project/commits/branches.feature
+++ b/features/project/commits/branches.feature
@@ -17,3 +17,9 @@ Feature: Project Browse branches
And I click new branch link
When I submit new branch form
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'
diff --git a/features/steps/project/browse_branches.rb b/features/steps/project/browse_branches.rb
index 7a0625952de..c00a95a62fd 100644
--- a/features/steps/project/browse_branches.rb
+++ b/features/steps/project/browse_branches.rb
@@ -43,4 +43,15 @@ class ProjectBrowseBranches < Spinach::FeatureSteps
page.should have_content 'deploy_keys'
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