Commit 5a1429ae2110faaf354574f8e6c7866c29102107

Authored by Dmitriy Zaporozhets
1 parent 1bb9aeb5

Fix branches tests

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
features/project/commits/branches.feature
@@ -3,20 +3,17 @@ Feature: Project Browse branches @@ -3,20 +3,17 @@ Feature: Project Browse branches
3 Given I sign in as a user 3 Given I sign in as a user
4 And I own project "Shop" 4 And I own project "Shop"
5 And project "Shop" has protected branches 5 And project "Shop" has protected branches
6 - Given I visit project branches page  
7 -  
8 - Scenario: I can see project recent git branches  
9 - Then I should see "Shop" recent branches list  
10 6
11 Scenario: I can see project all git branches 7 Scenario: I can see project all git branches
12 - Given I click link "All" 8 + Given I visit project branches page
13 Then I should see "Shop" all branches list 9 Then I should see "Shop" all branches list
14 10
15 Scenario: I can see project protected git branches 11 Scenario: I can see project protected git branches
16 - Given I click link "Protected" 12 + Given I visit project protected branches page
17 Then I should see "Shop" protected branches list 13 Then I should see "Shop" protected branches list
18 14
19 Scenario: I create a branch 15 Scenario: I create a branch
20 - Given I click new branch link 16 + Given I visit project branches page
  17 + And I click new branch link
21 When I submit new branch form 18 When I submit new branch form
22 Then I should see new branch created 19 Then I should see new branch created
features/steps/project/browse_branches.rb
@@ -3,11 +3,6 @@ class ProjectBrowseBranches &lt; Spinach::FeatureSteps @@ -3,11 +3,6 @@ class ProjectBrowseBranches &lt; Spinach::FeatureSteps
3 include SharedProject 3 include SharedProject
4 include SharedPaths 4 include SharedPaths
5 5
6 - step 'I should see "Shop" recent branches list' do  
7 - page.should have_content "Branches"  
8 - page.should have_content "master"  
9 - end  
10 -  
11 step 'I click link "All"' do 6 step 'I click link "All"' do
12 click_link "All" 7 click_link "All"
13 end 8 end
features/steps/shared/paths.rb
@@ -240,6 +240,10 @@ module SharedPaths @@ -240,6 +240,10 @@ module SharedPaths
240 visit project_branches_path(@project) 240 visit project_branches_path(@project)
241 end 241 end
242 242
  243 + step 'I visit project protected branches page' do
  244 + visit project_protected_branches_path(@project)
  245 + end
  246 +
243 step 'I visit compare refs page' do 247 step 'I visit compare refs page' do
244 visit project_compare_index_path(@project) 248 visit project_compare_index_path(@project)
245 end 249 end