summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-24 14:55:27 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-24 14:55:27 +0200
commit31386adf53e0a029167de3b73f3ebda93b0e86a2 (patch)
treea04fb5ea34479d2dfdf11f259c9af14082278d87 /features
parent6c660698eba8d9c296adffcd09576949fc48f788 (diff)
downloadgitlab-ce-31386adf53e0a029167de3b73f3ebda93b0e86a2.tar.gz
Fixed 500 error on branch and tag creation via UI
Also fixes issue with branch/tag removing via UI Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'features')
-rw-r--r--features/project/commits/branches.feature12
-rw-r--r--features/steps/project/project_browse_branches.rb28
2 files changed, 26 insertions, 14 deletions
diff --git a/features/project/commits/branches.feature b/features/project/commits/branches.feature
index 4fa4dc26a1b..fcf8b7694f4 100644
--- a/features/project/commits/branches.feature
+++ b/features/project/commits/branches.feature
@@ -16,11 +16,7 @@ Feature: Project Browse branches
Given I click link "Protected"
Then I should see "Shop" protected branches list
- # @wip
- # Scenario: I can download project by branch
-
- # @wip
- # Scenario: I can view protected branches
-
- # @wip
- # Scenario: I can manage protected branches
+ Scenario: I create a branch
+ Given I click new branch link
+ When I submit new branch form
+ Then I should see new branch created
diff --git a/features/steps/project/project_browse_branches.rb b/features/steps/project/project_browse_branches.rb
index ef29cc67a4e..30c8cef80c8 100644
--- a/features/steps/project/project_browse_branches.rb
+++ b/features/steps/project/project_browse_branches.rb
@@ -3,33 +3,49 @@ class ProjectBrowseBranches < Spinach::FeatureSteps
include SharedProject
include SharedPaths
- Then 'I should see "Shop" recent branches list' do
+ step 'I should see "Shop" recent branches list' do
page.should have_content "Branches"
page.should have_content "master"
end
- Given 'I click link "All"' do
+ step 'I click link "All"' do
click_link "All"
end
- Then 'I should see "Shop" all branches list' do
+ step 'I should see "Shop" all branches list' do
page.should have_content "Branches"
page.should have_content "master"
end
- Given 'I click link "Protected"' do
+ step 'I click link "Protected"' do
click_link "Protected"
end
- Then 'I should see "Shop" protected branches list' do
+ step 'I should see "Shop" protected branches list' do
within ".protected-branches-list" do
page.should have_content "stable"
page.should_not have_content "master"
end
end
- And 'project "Shop" has protected branches' do
+ step 'project "Shop" has protected branches' do
project = Project.find_by(name: "Shop")
project.protected_branches.create(name: "stable")
end
+
+ step 'I click new branch link' do
+ click_link "New branch"
+ end
+
+ step 'I submit new branch form' do
+ fill_in 'branch_name', with: 'deploy_keys'
+ fill_in 'ref', with: 'master'
+ click_button 'Create branch'
+ end
+
+ step 'I should see new branch created' do
+ within '.all-branches' do
+ page.should have_content 'deploy_keys'
+ end
+ end
end