Fix #4157: post preview from tag pages

This commit is contained in:
Steffen van Bergerem 2013-05-24 19:39:36 +02:00
parent cdb4be14ce
commit 7f596cfd36
3 changed files with 14 additions and 1 deletions

View file

@ -8,6 +8,7 @@
* Don't use Pathname early to circumvent some rare initialization errors [#3816](https://github.com/diaspora/diaspora/issues/3816) * Don't use Pathname early to circumvent some rare initialization errors [#3816](https://github.com/diaspora/diaspora/issues/3816)
* Don't error out in script/server if git is unavailable. * Don't error out in script/server if git is unavailable.
* Fix post preview from tag pages [#4157](https://github.com/diaspora/diaspora/issues/4157)
## Features ## Features

View file

@ -187,7 +187,7 @@ app.views.Publisher = Backbone.View.extend(_.extend(
this.removePostPreview(); this.removePostPreview();
app.stream.items.add(previewMessage); app.stream.items.add(previewMessage);
this.recentPreview=previewMessage; this.recentPreview=previewMessage;
this.modifyPostPreview($('.stream_element:first')); this.modifyPostPreview($('.stream_element:first',$('.stream_container')));
} }
}, },

View file

@ -50,3 +50,15 @@ Feature: preview posts in the stream
And I press "Preview" And I press "Preview"
And I follow "Alice Smith" And I follow "Alice Smith"
Then I should see "Alice Smith" Then I should see "Alice Smith"
Scenario: preview a post on tag page
Given there is a user "Samuel Beckett" who's tagged "#rockstar"
When I search for "#rockstar"
Then I should be on the tag page for "rockstar"
And I should see "Samuel Beckett"
Given I expand the publisher
When I fill in the following:
| status_message_fake_text | This preview rocks |
And I press "Preview"
Then "This preview rocks" should be post 1
And the first post should be a preview