Speed up Compare feature step

This commit is contained in:
Robert Speicher 2012-09-26 13:58:50 -04:00
parent 7df25e77ac
commit 82c3f62603
2 changed files with 8 additions and 10 deletions

View file

@ -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

View file

@ -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