From 73fe74c834b4cd697cbf2a66bfc113c1c22821dd Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Mon, 27 Jun 2011 18:58:29 -0700 Subject: [PATCH] updated selenium driver to work with FF5; added translations to contacts/index; fixed cucumber --- Gemfile | 2 +- Gemfile.lock | 19 +++++++++---------- .../aspect_memberships_controller.rb | 1 - app/views/aspects/_aspect_listings.haml | 2 +- app/views/contacts/index.html.haml | 16 ++++++---------- config/locales/diaspora/en.yml | 8 +++++++- features/manages_aspects.feature | 3 ++- public/stylesheets/sass/application.sass | 2 ++ 8 files changed, 28 insertions(+), 25 deletions(-) diff --git a/Gemfile b/Gemfile index f780724f5..1c5d41ed5 100644 --- a/Gemfile +++ b/Gemfile @@ -89,7 +89,7 @@ end group :test do gem 'factory_girl_rails' gem 'fixture_builder', '~> 0.2.0' - gem 'selenium-webdriver', '0.1.3' + gem 'selenium-webdriver', '0.2.2' gem 'capybara', '~> 0.3.9' gem 'cucumber-rails', '0.3.2' gem 'rspec', '>= 2.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index a8ff7a3a0..8e0de7ceb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -114,8 +114,8 @@ GEM ohai (>= 0.5.7) rest-client (< 1.7.0, >= 1.0.4) uuidtools - childprocess (0.1.7) - ffi (~> 0.6.3) + childprocess (0.1.9) + ffi (~> 1.0.6) closure-compiler (1.1.1) cloudfiles (1.4.10) mime-types (>= 1.16) @@ -160,8 +160,7 @@ GEM faraday (~> 0.6.0) fastercsv (1.5.4) fastthread (1.0.7) - ffi (0.6.3) - rake (>= 0.8.7) + ffi (1.0.9) fixture_builder (0.2.2) fog (0.3.25) builder @@ -201,7 +200,7 @@ GEM rspec (>= 1.3.1) selenium-webdriver (>= 0.1.3) json (1.4.6) - json_pure (1.5.1) + json_pure (1.5.3) launchy (0.4.0) configuration (>= 0.0.5) rake (>= 0.8.1) @@ -308,7 +307,7 @@ GEM activesupport (= 3.0.3) rake (>= 0.8.7) thor (~> 0.14.4) - rake (0.9.1) + rake (0.9.2) rash (0.3.0) hashie (~> 1.0.0) rcov (0.9.9) @@ -348,9 +347,9 @@ GEM ruby-progressbar (0.0.10) rubyntlm (0.1.1) rubyzip (0.9.4) - selenium-webdriver (0.1.3) - childprocess (~> 0.1.5) - ffi (~> 0.6.3) + selenium-webdriver (0.2.2) + childprocess (>= 0.1.9) + ffi (>= 1.0.7) json_pure rubyzip settingslogic (2.0.6) @@ -449,7 +448,7 @@ DEPENDENCIES rspec-instafail (>= 0.1.7) rspec-rails (>= 2.0.0) ruby-debug - selenium-webdriver (= 0.1.3) + selenium-webdriver (= 0.2.2) settingslogic (= 2.0.6) sod! thin (= 1.2.11) diff --git a/app/controllers/aspect_memberships_controller.rb b/app/controllers/aspect_memberships_controller.rb index df33c15fd..da6da2d18 100644 --- a/app/controllers/aspect_memberships_controller.rb +++ b/app/controllers/aspect_memberships_controller.rb @@ -21,7 +21,6 @@ class AspectMembershipsController < ApplicationController flash.now[:notice] = I18n.t 'aspect_memberships.destroy.success' respond_to do |format| - format.all {} format.html{ redirect_to :back } diff --git a/app/views/aspects/_aspect_listings.haml b/app/views/aspects/_aspect_listings.haml index 3dedfa3bc..f765d3d92 100644 --- a/app/views/aspects/_aspect_listings.haml +++ b/app/views/aspects/_aspect_listings.haml @@ -4,7 +4,7 @@ %h4 .right - = link_to t('contacts', :count => @contact_count), contacts_path , :title => t('contacts.index.title') + = link_to t('contacts', :count => @contact_count), contacts_path , :title => t('contacts.index.your_contacts') = t('aspects', :count => aspects.count) diff --git a/app/views/contacts/index.html.haml b/app/views/contacts/index.html.haml index 3e0fc25db..9f3f58764 100644 --- a/app/views/contacts/index.html.haml +++ b/app/views/contacts/index.html.haml @@ -3,10 +3,6 @@ -# the COPYRIGHT file. -:javascript - $(document).ready(function(){ - }); - - content_for :page_title do = t('.title') @@ -20,7 +16,7 @@ %a{:href => contacts_path, :class => ("sub_selected" if params["a_id"])} .contact_count = @my_contacts_count - My Contacts + = t('.my_contacts') %ul.sub_nav - for aspect in all_aspects @@ -30,20 +26,20 @@ = aspect.contacts.count = aspect %li - = link_to "+ Add new aspect", "#add_aspect_pane", :class => "new_aspect", :rel => "facebox" + = link_to "+ Add an aspect", "#add_aspect_pane", :class => "new_aspect", :rel => "facebox" %li{:class => ("active" if params["set"] == "all" || params["set"] == "only_sharing")} %a{:href => contacts_path(:set => "all"), :class => ("sub_selected" if params["set"] == "only_sharing")} .contact_count = @all_contacts_count - All Contacts + = t('.all_contacts') %ul.sub_nav %li{:class => ("active" if params["set"] == "only_sharing")} %a{:href => contacts_path(:set => "only_sharing")} .contact_count = @only_sharing_count - Only sharing with me + = t('.only_sharing_with_me') .span-15 #people_stream.stream.contacts @@ -58,7 +54,7 @@ :id => 42, :aspect_id => @aspect_.id, :person_id => contact.person.id}, - :title => "Remove #{contact.person.first_name} from \"#{@aspect_.name}\"", + :title => t('.remove_person_from_aspect', :person_name => contact.person.first_name, :aspect_name => @aspect_.name), :method => 'delete') - else @@ -75,6 +71,6 @@ - else %h3.no_contacts - No contacts. + = t('.no_contacts') = will_paginate @contacts diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index df83b1abe..05bdb2213 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -184,7 +184,13 @@ en: people_sharing: "People sharing with you:" index: add_a_new_aspect: "Add a new aspect" - title: "Your Contacts" + title: "Contacts" + your_contacts: "Your Contacts" + no_contacts: "No contacts." + my_contacts: "My Contacts" + all_contacts: "All Contacts" + only_sharing_with_me: "Only sharing with me" + remove_person_from_aspect: "Remove %{person_name} from \"%{aspect_name}\"" conversations: index: diff --git a/features/manages_aspects.feature b/features/manages_aspects.feature index f993164d3..f42a81299 100644 --- a/features/manages_aspects.feature +++ b/features/manages_aspects.feature @@ -8,7 +8,8 @@ Feature: User manages contacts Given I am signed in When I follow "All Aspects" in the header And I follow "Your Contacts" - And I follow "+ Add a new aspect" + And I follow "My Contacts" + And I follow "+ Add an aspect" And I fill in "Name" with "Dorm Mates" in the modal window And I press "Create" in the modal window Then I should see "Dorm Mates" in the header diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index ea6b3b48f..ea09f9d61 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -2973,6 +2973,8 @@ ul#left_nav :padding 3px 7px &:hover + @include border-radius(4px) + :background :color lighten($blue,45%) :text