auto expand post preview
This commit is contained in:
parent
1639ae2b31
commit
8a8fb10b18
5 changed files with 21 additions and 0 deletions
|
|
@ -25,6 +25,7 @@
|
|||
* Change image to ajax-loader when closing lightbox [#3229](https://github.com/diaspora/diaspora/issues/3229)
|
||||
* Fix pointer cursor on the file upload button [#4349](https://github.com/diaspora/diaspora/pull/4349)
|
||||
* Resize preview button [#4355](https://github.com/diaspora/diaspora/pull/4355)
|
||||
* Don't collapse the post preview [#4346](https://github.com/diaspora/diaspora/issues/4346)
|
||||
|
||||
## Features
|
||||
* Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252)
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ app.views.Publisher = Backbone.View.extend(_.extend(
|
|||
|
||||
modifyPostPreview : function(post) {
|
||||
post.addClass('post_preview');
|
||||
$('.collapsible',post).removeClass('collapsed').addClass('opened');
|
||||
$('a.delete.remove_post',post).hide();
|
||||
$('a.like, a.focus_comment_textarea',post).removeAttr("href");
|
||||
$('a.like',post).addClass("like_preview");
|
||||
|
|
|
|||
|
|
@ -34,6 +34,15 @@ Feature: preview posts in the stream
|
|||
Then "I like rocks" should be post 1
|
||||
And I should not see "This preview rocks"
|
||||
|
||||
Scenario: preview a very long message
|
||||
Given I expand the publisher
|
||||
When I insert an extremely long status message
|
||||
And I press "Preview"
|
||||
Then the preview should not be collapsed
|
||||
|
||||
When I press "Share"
|
||||
Then the post should be collapsed
|
||||
|
||||
Scenario: preview a photo with text
|
||||
Given I expand the publisher
|
||||
When I attach the file "spec/fixtures/button.png" to hidden "file" within "#file-upload"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
Then /^the first post should be a preview$/ do
|
||||
find(".post_preview .post-content").text.should == first_post_text
|
||||
end
|
||||
|
||||
Then /^the preview should not be collapsed$/ do
|
||||
find(".post_preview").should_not have_selector('.collapsed')
|
||||
find(".post_preview").should have_selector('.opened')
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,10 @@ When /^I post an extremely long status message$/ do
|
|||
click_and_post("I am a very interesting message " * 64)
|
||||
end
|
||||
|
||||
When /^I insert an extremely long status message$/ do
|
||||
fill_in 'status_message_fake_text', :with => "I am a very interesting message " * 64
|
||||
end
|
||||
|
||||
When /^I open the show page of the "([^"]*)" post$/ do |post_text|
|
||||
visit post_path_by_content(post_text)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue