Commit 82c3f6260366147803d5f63d575231f77c7e73ce

Authored by Robert Speicher
1 parent 7df25e77

Speed up Compare feature step

features/project/commits/commits.feature
1 Feature: Project Browse commits 1 Feature: Project Browse commits
2 Background: 2 Background:
3 Given I sign in as a user 3 Given I sign in as a user
4 - And I own project "Shop"  
5 - Given I visit project commits page 4 + And I own a project
  5 + And I visit my project's commits page
6 6
7 Scenario: I browse commits list for master branch 7 Scenario: I browse commits list for master branch
8 Then I see project commits 8 Then I see project commits
@@ -18,4 +18,4 @@ Feature: Project Browse commits @@ -18,4 +18,4 @@ Feature: Project Browse commits
18 Scenario: I compare refs 18 Scenario: I compare refs
19 Given I visit compare refs page 19 Given I visit compare refs page
20 And I fill compare fields with refs 20 And I fill compare fields with refs
21 - And I see compared refs 21 + Then I see compared refs
features/steps/project/project_browse_commits.rb
@@ -4,8 +4,6 @@ class ProjectBrowseCommits < Spinach::FeatureSteps @@ -4,8 +4,6 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
4 include SharedPaths 4 include SharedPaths
5 5
6 Then 'I see project commits' do 6 Then 'I see project commits' do
7 - current_path.should == project_commits_path(@project)  
8 -  
9 commit = @project.commit 7 commit = @project.commit
10 page.should have_content(@project.name) 8 page.should have_content(@project.name)
11 page.should have_content(commit.message) 9 page.should have_content(commit.message)
@@ -34,14 +32,14 @@ class ProjectBrowseCommits < Spinach::FeatureSteps @@ -34,14 +32,14 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
34 end 32 end
35 33
36 And 'I fill compare fields with refs' do 34 And 'I fill compare fields with refs' do
37 - fill_in "from", :with => "master"  
38 - fill_in "to", :with => "stable" 35 + fill_in "from", with: "bcf03b5de6c33f3869ef70d68cf06e679d1d7f9a"
  36 + fill_in "to", with: "8716fc78f3c65bbf7bcf7b574febd583bc5d2812"
39 click_button "Compare" 37 click_button "Compare"
40 end 38 end
41 39
42 - And 'I see compared refs' do  
43 - page.should have_content "Commits (27)" 40 + Then 'I see compared refs' do
44 page.should have_content "Compare View" 41 page.should have_content "Compare View"
45 - page.should have_content "Showing 73 changed files" 42 + page.should have_content "Commits (1)"
  43 + page.should have_content "Showing 2 changed files"
46 end 44 end
47 end 45 end