fixed all cucumber tests
This commit is contained in:
parent
98bcad5c59
commit
c74dc120df
14 changed files with 62 additions and 44 deletions
|
|
@ -16,20 +16,23 @@ class AspectsController < ApplicationController
|
|||
@aspects = current_user.aspects
|
||||
end
|
||||
|
||||
@aspect_ids = @aspects.map{|a| a.id}
|
||||
post_ids = @aspects.map{|a| a.post_ids}.flatten!
|
||||
|
||||
@posts = Post.where(:id.in => post_ids, :_type => "StatusMessage").paginate :page => params[:page], :per_page => 15, :order => 'created_at DESC'
|
||||
@post_hashes = hashes_for_posts @posts
|
||||
|
||||
@contacts = Contact.all(:aspect_ids.in => @aspect_ids, :user_id => current_user.id, :pending => false)
|
||||
@contact_hashes = hashes_for_contacts @contacts
|
||||
@aspect_hashes = hashes_for_aspects @aspects, @contacts, :limit => 8
|
||||
|
||||
@aspect = :all unless params[:a_ids]
|
||||
|
||||
if current_user.getting_started == true
|
||||
# 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!
|
||||
|
||||
@posts = Post.where(:id.in => post_ids, :_type => "StatusMessage").paginate :page => params[:page], :per_page => 15, :order => 'created_at DESC'
|
||||
@post_hashes = hashes_for_posts @posts
|
||||
|
||||
@contacts = Contact.all(:aspect_ids.in => @aspect_ids, :user_id => current_user.id, :pending => false)
|
||||
@contact_hashes = hashes_for_contacts @contacts
|
||||
@aspect_hashes = hashes_for_aspects @aspects, @contacts, :limit => 8
|
||||
|
||||
@aspect = :all unless params[:a_ids]
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
%h3=t('.nobody')
|
||||
- if current_user.invites > 0
|
||||
%h4= link_to t('.invite'), new_user_invitation_path
|
||||
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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}")
|
||||
|
|
|
|||
|
|
@ -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
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 |
|
|
@ -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
|
||||
|
||||
#aspect_edit_controls
|
||||
:margin
|
||||
:top 8px
|
||||
|
||||
#home_user_badge
|
||||
:position relative
|
||||
|
||||
img
|
||||
:position absolute
|
||||
:left 0
|
||||
|
||||
h3
|
||||
:margin
|
||||
:bottom 0
|
||||
:position relative
|
||||
:top 4px
|
||||
|
||||
:margin
|
||||
:bottom 2em
|
||||
:padding
|
||||
|
|
@ -2171,3 +2185,6 @@ ul.show_comments
|
|||
:border
|
||||
:bottom 1px solid #ccc
|
||||
|
||||
:padding
|
||||
:left 60px
|
||||
|
||||
|
|
|
|||
7
public/stylesheets/vendor/facebox.css
vendored
7
public/stylesheets/vendor/facebox.css
vendored
|
|
@ -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;
|
||||
|
|
@ -77,4 +76,4 @@
|
|||
.facebox_overlayBG {
|
||||
background-color: #000;
|
||||
z-index: 99;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue