fixed all cucumber tests

This commit is contained in:
danielvincent 2011-01-07 16:44:27 -08:00
parent 98bcad5c59
commit c74dc120df
14 changed files with 62 additions and 44 deletions

View file

@ -16,6 +16,11 @@ class AspectsController < ApplicationController
@aspects = current_user.aspects
end
# redirect to signup
if current_user.getting_started == true || @aspects.blank?
redirect_to getting_started_path
else
@aspect_ids = @aspects.map{|a| a.id}
post_ids = @aspects.map{|a| a.post_ids}.flatten!
@ -28,8 +33,6 @@ class AspectsController < ApplicationController
@aspect = :all unless params[:a_ids]
if current_user.getting_started == true
redirect_to getting_started_path
end
end

View file

@ -5,7 +5,7 @@
%h4
.right
= link_to t('contacts', :count => @contacts.count), aspects_manage_path
= link_to t('contacts', :count => @contacts.count), aspects_manage_path, :title => t('aspects.manage.manage_aspects')
= @aspect_hashes.count
= t('_aspects')

View file

@ -3,10 +3,7 @@
-# the COPYRIGHT file.
#no_contacts.floating.empty_message{:style => ("display:none" unless contact_count == 0)}
- if aspect == :all
%h3=t('.nobody')
- if current_user.invites > 0
%h4= link_to t('.invite'), new_user_invitation_path
- else
%h3=t('.nobody_in_aspect', :aspect_name => aspect.name)

View file

@ -8,14 +8,9 @@
#aspect_edit_pane
#aspect_edit_pane_header
%h4
.right.description
= "#{@aspect_contacts.count} contacts"
= @aspect
= link_to 'rename', '#'
\.
\.
= link_to 'delete', @aspect, :method => "delete", :confirm => t('.confirm_remove_aspect')
.description
= "#{@aspect_contacts.count} contacts"
.person_tiles{:style => "display:none;"}
- for contact in @aspect.contacts
@ -32,3 +27,8 @@
- if @contacts.count > 0
= render 'shared/contact_list', :aspect_id => @aspect.id, :contact_hashes => @all_contacts
#aspect_edit_controls
= link_to 'rename', '#'
\/
= link_to 'delete', @aspect, :method => "delete", :confirm => t('.confirm_remove_aspect')

View file

@ -7,7 +7,7 @@
= include_javascripts :home
.span-15.append-2
/= render 'aspects/no_contacts_message', :aspect => @aspect, :contact_count => @contacts.count
= render 'aspects/no_contacts_message', :aspect => @aspect, :contact_count => @contacts.count
#aspect_stream_container
= render 'aspect_stream',
@ -18,7 +18,7 @@
.span-7.last
#home_user_badge
= owner_image_link
%h3{:style => "position:relative;display:inline-block;margin-left:12px;top:-8px;"}
%h3{:style => "position:relative;"}
= current_user.name
.description
= link_to current_user.diaspora_handle, person_path(current_user.person)

View file

@ -9,9 +9,11 @@
= t('.manage_aspects')
#section_header
%h2=t('.manage_aspects')
.right{:style=>"top:0;"}
= link_to("+ #{t('.add_a_new_aspect')}", "#add_aspect_pane", :class => "new_aspect add_aspect_button button", :title => t('.add_a_new_aspect'))
.right
= link_to("+ #{t('.add_a_new_aspect')}", "#add_aspect_pane", :class => "new_aspect button", :title => t('.add_a_new_aspect'), :rel => 'facebox')
%h2
=t('.manage_aspects')
#manage_aspect_zones
.span-4.append-1.last

View file

@ -23,7 +23,6 @@
.span-15.last
= render 'shared/publisher', :aspect => @aspect
= render 'aspects/no_contacts_message', :aspect => @aspect, :contact_count => @aspect_contacts_count, :options => false
#main_stream.stream{:data => {:guids => @aspect.id}}
= render 'shared/stream', :posts => @post_hashes

View file

@ -7,7 +7,7 @@ Feature: User manages aspects
Scenario: creating an aspect
Given I am signed in
When I follow "Home" in the header
And I follow "manage aspects"
And I follow "Manage aspects"
And I follow "+ Add a new aspect"
And I fill in "Name" with "Dorm Mates" in the modal window
And I press "Create" in the modal window

View file

@ -5,7 +5,7 @@ When /^(.*) in the header$/ do |action|
end
When /^(.*) in the modal window$/ do |action|
within('#fancybox-wrap') do
within('#facebox') do
When action
end
end

View file

@ -11,7 +11,7 @@ end
Given 'I am signed in' do
@me ||= Factory(:user, :getting_started => false)
@me ||= Factory(:user_with_aspect, :getting_started => false)
When %(I go to the new user session page)
When %(I fill in "Username" with "#{@me.username}")
When %(I fill in "Password" with "#{@me.password}")

View file

@ -1,6 +1,7 @@
Given /^a user with username "([^\"]*)" and password "([^\"]*)"$/ do |username, password|
Factory(:user, :username => username, :password => password,
user = Factory(:user, :username => username, :password => password,
:password_confirmation => password, :getting_started => false)
user.aspects.create(:name => "Besties")
end
Given /^a user with email "([^\"]*)"$/ do |email|

BIN
public/images/facebox/closelabel.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 140 B

View file

@ -120,7 +120,7 @@ header
:color #111
:color rgba(30,30,30,0.98)
:background -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(25,25,25,0.83)), to(rgba(0,0,0,0.98)))
:background -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(25,25,25,0.80)), to(rgba(0,0,0,0.98)))
:-webkit-box-shadow 0 1px 3px #111
:-moz-box-shadow 0 1px 2px #111
@ -738,6 +738,7 @@ label
:cursor pointer
#publisher
:z-index 0
:color #999
:position relative
:margin
@ -2138,6 +2139,8 @@ ul.show_comments
h4
:color #eee
:margin
:bottom 0
:width 400px
.person_tiles
@ -2159,10 +2162,21 @@ ul.show_comments
:position absolute
:left 6px
#home_user_badge
h3
#aspect_edit_controls
:margin
:bottom 0
:top 8px
#home_user_badge
:position relative
img
:position absolute
:left 0
h3
:position relative
:top 4px
:margin
:bottom 2em
:padding
@ -2171,3 +2185,6 @@ ul.show_comments
:border
:bottom 1px solid #ccc
:padding
:left 60px

View file

@ -37,10 +37,9 @@
#facebox .close{
position:absolute;
top:5px;
right:5px;
top:15px;
right:20px;
padding:2px;
background:#fff;
}
#facebox .close img{
opacity:0.3;