Merge pull request #4177 from svbergerem/4157-post-preview-tag-page

Fix #4157: post preview from tag pages
This commit is contained in:
Jonne Haß 2013-05-25 04:46:58 -07:00
commit 272f405ab7
3 changed files with 14 additions and 1 deletions

View file

@ -9,6 +9,7 @@
* 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.
* Fix post preview from tag pages [#4157](https://github.com/diaspora/diaspora/issues/4157)
## Features

View file

@ -187,7 +187,7 @@ app.views.Publisher = Backbone.View.extend(_.extend(
this.removePostPreview();
app.stream.items.add(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 follow "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