Reorder items on settings page and improve wording

Update cukes to be text-independent
Update changelog
This commit is contained in:
goobertron 2014-04-06 20:13:01 +01:00
parent 682a49605e
commit 63abe9055b
12 changed files with 120 additions and 121 deletions

View file

@ -16,6 +16,7 @@
* Improve search page, add better indications [#4794](https://github.com/diaspora/diaspora/pull/4794) * Improve search page, add better indications [#4794](https://github.com/diaspora/diaspora/pull/4794)
* Port notifications and hovercards to Bootstrap [#4814](https://github.com/diaspora/diaspora/pull/4814) * Port notifications and hovercards to Bootstrap [#4814](https://github.com/diaspora/diaspora/pull/4814)
* Replace .rvmrc by .ruby-version and .ruby-gemset [#4854](https://github.com/diaspora/diaspora/pull/4855) * Replace .rvmrc by .ruby-version and .ruby-gemset [#4854](https://github.com/diaspora/diaspora/pull/4855)
* Reorder and reword items on user settings page [#4912](https://github.com/diaspora/diaspora/pull/4912)
## Bug fixes ## Bug fixes
* Improve time agos by updating the plugin [#4280](https://github.com/diaspora/diaspora/issues/4280) * Improve time agos by updating the plugin [#4280](https://github.com/diaspora/diaspora/issues/4280)

View file

@ -56,6 +56,7 @@
%p{:class=>"checkbox_select"} %p{:class=>"checkbox_select"}
= check_box_tag 'profile[nsfw]', true, profile.nsfw? = check_box_tag 'profile[nsfw]', true, profile.nsfw?
= label_tag 'profile[nsfw]', t('profiles.edit.nsfw_check') = label_tag 'profile[nsfw]', t('profiles.edit.nsfw_check')
%br
= t('profiles.edit.nsfw_explanation2') = t('profiles.edit.nsfw_explanation2')
%br %br
%br %br

View file

@ -11,7 +11,7 @@
.span-12.prepend-5.last .span-12.prepend-5.last
- content_for :submit_block do - content_for :submit_block do
= link_to t('cancel'), local_or_remote_person_path(current_user.person), :class => "button" = link_to t('cancel'), local_or_remote_person_path(current_user.person), :class => "button"
= submit_tag t('.update_profile'), :class => "creation" = submit_tag t('.update_profile'), :class => "creation", :id => "update_profile"
= render :partial => 'edit', :locals => {:person => @person, = render :partial => 'edit', :locals => {:person => @person,
:profile => @profile, :aspect => @aspect, :step => @step} :profile => @profile, :aspect => @aspect, :step => @step}

View file

@ -11,6 +11,6 @@
.span-12.prepend-5.last .span-12.prepend-5.last
- content_for :submit_block do - content_for :submit_block do
= link_to t('cancel'), local_or_remote_person_path(current_user.person), :class => "button" = link_to t('cancel'), local_or_remote_person_path(current_user.person), :class => "button"
= submit_tag t('.update_profile'), :class => "btn" = submit_tag t('.update_profile'), :class => "btn", :id => "update_profile"
= render :partial => 'edit', :locals => {:person => @person, = render :partial => 'edit', :locals => {:person => @person,
:profile => @profile, :aspect => @aspect, :step => @step} :profile => @profile, :aspect => @aspect, :step => @step}

View file

@ -70,7 +70,6 @@
%br %br
%br %br
%hr %hr
%br %br
%h3#stream-preferences %h3#stream-preferences
@ -78,12 +77,19 @@
= form_for current_user, :url => user_path, :html => { :method => :put } do |f| = form_for current_user, :url => user_path, :html => { :method => :put } do |f|
= f.error_messages = f.error_messages
%p.checkbox_select = f.fields_for :stream_preferences do |type|
= f.label :show_community_spotlight_in_stream, t('.show_community_spotlight') #stream_prefs
= f.check_box :show_community_spotlight_in_stream %p.checkbox_select
= f.label :show_community_spotlight_in_stream, t('.show_community_spotlight')
= f.check_box :show_community_spotlight_in_stream
%br %br
= f.submit t('.change'), :class => 'button' %p.checkbox_select
= f.label :getting_started, t('.show_getting_started')
= f.check_box :getting_started
%br
= f.submit t('.change'), :class => 'button'
%br %br
%br %br
@ -112,23 +118,6 @@
%hr %hr
%br %br
%h3#getting-started-preferences
= t('.show_getting_started')
= form_for current_user, :url => user_path, :html => { :method => :put } do |f|
= f.error_messages
%p.checkbox_select
= f.label :getting_started, t('.show_getting_started')
= f.check_box :getting_started
%br
= f.submit t('.change'), :class => 'button'
%br
%br
%hr
%br
%h3 %h3
= t('.receive_email_notifications') = t('.receive_email_notifications')
= form_for 'user', :url => user_path, :html => { :method => :put } do |f| = form_for 'user', :url => user_path, :html => { :method => :put } do |f|
@ -137,38 +126,39 @@
= f.fields_for :email_preferences do |type| = f.fields_for :email_preferences do |type|
#email_prefs #email_prefs
%p.checkbox_select %p.checkbox_select
= type.label :also_commented, t('.also_commented') = type.label :started_sharing, t('.started_sharing')
= type.check_box :also_commented, {:checked => @email_prefs['also_commented']}, false, true = type.check_box :started_sharing, {:checked => @email_prefs['started_sharing']}, false, true
%br %br
%p.checkbox_select %p.checkbox_select
= type.label :mentioned, t('.mentioned') = type.label :mentioned, t('.mentioned')
= type.check_box :mentioned, {:checked => @email_prefs['mentioned']}, false, true = type.check_box :mentioned, {:checked => @email_prefs['mentioned']}, false, true
%br %br
%p.checkbox_select
= type.label :liked, t('.liked')
= type.check_box :liked, {:checked => @email_prefs['liked']}, false, true
%br
%p.checkbox_select
= type.label :reshared, t('.reshared')
= type.check_box :reshared, {:checked => @email_prefs['reshared']}, false, true
%br
%p.checkbox_select %p.checkbox_select
= type.label :comment_on_post, t('.comment_on_post') = type.label :comment_on_post, t('.comment_on_post')
= type.check_box :comment_on_post, {:checked => @email_prefs['comment_on_post']}, false, true = type.check_box :comment_on_post, {:checked => @email_prefs['comment_on_post']}, false, true
%br %br
%p.checkbox_select
= type.label :also_commented, t('.also_commented')
= type.check_box :also_commented, {:checked => @email_prefs['also_commented']}, false, true
%br
%p.checkbox_select %p.checkbox_select
= type.label :private_message, t('.private_message') = type.label :private_message, t('.private_message')
= type.check_box :private_message, {:checked => @email_prefs['private_message']}, false, true = type.check_box :private_message, {:checked => @email_prefs['private_message']}, false, true
%br
%p.checkbox_select
= type.label :started_sharing, t('.started_sharing')
= type.check_box :started_sharing, {:checked => @email_prefs['started_sharing']}, false, true
%br
%p.checkbox_select
= type.label :liked, t('.liked')
= type.check_box :liked, {:checked => @email_prefs['liked']}, false, true
%br
%p.checkbox_select
= type.label :reshared, t('.reshared')
= type.check_box :reshared, {:checked => @email_prefs['reshared']}, false, true
%br %br
= f.submit t('.change'), :class => "button" = f.submit t('.change'), :class => "button"
@ -188,7 +178,7 @@
.span-5.last .span-5.last
%h3 %h3
= t('.close_account_text') = t('.close_account_text')
=link_to t('.close_account_text'), '#close_account_pane', :rel => 'facebox', :class => "button" =link_to t('.close_account_text'), '#close_account_pane', :rel => 'facebox', :class => "button", :id => "close_account"
.hidden#close_account_pane{:rel => 'facebox'} .hidden#close_account_pane{:rel => 'facebox'}
#inner_account_delete #inner_account_delete
@ -222,4 +212,4 @@
= f.label :close_account_password, t('.current_password'), :for => :close_account_password = f.label :close_account_password, t('.current_password'), :for => :close_account_password
= f.password_field :current_password, :id => :close_account_password = f.password_field :current_password, :id => :close_account_password
%p %p
= f.submit t('.close_account_text'), :data => { :confirm => t('are_you_sure_delete_account') } = f.submit t('.close_account_text'), :id => "close_account_confirm", :data => { :confirm => t('are_you_sure_delete_account') }

View file

@ -72,12 +72,19 @@
= form_for current_user, :url => user_path, :html => { :method => :put } do |f| = form_for current_user, :url => user_path, :html => { :method => :put } do |f|
= f.error_messages = f.error_messages
%p.checkbox_select = f.fields_for :stream_preferences do |type|
= f.label :show_community_spotlight_in_stream, t('.show_community_spotlight') #stream_prefs
= f.check_box :show_community_spotlight_in_stream %p.checkbox_select
= f.label :show_community_spotlight_in_stream, t('.show_community_spotlight')
= f.check_box :show_community_spotlight_in_stream
%br %br
= f.submit t('.change'), :class => 'btn' %p.checkbox_select
= f.label :getting_started, t('.show_getting_started')
= f.check_box :getting_started
%br
= f.submit t('.change'), :class => 'button'
%hr %hr
@ -99,19 +106,6 @@
%hr %hr
%h4#getting-started-preferences
= t('.show_getting_started')
= form_for current_user, :url => user_path, :html => { :method => :put } do |f|
= f.error_messages
%p.checkbox_select
= f.label :getting_started, t('.show_getting_started')
= f.check_box :getting_started
%br
= f.submit t('.change'), :class => 'btn'
%hr
%h4 %h4
= t('.receive_email_notifications') = t('.receive_email_notifications')
= form_for 'user', :url => user_path, :html => { :method => :put } do |f| = form_for 'user', :url => user_path, :html => { :method => :put } do |f|
@ -119,41 +113,42 @@
= f.fields_for :email_preferences do |type| = f.fields_for :email_preferences do |type|
#email_prefs #email_prefs
%p.checkbox_select
= type.label :also_commented, t('.also_commented')
= type.check_box :also_commented, {:checked => @email_prefs['also_commented']}, false, true
%br
%p.checkbox_select
= type.label :mentioned, t('.mentioned')
= type.check_box :mentioned, {:checked => @email_prefs['mentioned']}, false, true
%br
%p.checkbox_select
= type.label :comment_on_post, t('.comment_on_post')
= type.check_box :comment_on_post, {:checked => @email_prefs['comment_on_post']}, false, true
%br
%p.checkbox_select
= type.label :private_message, t('.private_message')
= type.check_box :private_message, {:checked => @email_prefs['private_message']}, false, true
%br
%p.checkbox_select %p.checkbox_select
= type.label :started_sharing, t('.started_sharing') = type.label :started_sharing, t('.started_sharing')
= type.check_box :started_sharing, {:checked => @email_prefs['started_sharing']}, false, true = type.check_box :started_sharing, {:checked => @email_prefs['started_sharing']}, false, true
%br %br
%p.checkbox_select
= type.label :mentioned, t('.mentioned')
= type.check_box :mentioned, {:checked => @email_prefs['mentioned']}, false, true
%br
%p.checkbox_select %p.checkbox_select
= type.label :liked, t('.liked') = type.label :liked, t('.liked')
= type.check_box :liked, {:checked => @email_prefs['liked']}, false, true = type.check_box :liked, {:checked => @email_prefs['liked']}, false, true
%br %br
%p.checkbox_select %p.checkbox_select
= type.label :reshared, t('.reshared') = type.label :reshared, t('.reshared')
= type.check_box :reshared, {:checked => @email_prefs['reshared']}, false, true = type.check_box :reshared, {:checked => @email_prefs['reshared']}, false, true
%br
%p.checkbox_select
= type.label :comment_on_post, t('.comment_on_post')
= type.check_box :comment_on_post, {:checked => @email_prefs['comment_on_post']}, false, true
%br
%p.checkbox_select
= type.label :also_commented, t('.also_commented')
= type.check_box :also_commented, {:checked => @email_prefs['also_commented']}, false, true
%br
%p.checkbox_select
= type.label :private_message, t('.private_message')
= type.check_box :private_message, {:checked => @email_prefs['private_message']}, false, true
%br %br
= f.submit t('.change'), :class => "btn" = f.submit t('.change'), :class => "button"
%hr %hr
@ -168,7 +163,7 @@
.span-5.last .span-5.last
%h4 %h4
= t('.close_account_text') = t('.close_account_text')
=link_to t('.close_account_text'), '#close_account_pane', :rel => 'facebox', :class => "btn" =link_to t('.close_account_text'), '#close_account_pane', :rel => 'facebox', :class => "btn", :id => "close_account"
.hidden#close_account_pane{:rel => 'facebox'} .hidden#close_account_pane{:rel => 'facebox'}
#inner_account_delete #inner_account_delete
@ -202,4 +197,4 @@
= f.label :close_account_password, t('.current_password'), :for => :close_account_password = f.label :close_account_password, t('.current_password'), :for => :close_account_password
= f.password_field :current_password, :id => :close_account_password = f.password_field :current_password, :id => :close_account_password
%p %p
= f.submit t('.close_account_text'), :data => { :confirm => t('are_you_sure_delete_account') } = f.submit t('.close_account_text'), :id => "close_account_confirm", :data => { :confirm => t('are_you_sure_delete_account') }

View file

@ -902,7 +902,7 @@ en:
your_bio: "Your bio" your_bio: "Your bio"
your_location: "Your location" your_location: "Your location"
your_photo: "Your photo" your_photo: "Your photo"
update_profile: "Update Profile" update_profile: "Update profile"
allow_search: "Allow for people to search for you within diaspora*" allow_search: "Allow for people to search for you within diaspora*"
edit_profile: "Edit profile" edit_profile: "Edit profile"
nsfw_explanation: "NSFW (not safe for work) is diaspora*s self-governing community standard for content which may not be suitable to view while at work. If you plan to share such material frequently, please check this option so that everything you share will be hidden from peoples streams unless they choose to view them." nsfw_explanation: "NSFW (not safe for work) is diaspora*s self-governing community standard for content which may not be suitable to view while at work. If you plan to share such material frequently, please check this option so that everything you share will be hidden from peoples streams unless they choose to view them."
@ -1189,9 +1189,9 @@ en:
title: "My Activity" title: "My Activity"
users: users:
edit: edit:
export_data: "Export Data" export_data: "Export data"
photo_export_unavailable: "Photo exporting currently unavailable" photo_export_unavailable: "Photo exporting currently unavailable"
close_account_text: "Close Account" close_account_text: "Close account"
change_language: "Change language" change_language: "Change language"
change_password: "Change password" change_password: "Change password"
change_email: "Change email" change_email: "Change email"
@ -1204,23 +1204,23 @@ en:
your_handle: "Your diaspora* ID" your_handle: "Your diaspora* ID"
your_email: "Your email" your_email: "Your email"
edit_account: "Edit account" edit_account: "Edit account"
receive_email_notifications: "Receive email notifications when..." receive_email_notifications: "Receive email notifications when:"
also_commented: "...someone also comments on your contact's post?" started_sharing: "someone starts sharing with you"
comment_on_post: "...someone comments on your post?" mentioned: "you are mentioned in a post"
mentioned: "...you are mentioned in a post?" liked: "someone likes your post"
started_sharing: "...someone starts sharing with you?" reshared: "someone reshares your post"
private_message: "...you receive a private message?" comment_on_post: "someone comments on your post"
liked: "...someone likes your post?" also_commented: "someone comments on a post you've commented on"
reshared: "...someone reshares your post?" private_message: "you receive a private message"
change: "Change" change: "Change"
email_awaiting_confirmation: "We have sent you an activation link to %{unconfirmed_email}. Until you follow this link and activate the new address, we will continue to use your original address %{email}." email_awaiting_confirmation: "We have sent you an activation link to %{unconfirmed_email}. Until you follow this link and activate the new address, we will continue to use your original address %{email}."
stream_preferences: "Stream Preferences" stream_preferences: "Stream preferences"
show_community_spotlight: "Show Community Spotlight in Stream?" show_community_spotlight: "Show Community Spotlight in stream"
show_getting_started: 'Re-enable Getting Started' show_getting_started: 'Show Getting Started hints'
getting_started: 'New User Prefrences' getting_started: 'New user preferences'
following: "Following Settings" following: "Sharing settings"
auto_follow_back: "Automatically follow back if someone follows you" auto_follow_back: "Automatically share with users who start sharing with you"
auto_follow_aspect: "Aspect for automatically followed users:" auto_follow_aspect: "Aspect for automatically added contacts:"
close_account: close_account:
dont_go: "Hey, please don't go!" dont_go: "Hey, please don't go!"

View file

@ -1,5 +1,5 @@
@javascript @javascript
Feature: Close Account Feature: Close account
In order to close an existing account In order to close an existing account
As a user As a user
I want to sign in, close my account and try to log in again I want to sign in, close my account and try to log in again
@ -7,15 +7,15 @@ Feature: Close Account
Scenario: user closes account Scenario: user closes account
Given I am signed in Given I am signed in
When I go to the users edit page When I go to the users edit page
And I follow "Close Account" And I follow "close_account"
And I put in my password in "close_account_password" in the modal window And I put in my password in "close_account_password" in the modal window
And I press "Close Account" in the modal window And I press "close_account_confirm" in the modal window
And I confirm the alert And I confirm the alert
Then I should be on the new user session page Then I should be on the new user session page
When I try to sign in manually When I try to sign in manually
Then I should be on the new user session page Then I should be on the new user session page
And I should see a flash message containing "Invalid username or password" And I should see a flash message with a warning
Scenario: post display should not throw error when mention is removed for the user whose account is closed Scenario: post display should not throw error when mention is removed for the user whose account is closed
Given following users exist: Given following users exist:
@ -27,9 +27,9 @@ Feature: Close Account
Then I sign in as "bob@bob.bob" Then I sign in as "bob@bob.bob"
When I go to the users edit page When I go to the users edit page
And I follow "Close Account" And I follow "close_account"
And I put in my password in "close_account_password" in the modal window And I put in my password in "close_account_password" in the modal window
And I press "Close Account" in the modal window And I press "close_account_confirm" in the modal window
And I confirm the alert And I confirm the alert
Then I sign in as "alice@alice.alice" Then I sign in as "alice@alice.alice"
And I am on the home page And I am on the home page

View file

@ -18,10 +18,10 @@ Feature: editing your profile
And I fill in "profile[tag_string]" with "#starwars" And I fill in "profile[tag_string]" with "#starwars"
And I press the first ".as-result-item" within ".as-results" And I press the first ".as-result-item" within ".as-results"
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 edit profile page
And I should see "Profile updated" And I should see a flash message indicating success
And the "profile_gender" field should contain "Fearless" And the "profile_gender" field should contain "Fearless"
And the "profile_first_name" field should contain "Boba" And the "profile_first_name" field should contain "Boba"
And the "profile_last_name" field should contain "Fett" And the "profile_last_name" field should contain "Fett"
@ -35,7 +35,7 @@ Feature: editing your profile
When I fill in "profile[tag_string]" with "#kamino" When I fill in "profile[tag_string]" with "#kamino"
And I press the first ".as-result-item" within ".as-results" And I press the first ".as-result-item" within ".as-results"
And I press "Update Profile" And I press "update_profile"
Then I should see "#kamino" within "ul#as-selections-tags" Then I should see "#kamino" within "ul#as-selections-tags"
And I should see "#starwars" within "ul#as-selections-tags" And I should see "#starwars" within "ul#as-selections-tags"

View file

@ -19,7 +19,7 @@ Feature: editing the profile in the mobile view
And I fill in "profile[tag_string]" with "#starwars" And I fill in "profile[tag_string]" with "#starwars"
And I press the first ".as-result-item" within ".as-results" And I press the first ".as-result-item" within ".as-results"
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 edit profile page
And I should see "Profile updated" And I should see "Profile updated"
@ -36,7 +36,7 @@ Feature: editing the profile in the mobile view
When I fill in "profile[tag_string]" with "#kamino" When I fill in "profile[tag_string]" with "#kamino"
And I press the first ".as-result-item" within ".as-results" And I press the first ".as-result-item" within ".as-results"
And I press "Update Profile" And I press "Update profile"
Then I should see "#kamino" within "ul#as-selections-tags" Then I should see "#kamino" within "ul#as-selections-tags"
And I should see "#starwars" within "ul#as-selections-tags" And I should see "#starwars" within "ul#as-selections-tags"

View file

@ -245,6 +245,14 @@ Then /^I should see a flash message indicating success$/ do
flash_message_success?.should be_true flash_message_success?.should be_true
end end
Then /^I should see a flash message indicating failure$/ do
flash_message_failure?.should be_true
end
Then /^I should see a flash message with a warning$/ do
flash_message_alert?.should be_true
end
Then /^I should see a flash message containing "(.+)"$/ do |text| Then /^I should see a flash message containing "(.+)"$/ do |text|
flash_message_containing? text flash_message_containing? text
end end

View file

@ -7,6 +7,10 @@ module ApplicationCukeHelpers
flash_message(selector: "error").visible? flash_message(selector: "error").visible?
end end
def flash_message_alert?
flash_message(selector: "alert").visible?
end
def flash_message_containing?(text) def flash_message_containing?(text)
flash_message(text: text).should be_visible flash_message(text: text).should be_visible
end end