fixed all rspec/cucumber
This commit is contained in:
parent
6ca0b0014b
commit
6cc5d6e3ab
10 changed files with 47 additions and 29 deletions
|
|
@ -86,7 +86,7 @@ class AspectsController < ApplicationController
|
||||||
@post_hashes = hashes_for_posts @posts
|
@post_hashes = hashes_for_posts @posts
|
||||||
@post_count = @posts.count
|
@post_count = @posts.count
|
||||||
|
|
||||||
respond_with @aspect
|
redirect_to aspects_path('a_ids[]' => @aspect.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,10 @@
|
||||||
= link_to t('contacts', :count => @contacts.count), aspects_manage_path, :title => t('aspects.manage.manage_aspects')
|
= link_to t('contacts', :count => @contacts.count), aspects_manage_path, :title => t('aspects.manage.manage_aspects')
|
||||||
|
|
||||||
= @aspect_hashes.count
|
= @aspect_hashes.count
|
||||||
= t('_aspects')
|
- if @aspect_hashes.count == 1
|
||||||
|
= t('_aspect')
|
||||||
|
- else
|
||||||
|
= t('_aspects')
|
||||||
|
|
||||||
%ul
|
%ul
|
||||||
- for a_hash in aspect_hashes
|
- for a_hash in aspect_hashes
|
||||||
|
|
|
||||||
|
|
@ -32,3 +32,10 @@
|
||||||
= link_to 'rename', '#'
|
= link_to 'rename', '#'
|
||||||
\/
|
\/
|
||||||
= link_to 'delete', @aspect, :method => "delete", :confirm => t('.confirm_remove_aspect')
|
= link_to 'delete', @aspect, :method => "delete", :confirm => t('.confirm_remove_aspect')
|
||||||
|
|
||||||
|
|
||||||
|
#rename_aspect
|
||||||
|
= form_for @aspect do |asp|
|
||||||
|
= asp.text_field :name, :value => @aspect.name
|
||||||
|
= asp.submit t('.rename_aspect')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
$('#aspect_stream_container').html("<%= escape_javascript(render('aspects/aspect_stream', :aspect => @aspect, :aspect_ids => @aspect_ids, :post_hashes => @post_hashes)) %>");
|
$('#aspect_stream_container').html("<%= escape_javascript(render('aspects/aspect_stream', :aspect => @aspect, :aspect_ids => @aspect_ids, :post_hashes => @post_hashes)) %>");
|
||||||
$('#aspect_listings').html("<%= escape_javascript(render('aspects/aspect_listings', :aspect_hashes => @aspect_hashes)) %>");
|
$('#aspect_listings').html("<%= escape_javascript(render('aspects/aspect_listings', :aspect_hashes => @aspect_hashes)) %>");
|
||||||
$('a[rel*=facebox]').facebox();
|
$('a[rel*=facebox]').facebox();
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#main_stream').infinitescroll({
|
||||||
|
navSelector : "div.pagination",
|
||||||
|
// selector for the paged navigation (it will be hidden)
|
||||||
|
nextSelector : ".pagination a.next_page",
|
||||||
|
// selector for the NEXT link (to page 2)
|
||||||
|
itemSelector : "#main_stream .stream_element",
|
||||||
|
// selector for all items you'll retrieve
|
||||||
|
bufferPx: 300,
|
||||||
|
donetext: "no more.",
|
||||||
|
loadingText: "",
|
||||||
|
loadingImg: '/images/ajax-loader.gif'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@
|
||||||
:contact => contact,
|
:contact => contact,
|
||||||
:aspects_with_person => aspects_with_person,
|
:aspects_with_person => aspects_with_person,
|
||||||
:aspects_without_person => aspects_without_person}
|
:aspects_without_person => aspects_without_person}
|
||||||
|
%br
|
||||||
|
|
||||||
- if contact
|
- if contact
|
||||||
.right
|
.right
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
{:controller => "people",
|
{:controller => "people",
|
||||||
:action => "share_with",
|
:action => "share_with",
|
||||||
:id => @person.id},
|
:id => @person.id},
|
||||||
:class => 'button',
|
:class => 'share_with button',
|
||||||
:rel => 'facebox'
|
:rel => 'facebox'
|
||||||
|
|
||||||
- else
|
- else
|
||||||
|
|
@ -61,6 +61,6 @@
|
||||||
|
|
||||||
- else
|
- else
|
||||||
#stream
|
#stream
|
||||||
%li
|
%li{:style=>"text-align:center;"}
|
||||||
%h3= t('.no_posts')
|
.dull= t('.no_posts')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,10 @@ Feature: sending and receiving requests
|
||||||
Scenario: initiating and accepting a contact request
|
Scenario: initiating and accepting a contact request
|
||||||
When I sign in as "bob@bob.bob"
|
When I sign in as "bob@bob.bob"
|
||||||
And I am on "alice@alice.alice"'s page
|
And I am on "alice@alice.alice"'s page
|
||||||
And I press the first ".add.button" within "#aspects_list ul > li:first-child"
|
And I press the first ".share_with.button" within "#author_info"
|
||||||
|
And I press the first ".add.button" within "#facebox #aspects_list ul > li:first-child"
|
||||||
And I wait for the ajax to finish
|
And I wait for the ajax to finish
|
||||||
Then I should see a ".added.button" within "#aspects_list ul > li:first-child"
|
Then I should see a ".added.button" within "#facebox #aspects_list ul > li:first-child"
|
||||||
Then I go to the destroy user session page
|
Then I go to the destroy user session page
|
||||||
|
|
||||||
When I sign in as "alice@alice.alice"
|
When I sign in as "alice@alice.alice"
|
||||||
|
|
|
||||||
|
|
@ -152,9 +152,6 @@ var Stream = {
|
||||||
$(".stream").find(".delete").live('ajax:success', function(data, html, xhr) {
|
$(".stream").find(".delete").live('ajax:success', function(data, html, xhr) {
|
||||||
$(this).parents(".status_message").fadeOut(150);
|
$(this).parents(".status_message").fadeOut(150);
|
||||||
});
|
});
|
||||||
|
|
||||||
// inf scroll
|
|
||||||
Stream.infiniteScroll($stream);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleComments: function(evt) {
|
toggleComments: function(evt) {
|
||||||
|
|
@ -198,21 +195,6 @@ var Stream = {
|
||||||
commentBlock.find('textarea').focus();
|
commentBlock.find('textarea').focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
infiniteScroll: function(stream){
|
|
||||||
stream.infinitescroll({
|
|
||||||
navSelector : "div.pagination",
|
|
||||||
// selector for the paged navigation (it will be hidden)
|
|
||||||
nextSelector : ".pagination a.next_page",
|
|
||||||
// selector for the NEXT link (to page 2)
|
|
||||||
itemSelector : "#main_stream .stream_element",
|
|
||||||
// selector for all items you'll retrieve
|
|
||||||
bufferPx: 300,
|
|
||||||
donetext: "no more.",
|
|
||||||
loadingText: "",
|
|
||||||
loadingImg: '/images/ajax-loader.gif'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -119,12 +119,12 @@ header
|
||||||
:color #111
|
:color #111
|
||||||
:color rgba(15,15,15,0.90)
|
:color rgba(15,15,15,0.90)
|
||||||
|
|
||||||
:background -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(25,25,25,0.80)), to(rgba(0,0,0,0.98)))
|
:background -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(35,35,35,0.85)), to(rgba(20,20,20,1)))
|
||||||
:background -moz-linear-gradient(top, rgba(25,25,25,0.80), rgba(0,0,0,0.98))
|
:background -moz-linear-gradient(top, rgba(35,35,35,0.85), rgba(20,20,20,0.98))
|
||||||
|
|
||||||
:-webkit-box-shadow 0 1px 3px #111
|
:-webkit-box-shadow 0 1px 3px #111
|
||||||
:-moz-box-shadow 0 1px 2px #111
|
:-moz-box-shadow 0 1px 2px #111
|
||||||
:box-shadow 0 1px 3px #111
|
:box-shadow 0 1px 3px #222
|
||||||
|
|
||||||
:border
|
:border
|
||||||
:bottom 1px solid #777
|
:bottom 1px solid #777
|
||||||
|
|
@ -1670,6 +1670,10 @@ ul#request_result
|
||||||
:-moz-box-shadow 0 1px #fff
|
:-moz-box-shadow 0 1px #fff
|
||||||
:box-shadow 0 1px #fff
|
:box-shadow 0 1px #fff
|
||||||
|
|
||||||
|
:-webkit-border-radius 0 0 5px 5px
|
||||||
|
:-moz-border-radius 0 0 5px 5px
|
||||||
|
:border-radius 0 0 5px 5px
|
||||||
|
|
||||||
input.contact_list_search
|
input.contact_list_search
|
||||||
:width 100%
|
:width 100%
|
||||||
:margin
|
:margin
|
||||||
|
|
@ -1686,6 +1690,10 @@ ul#request_result
|
||||||
:border
|
:border
|
||||||
:bottom 1px solid #eee
|
:bottom 1px solid #eee
|
||||||
|
|
||||||
|
&:last-child
|
||||||
|
:border
|
||||||
|
:bottom none
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
:background
|
:background
|
||||||
:color rgb(245,245,245)
|
:color rgb(245,245,245)
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ describe AspectsController do
|
||||||
describe "#show" do
|
describe "#show" do
|
||||||
it "succeeds" do
|
it "succeeds" do
|
||||||
get :show, 'id' => @aspect0.id.to_s
|
get :show, 'id' => @aspect0.id.to_s
|
||||||
response.should be_success
|
response.should be_redirect
|
||||||
end
|
end
|
||||||
it "assigns aspect, aspect_contacts, and posts" do
|
it "assigns aspect, aspect_contacts, and posts" do
|
||||||
get :show, 'id' => @aspect0.id.to_s
|
get :show, 'id' => @aspect0.id.to_s
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue