Remove duplicate coverage in spec requests. All features should be covered in cucumber

This commit is contained in:
Dmitriy Zaporozhets 2012-08-03 19:29:54 +03:00
parent 3079687b93
commit 6de4882597
18 changed files with 39 additions and 589 deletions

View file

@ -10,7 +10,7 @@ Feature: Dashboard
Then I should see "Shop" project link
Then I should see project "Shop" activity feed
Scenario: I should see last pish widget
Scenario: I should see last push widget
Then I should see last push widget
And I click "Create Merge Request" link
Then I see prefilled new Merge Request page

View file

@ -6,6 +6,11 @@ Feature: Profile
Given I visit profile page
Then I should see my profile info
Scenario: I edit profile
Given I visit profile page
Then I change my contact info
And I should see new contact info
Scenario: I change my password
Given I visit profile password page
Then I change my password
@ -15,4 +20,3 @@ Feature: Profile
Given I visit profile token page
Then I reset my token
And I should see new token

View file

@ -0,0 +1,10 @@
Feature: Browse git repo
Background:
Given I signin as a user
And I own project "Shop"
Given I visit project source page
Scenario: I blame file
Given I click on file from repo
And I click blame button
Then I should see git file blame

View file

@ -38,3 +38,13 @@ end
Then /^I should see raw file content$/ do
page.source.should == ValidCommit::BLOB_FILE
end
Given /^I click blame button$/ do
click_link "blame"
end
Then /^I should see git file blame$/ do
page.should have_content("rubygems.org")
page.should have_content("Dmitriy Zaporozhets")
page.should have_content("bc3735004cb Moving to rails 3.2")
end

View file

@ -36,3 +36,16 @@ Then /^I should see new token$/ do
find("#token").value.should == @user.reload.private_token
end
Then /^I change my contact info$/ do
fill_in "user_skype", :with => "testskype"
fill_in "user_linkedin", :with => "testlinkedin"
fill_in "user_twitter", :with => "testtwitter"
click_button "Save"
@user.reload
end
Then /^I should see new contact info$/ do
@user.skype.should == 'testskype'
@user.linkedin.should == 'testlinkedin'
@user.twitter.should == 'testtwitter'
end