fixed cucumber tests

This commit is contained in:
danielgrippi 2011-03-15 13:38:13 -07:00
parent c608c70ca7
commit 3bbc766abc
2 changed files with 10 additions and 11 deletions

View file

@ -9,35 +9,32 @@ Feature: editing your profile
Then I should be on my edit profile page Then I should be on my edit profile page
Scenario: editing gender with a textbox Scenario: editing gender with a textbox
When I fill in "profile_gender" with "F" When I fill in "profile_gender" with "Fearless"
And I press "Update Profile" And I press "Update Profile"
Then I should be on my edit profile page Then I should be on my profile page
And I should see "Profile updated" And I should see "Profile updated"
And the "profile_gender" field should contain "F" And I should see "Fearless"
Scenario: editing name Scenario: editing name
When I fill in "profile_first_name" with "Boba" When I fill in "profile_first_name" with "Boba"
And I fill in "profile_last_name" with "Fett" And I fill in "profile_last_name" with "Fett"
And I press "Update Profile" And I press "Update Profile"
Then I should be on my edit profile page Then I should be on my profile page
And I should see "Profile updated" And I should see "Profile updated"
And the "profile_first_name" field should contain "Boba" And I should see "Boba Fett"
And the "profile_last_name" field should contain "Fett"
Scenario: edit bio Scenario: edit bio
When I fill in "profile_bio" with "This is a bio" When I fill in "profile_bio" with "This is a bio"
And I press "Update Profile" And I press "Update Profile"
Then I should be on my edit profile page Then I should be on my profile page
And I should see "Profile updated" And I should see "Profile updated"
And the "profile_bio" field should contain "This is a bio" And I should see "This is a bio"
Scenario: change birthday Scenario: change birthday
When I select "1986" from "profile_date_year" When I select "1986" from "profile_date_year"
And I select "November" from "profile_date_month" And I select "November" from "profile_date_month"
And I select "30" from "profile_date_day" And I select "30" from "profile_date_day"
And I press "Update Profile" And I press "Update Profile"
Then I should be on my edit profile page Then I should be on my profile page
And I should see "Profile updated" And I should see "Profile updated"
And I click on my name in the header
And I follow "view profile"
Then I should see "November 30 1986" Then I should see "November 30 1986"

View file

@ -15,6 +15,8 @@ module NavigationHelpers
send("#{$1.gsub(/\W+/, '_')}_path") send("#{$1.gsub(/\W+/, '_')}_path")
when /^my edit profile page$/ when /^my edit profile page$/
edit_profile_path edit_profile_path
when /^my profile page$/
person_path(@me.person)
when /^my acceptance form page$/ when /^my acceptance form page$/
accept_user_invitation_path(:invitation_token => @me.invitation_token) accept_user_invitation_path(:invitation_token => @me.invitation_token)
when /^the requestors profile$/ when /^the requestors profile$/