fixed 14 cukes (all comments features)
This commit is contained in:
parent
21eba82e76
commit
039df8f879
8 changed files with 19 additions and 10 deletions
|
|
@ -35,6 +35,7 @@ class PostsController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.xml{ render :xml => @post.to_diaspora_xml }
|
||||
format.mobile{render 'posts/show.mobile.haml'}
|
||||
format.json{ render :json => {:posts => @post.as_api_response(:backbone)}, :status => 201 }
|
||||
format.any{render 'posts/show.html.haml'}
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
.span-20.append-2.prepend-2.last
|
||||
|
||||
#main_stream.stream.status_message_show
|
||||
- if @post.is_a?(Photo)
|
||||
= render 'posts/photo', :post => @post
|
||||
- else
|
||||
= render 'shared/stream_element', :post => @post, :commenting_disabled => commenting_disabled?(@post)
|
||||
/- if @post.is_a?(Photo)
|
||||
/ = render 'posts/photo', :post => @post
|
||||
/- else
|
||||
/ = render 'shared/stream_element', :post => @post, :commenting_disabled => commenting_disabled?(@post)
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
<div class="right controls">
|
||||
<!-- need access to post -->
|
||||
<% if(author.id === current_user.id) { %>
|
||||
<img alt="Deletelabel" src="/images/deletelabel.png" class="delete comment_delete" data-original-title="Delete" />
|
||||
<a href="#" class="delete comment_delete" title="Delete">
|
||||
<img alt="Deletelabel" src="/images/deletelabel.png" />
|
||||
<a/>
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ Feature: commenting
|
|||
Then I should see "hahaha" within "li.comment div.content"
|
||||
And I should see "less than a minute ago" within "li.comment time"
|
||||
|
||||
Scenario: delete a comment
|
||||
Scenario: delete a comment
|
||||
When I sign in as "bob@bob.bob"
|
||||
And I am on "alice@alice.alice"'s page
|
||||
Then I should see "Look at this dog"
|
||||
|
|
@ -48,7 +48,7 @@ Feature: commenting
|
|||
And I fill in "Comment" with "is that a poodle?"
|
||||
And I press "Comment"
|
||||
And I wait for the ajax to finish
|
||||
When I hover over the ".comment.posted"
|
||||
When I hover over the ".comment"
|
||||
And I preemptively confirm the alert
|
||||
And I click to delete the first comment
|
||||
And I wait for the ajax to finish
|
||||
|
|
@ -66,7 +66,7 @@ Feature: commenting
|
|||
Then the first comment field should be closed
|
||||
When I focus the comment field
|
||||
Then the first comment field should be open
|
||||
|
||||
|
||||
Scenario: comment on a status show page
|
||||
When I sign in as "bob@bob.bob"
|
||||
And I am on "alice@alice.alice"'s page
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ end
|
|||
|
||||
When /^I select only "([^"]*)" aspect$/ do |aspect_name|
|
||||
within('#aspect_nav') do
|
||||
click_link 'Aspects'
|
||||
click_link 'Select all' if has_link? 'Select all'
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ When /^I click to delete the first post$/ do
|
|||
end
|
||||
|
||||
When /^I click to delete the first comment$/ do
|
||||
page.execute_script('$(".comment.posted").first().find(".comment_delete").click()')
|
||||
page.execute_script('$(".comment").first().find(".comment_delete").click()')
|
||||
end
|
||||
|
||||
When /^I click to delete the first uploaded photo$/ do
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ App.Router = Backbone.Router.extend({
|
|||
"mentions": "stream",
|
||||
"people/:id": "stream",
|
||||
"tag_followings": "stream",
|
||||
"tags/:name": "stream"
|
||||
"tags/:name": "stream",
|
||||
"posts/:id": "stream"
|
||||
},
|
||||
|
||||
stream: function() {
|
||||
|
|
|
|||
|
|
@ -4,5 +4,9 @@ App.Views.Comment = App.Views.StreamObject.extend({
|
|||
|
||||
events : {
|
||||
"click .comment_delete": "destroyModel"
|
||||
},
|
||||
|
||||
postRenderTemplate : function(){
|
||||
this.$("time").timeago();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue