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 3 Given I sign in as a user
4 4 And I own project "Shop"
5 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 7 Scenario: I can see project all git branches
12   - Given I click link "All"
  8 + Given I visit project branches page
13 9 Then I should see "Shop" all branches list
14 10  
15 11 Scenario: I can see project protected git branches
16   - Given I click link "Protected"
  12 + Given I visit project protected branches page
17 13 Then I should see "Shop" protected branches list
18 14  
19 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 18 When I submit new branch form
22 19 Then I should see new branch created
... ...
features/steps/project/browse_branches.rb
... ... @@ -3,11 +3,6 @@ class ProjectBrowseBranches &lt; Spinach::FeatureSteps
3 3 include SharedProject
4 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 6 step 'I click link "All"' do
12 7 click_link "All"
13 8 end
... ...
features/steps/shared/paths.rb
... ... @@ -240,6 +240,10 @@ module SharedPaths
240 240 visit project_branches_path(@project)
241 241 end
242 242  
  243 + step 'I visit project protected branches page' do
  244 + visit project_protected_branches_path(@project)
  245 + end
  246 +
243 247 step 'I visit compare refs page' do
244 248 visit project_compare_index_path(@project)
245 249 end
... ...