From 82c3f6260366147803d5f63d575231f77c7e73ce Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 26 Sep 2012 13:58:50 -0400 Subject: [PATCH] Speed up Compare feature step --- features/project/commits/commits.feature | 6 +++--- features/steps/project/project_browse_commits.rb | 12 +++++------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/features/project/commits/commits.feature b/features/project/commits/commits.feature index 53de6e6a264..df795ef71e6 100644 --- a/features/project/commits/commits.feature +++ b/features/project/commits/commits.feature @@ -1,8 +1,8 @@ Feature: Project Browse commits Background: Given I sign in as a user - And I own project "Shop" - Given I visit project commits page + And I own a project + And I visit my project's commits page Scenario: I browse commits list for master branch Then I see project commits @@ -18,4 +18,4 @@ Feature: Project Browse commits Scenario: I compare refs Given I visit compare refs page And I fill compare fields with refs - And I see compared refs + Then I see compared refs diff --git a/features/steps/project/project_browse_commits.rb b/features/steps/project/project_browse_commits.rb index 014799879e8..cb5cabe98b3 100644 --- a/features/steps/project/project_browse_commits.rb +++ b/features/steps/project/project_browse_commits.rb @@ -4,8 +4,6 @@ class ProjectBrowseCommits < Spinach::FeatureSteps include SharedPaths Then 'I see project commits' do - current_path.should == project_commits_path(@project) - commit = @project.commit page.should have_content(@project.name) page.should have_content(commit.message) @@ -34,14 +32,14 @@ class ProjectBrowseCommits < Spinach::FeatureSteps end And 'I fill compare fields with refs' do - fill_in "from", :with => "master" - fill_in "to", :with => "stable" + fill_in "from", with: "bcf03b5de6c33f3869ef70d68cf06e679d1d7f9a" + fill_in "to", with: "8716fc78f3c65bbf7bcf7b574febd583bc5d2812" click_button "Compare" end - And 'I see compared refs' do - page.should have_content "Commits (27)" + Then 'I see compared refs' do page.should have_content "Compare View" - page.should have_content "Showing 73 changed files" + page.should have_content "Commits (1)" + page.should have_content "Showing 2 changed files" end end