Most of the way towards getting posts feature working

This commit is contained in:
Raphael Sofaer 2011-08-11 18:15:18 -07:00
parent e2b16ab16f
commit 56fc409a39
4 changed files with 12 additions and 8 deletions

View file

@ -3,7 +3,7 @@
// the COPYRIGHT file.
var dropdown = $("ul.dropdown_list[data-person_id=<%= @person.id %>]")
$('.newItem', dropdown).before("<%= escape_javascript( render('shared/aspect_dropdown_list_item', :aspect => @aspect, :person => @person, :contact => @contact)) %>");
$('.newItem', dropdown).before("<%= escape_javascript( aspect_dropdown_list_item(@aspect, @contact.aspects.include?(@aspect))) %>");
ContactEdit.updateNumber(dropdown, "<%= @person.id %>", <%= @contact.aspects.size %>);
$.facebox.close();

View file

@ -1,6 +0,0 @@
-# Copyright (c) 2011, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
= aspect_dropdown_list_item(aspect, contact, person)

View file

@ -154,7 +154,8 @@ Feature: posting
And I click "Mention" button
And I expand the publisher in the modal window
And I append "I am eating a yogurt" to the publisher
And I follow "DidntPostTo" within "#publisher" in the modal window
And I press the aspect dropdown in the modal window
And I toggle the aspect "DidntPostTo" in the modal window
And I press "Share" in the modal window
And I am on the aspects page
And I follow "<aspect>" within "#aspect_nav"

View file

@ -11,6 +11,15 @@ And /^I expand the publisher$/ do
')
end
When /^I press the aspect dropdown$/ do
find('.dropdown .button').click
end
And /^I toggle the aspect "([^"]*)"$/ do |aspect_name|
aspect = @me.aspects.where(:name => aspect_name).first
find("li[data-aspect_id='#{aspect.id}']").click
end
Then /^the publisher should be collapsed$/ do
find("#publisher")["class"].should include("closed")
end