From a23076387907e32215267e85c148441ff9ffc214 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Thu, 4 Nov 2010 22:02:27 -0700 Subject: [PATCH] gender is a text field --- app/views/people/edit.html.haml | 2 +- app/views/users/getting_started/_step_1.html.haml | 2 +- config/locales/diaspora/en.yml | 1 + features/edits_profile.feature | 13 +++++++++++++ features/signs_up.feature | 1 + features/support/paths.rb | 2 ++ 6 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 features/edits_profile.feature diff --git a/app/views/people/edit.html.haml b/app/views/people/edit.html.haml index 6a7fd562e..e39ee4c14 100644 --- a/app/views/people/edit.html.haml +++ b/app/views/people/edit.html.haml @@ -29,7 +29,7 @@ %h4 = t('.your_gender') %br - = select_tag 'person[profile][gender]', options_for_select(["","Female","Male"], @person.profile.gender) + = profile.text_field :gender, :value => @profile.gender, :placeholder => t('.fill_me_out') %h4 = t('.your_birthday') diff --git a/app/views/users/getting_started/_step_1.html.haml b/app/views/users/getting_started/_step_1.html.haml index 56e5638b3..65e845581 100644 --- a/app/views/users/getting_started/_step_1.html.haml +++ b/app/views/users/getting_started/_step_1.html.haml @@ -20,7 +20,7 @@ %h4 Your gender %br - = select_tag 'person[profile][gender]', options_for_select(["","Female","Male"], @person.profile.gender) + = profile.text_field :gender, :value => @profile.gender, :placeholder => t(".fill_me_out") %h4 Your birthday diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 865912c9a..c412bcf28 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -156,6 +156,7 @@ en: 'step_1': you_dont_have_any_photos: "You don't have any photos! Go to the" page_to_upload_some: "page to upload some." + fill_me_out: "Fill me out" edit_profile: "Edit your profile" define_aspects: "Define your aspects" connect_services: "Connect your services" diff --git a/features/edits_profile.feature b/features/edits_profile.feature new file mode 100644 index 000000000..c21e177d6 --- /dev/null +++ b/features/edits_profile.feature @@ -0,0 +1,13 @@ +@javascript +Feature: editing your profile + + Scenario: editing gender with a textbox + Given I am signed in + And I click on my name in the header + And I follow "edit profile" + Then I should be on my edit profile page + When I fill in "person_profile_gender" with "F" + And I press "Update Profile" + Then I should be on my edit profile page + And I should see "Profile updated" + And the "person_profile_gender" field should contain "F" diff --git a/features/signs_up.feature b/features/signs_up.feature index 80e32934f..9f14b66d4 100644 --- a/features/signs_up.feature +++ b/features/signs_up.feature @@ -14,6 +14,7 @@ Feature: new user registration Scenario: new user goes through the setup wizard When I fill in "person_profile_first_name" with "O" And I fill in "person_profile_last_name" with "Hai" + And I fill in "person_profile_gender" with "guess!" And I press "Save and continue" Then I should see "Profile updated" And I should see "Your aspects" diff --git a/features/support/paths.rb b/features/support/paths.rb index 9a08357a0..2b0f8572d 100644 --- a/features/support/paths.rb +++ b/features/support/paths.rb @@ -7,6 +7,8 @@ module NavigationHelpers send("#{$1.gsub(/\W+/, '_')}_path", @it) when /^the ([\w ]+) page$/ send("#{$1.gsub(/\W+/, '_')}_path") + when /^my edit profile page$/ + edit_person_path(@me.person) when /^"(\/.*)"/ $1 else