Merge branch 'stable' into develop

This commit is contained in:
Steffen van Bergerem 2015-06-19 22:20:57 +02:00
commit e890ffa698
4 changed files with 52 additions and 1 deletions

View file

@ -52,6 +52,7 @@ bind to an UNIX socket at `unix:tmp/diaspora.sock`. Please change your local
## Bug fixes
* Precompile facebox images [#6105](https://github.com/diaspora/diaspora/pull/6105)
* Fix wrong closing a-tag [#6111](https://github.com/diaspora/diaspora/pull/6111)
* Fix mobile more-button wording when there are less than 15 posts [#6118](https://github.com/diaspora/diaspora/pull/6118)
## Features
* Add configuration options for some debug logs [#6090](https://github.com/diaspora/diaspora/pull/6090)

View file

@ -3,7 +3,7 @@
%a.more-link.paginate{:href => next_page_path}
%h1
= t("more")
-elsif params[:max_time].present?
-elsif params[:max_time].present? || @stream.stream_posts.length > 0
#pagination
%div.no-more-posts
%h2

View file

@ -0,0 +1,43 @@
@javascript @mobile
Feature: using the more button on mobile stream
As a mobile user
I want to navigate the stream
And I want to test the text of the more-button in different environments
Background:
Given a user with username "bob"
And I sign in as "bob@bob.bob" on the mobile website
Scenario: There are no posts
Given I am on the home page
When I go to the stream page
Then I should see "There are no posts yet."
Scenario: There are <15 posts
Given I am on the home page
And "bob@bob.bob" has a public post with text "post 1"
When I go to the stream page
Then I should see "You have reached the end of the stream."
Scenario: There are 15 posts
Given I am on the home page
Given there are 15 public posts from "bob@bob.bob"
And "bob@bob.bob" has a public post with text "post 1"
When I go to the stream page
Then I should see "More"
When I click on selector ".more-link"
Then I should see "You have reached the end of the stream."
Scenario: There are 15 +1 posts
Given I am on the home page
Given there are 16 public posts from "bob@bob.bob"
When I go to the stream page
Then I should see "More"
When I click on selector ".more-link"
Then I should see "You have reached the end of the stream."

View file

@ -27,6 +27,13 @@ Given /^"([^"]*)" has a public post with text "([^"]*)"$/ do |email, text|
user.post(:status_message, :text => text, :public => true, :to => user.aspect_ids)
end
Given /^there are (\d+) public posts from "([^"]*)"$/ do |n_posts, email|
user = User.find_by_email(email)
(1..n_posts.to_i).each do |n|
user.post(:status_message, text: "post nr. #{n}", public: true, to: user.aspect_ids)
end
end
Given /^"([^"]*)" has a non public post with text "([^"]*)"$/ do |email, text|
user = User.find_by_email(email)
user.post(:status_message, :text => text, :public => false, :to => user.aspect_ids)